Index: ui/display/desktop.h |
diff --git a/ui/display/desktop.h b/ui/display/desktop.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..fd2ebd1c836e869cc96cb51b5dce49f14929ba0e |
--- /dev/null |
+++ b/ui/display/desktop.h |
@@ -0,0 +1,36 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_DISPLAY_DESKTOP_H_ |
+#define UI_DISPLAY_DESKTOP_H_ |
+ |
+#include "base/lazy_instance.h" |
+#include "base/observer_list.h" |
+#include "ui/display/display_export.h" |
+ |
+namespace display { |
+ |
+class DesktopObserver; |
+ |
+class DISPLAY_EXPORT Desktop { |
+ public: |
+ // Retreives the Desktop singleton. |
+ static Desktop* GetDesktop(); |
Tom (Use chromium acct)
2016/07/06 18:19:11
GetDesktop currently is not used anywhere, but Chr
sky
2016/07/06 20:33:05
Yes. Here is what I recommend doing:
. remove all
Tom (Use chromium acct)
2016/07/06 22:29:16
Done.
|
+ |
+ // Sets the Desktop singleton instance. |
+ static void SetDesktopInstance(Desktop* desktop); |
+ |
+ void AddObserver(DesktopObserver* observer); |
+ void RemoveObserver(DesktopObserver* observer); |
+ |
+ protected: |
+ Desktop(); |
+ ~Desktop(); |
+ |
+ base::ObserverList<DesktopObserver> desktop_observer_list_; |
+}; |
+ |
+} // namespace display |
+ |
+#endif |