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

Unified Diff: ui/compositor/layer.h

Issue 2254733003: Add ui::LayerObserver and use it to update Alt+Tab previews as needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix for other test Created 4 years, 4 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/BUILD.gn ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.h
diff --git a/ui/compositor/layer.h b/ui/compositor/layer.h
index 27743eca83d610e127a320100cf1ce098a5ae3fa..566e9f625680209b9268519ef061f37935038bbe 100644
--- a/ui/compositor/layer.h
+++ b/ui/compositor/layer.h
@@ -15,6 +15,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/observer_list.h"
#include "cc/base/region.h"
#include "cc/layers/content_layer_client.h"
#include "cc/layers/layer_client.h"
@@ -51,6 +52,7 @@ namespace ui {
class Compositor;
class LayerAnimator;
+class LayerObserver;
class LayerOwner;
class LayerThreadedAnimationDelegate;
@@ -93,6 +95,9 @@ class COMPOSITOR_EXPORT Layer
LayerOwner* owner() { return owner_; }
+ void AddObserver(LayerObserver* observer);
+ void RemoveObserver(LayerObserver* observer);
+
// Adds a new Layer to this Layer.
void Add(Layer* child);
@@ -487,6 +492,8 @@ class COMPOSITOR_EXPORT Layer
LayerDelegate* delegate_;
+ base::ObserverList<LayerObserver> observer_list_;
+
LayerOwner* owner_;
scoped_refptr<LayerAnimator> animator_;
« no previous file with comments | « ui/compositor/BUILD.gn ('k') | ui/compositor/layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698