Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(507)

Unified Diff: ui/compositor/compositor.cc

Issue 859423002: Explicitly specify the ui::Compositor to DelegatedFrameHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use compositor Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 0e917265415fd26e79e453e48160b41050ca6031..2363c7c3338e2d95356c0f6f52921e5101f6a482 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -175,6 +175,9 @@ Compositor::~Compositor() {
CancelCompositorLock();
DCHECK(!compositor_lock_);
+ FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
+ OnCompositingShuttingDown(this));
+
if (root_layer_)
root_layer_->SetCompositor(NULL);
@@ -299,25 +302,10 @@ scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
}
void Compositor::AddObserver(CompositorObserver* observer) {
-#if defined(OS_MACOSX)
- // Debugging instrumentation for crbug.com/401630.
- // TODO(ccameron): remove this.
- CHECK(observer);
- if (!observer_list_.HasObserver(observer))
- observer->observing_count_ += 1;
-#endif
-
observer_list_.AddObserver(observer);
}
void Compositor::RemoveObserver(CompositorObserver* observer) {
-#if defined(OS_MACOSX)
- // Debugging instrumentation for crbug.com/401630.
- // TODO(ccameron): remove this.
- if (observer_list_.HasObserver(observer))
- observer->observing_count_ -= 1;
-#endif
-
observer_list_.RemoveObserver(observer);
}
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698