Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
[Android] Allow redundant |StartObservingRootWindow()| calls
Browse files Browse the repository at this point in the history
Redundant requests to observe the window are harmless, and should be supported
given the undefined relationship and timing between
|RWHVAndroid::SetContentViewCore()| and |RWHVAndroid::WasShown()|, both of which
can trigger observing of the root window.

BUG=406651,394604
NOTRY=true
[email protected]

Review URL: https://codereview.chromium.org/493053004

Cr-Commit-Position: refs/heads/master@{#291596}
  • Loading branch information
jdduke authored and Commit bot committed Aug 23, 2014
1 parent 24f0da6 commit 789317e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,9 @@ void RenderWidgetHostViewAndroid::RequestVSyncUpdate(uint32 requests) {

void RenderWidgetHostViewAndroid::StartObservingRootWindow() {
DCHECK(content_view_core_);
DCHECK(!observing_root_window_);
if (observing_root_window_)
return;

observing_root_window_ = true;
content_view_core_->GetWindowAndroid()->AddObserver(this);

Expand Down

0 comments on commit 789317e

Please sign in to comment.