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

Unified Diff: ui/aura/desktop.h

Issue 8253001: aura: Some changes in Window and Desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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/aura/desktop.h
diff --git a/ui/aura/desktop.h b/ui/aura/desktop.h
index 521876a273e99f7a1d353e75d33d505681d616d6..882f6ad2626383fb173b7d44321027352c87a0b7 100644
--- a/ui/aura/desktop.h
+++ b/ui/aura/desktop.h
@@ -26,6 +26,7 @@ namespace aura {
class DesktopDelegate;
class DesktopHost;
+class DesktopObserver;
class MouseEvent;
// Desktop is responsible for hosting a set of windows.
@@ -100,6 +101,10 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate {
// It must never be stored.
MessageLoop::Dispatcher* GetDispatcher();
+ // Add/remove observer.
+ void AddObserver(DesktopObserver* observer);
+ void RemoveObserver(DesktopObserver* observer);
+
static Desktop* GetInstance();
private:
@@ -128,6 +133,8 @@ class AURA_EXPORT Desktop : public ui::CompositorDelegate {
// destruction.
bool in_destructor_;
+ ObserverList<DesktopObserver> observers_;
+
DISALLOW_COPY_AND_ASSIGN(Desktop);
};

Powered by Google App Engine
This is Rietveld 408576698