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

Unified Diff: ui/views/corewm/transient_window_manager.h

Issue 132013004: Moves transient window observer methods out of WindowObserver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments and update gyp Created 6 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
Index: ui/views/corewm/transient_window_manager.h
diff --git a/ui/views/corewm/transient_window_manager.h b/ui/views/corewm/transient_window_manager.h
index 72c9f998d663d5dad178780f329b62abb3bef1de..93404ddb37295e306a11e3f2f7c1379d08f5da35 100644
--- a/ui/views/corewm/transient_window_manager.h
+++ b/ui/views/corewm/transient_window_manager.h
@@ -7,12 +7,15 @@
#include <vector>
+#include "base/observer_list.h"
#include "ui/aura/window_observer.h"
#include "ui/views/views_export.h"
namespace views {
namespace corewm {
+class TransientWindowObserver;
+
// TransientWindowManager manages the set of transient children for a window
// along with the transient parent. Transient children get the following
// behavior:
@@ -37,6 +40,9 @@ class VIEWS_EXPORT TransientWindowManager : public aura::WindowObserver {
// WARNING: this may return NULL.
static const TransientWindowManager* Get(const aura::Window* window);
+ void AddObserver(TransientWindowObserver* observer);
+ void RemoveObserver(TransientWindowObserver* observer);
+
// Adds or removes a transient child.
void AddTransientChild(aura::Window* child);
void RemoveTransientChild(aura::Window* child);
@@ -87,6 +93,8 @@ class VIEWS_EXPORT TransientWindowManager : public aura::WindowObserver {
// transient ancestor changing. This is a pointer to a value on the stack.
StackingPair* stacking_pair_;
+ ObserverList<TransientWindowObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(TransientWindowManager);
};

Powered by Google App Engine
This is Rietveld 408576698