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

Unified Diff: ui/display/desktop_observer.h

Issue 2108933003: Reorder browser list on workspace switch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use LazyInstance. Add small API descriptions. Created 4 years, 6 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/display/BUILD.gn ('k') | ui/display/desktop_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/display/desktop_observer.h
diff --git a/ui/display/desktop_observer.h b/ui/display/desktop_observer.h
new file mode 100644
index 0000000000000000000000000000000000000000..ac9c87b44a01b3b4fe3778c0adf76d61fdd7bc2f
--- /dev/null
+++ b/ui/display/desktop_observer.h
@@ -0,0 +1,37 @@
+// 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_OBSERVER_H_
+#define UI_DISPLAY_DESKTOP_OBSERVER_H_
+
+#include <string>
+
+#include "ui/display/display_export.h"
+
+namespace display {
+
+namespace desktop {
sky 2016/06/29 22:55:58 Don't use desktop here. See threads on namespace u
danakj 2016/06/29 22:56:51 Can you point at a thread? The google style guide
Tom (Use chromium acct) 2016/06/29 23:24:20 I'll hold off on making this change until sky/dana
Tom (Use chromium acct) 2016/06/29 23:24:20 Do you mean to create a display::Desktop class to
sky 2016/06/30 00:25:55 Sorry for not being clear. I meant the later, nuke
Tom (Use chromium acct) 2016/06/30 17:35:53 Done.
+
+// Observers for desktop configuration changes.
+class DISPLAY_EXPORT DesktopObserver {
sky 2016/06/29 22:55:58 Is there a reason you didn't add this to DisplayOb
Tom (Use chromium acct) 2016/06/29 23:24:20 I did that originally, but the desktop::Screen ins
sky 2016/06/30 00:25:55 Can you move initialization earlier?
Tom (Use chromium acct) 2016/06/30 17:35:53 If you really want, I can move it back into Displa
+ public:
+ // Called when the (platform-specific) workspace ID changes to
+ // |new_workspace|.
+ virtual void OnWorkspaceChanged(const std::string& new_workspace) = 0;
+
+ protected:
+ virtual ~DesktopObserver();
+};
+
+DISPLAY_EXPORT void AddObserver(DesktopObserver* observer);
+DISPLAY_EXPORT void RemoveObserver(DesktopObserver* observer);
+
+// Notify all observers that the workspace changed to |new_workspace|.
+DISPLAY_EXPORT void OnWorkspaceChanged(const std::string& new_workspace);
+
+} // namespace display
+
+} // namespace desktop
+
+#endif // UI_DISPLAY_DESKTOP_OBSERVER_H_
« no previous file with comments | « ui/display/BUILD.gn ('k') | ui/display/desktop_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698