Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_DISPLAY_DESKTOP_OBSERVER_H_ | |
| 6 #define UI_DISPLAY_DESKTOP_OBSERVER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ui/display/display_export.h" | |
| 11 | |
| 12 namespace display { | |
| 13 | |
| 14 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.
| |
| 15 | |
| 16 // Observers for desktop configuration changes. | |
| 17 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
| |
| 18 public: | |
| 19 // Called when the (platform-specific) workspace ID changes to | |
| 20 // |new_workspace|. | |
| 21 virtual void OnWorkspaceChanged(const std::string& new_workspace) = 0; | |
| 22 | |
| 23 protected: | |
| 24 virtual ~DesktopObserver(); | |
| 25 }; | |
| 26 | |
| 27 DISPLAY_EXPORT void AddObserver(DesktopObserver* observer); | |
| 28 DISPLAY_EXPORT void RemoveObserver(DesktopObserver* observer); | |
| 29 | |
| 30 // Notify all observers that the workspace changed to |new_workspace|. | |
| 31 DISPLAY_EXPORT void OnWorkspaceChanged(const std::string& new_workspace); | |
| 32 | |
| 33 } // namespace display | |
| 34 | |
| 35 } // namespace desktop | |
| 36 | |
| 37 #endif // UI_DISPLAY_DESKTOP_OBSERVER_H_ | |
| OLD | NEW |