| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_MUS_WS_WINDOW_SERVER_H_ | 5 #ifndef COMPONENTS_MUS_WS_WINDOW_SERVER_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_ | 6 #define COMPONENTS_MUS_WS_WINDOW_SERVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 #include "components/mus/ws/window_manager_window_tree_factory_set.h" | 27 #include "components/mus/ws/window_manager_window_tree_factory_set.h" |
| 28 #include "mojo/public/cpp/bindings/array.h" | 28 #include "mojo/public/cpp/bindings/array.h" |
| 29 #include "mojo/public/cpp/bindings/binding.h" | 29 #include "mojo/public/cpp/bindings/binding.h" |
| 30 | 30 |
| 31 namespace mus { | 31 namespace mus { |
| 32 namespace ws { | 32 namespace ws { |
| 33 | 33 |
| 34 class AccessPolicy; | 34 class AccessPolicy; |
| 35 class DisplayManager; | 35 class DisplayManager; |
| 36 class ServerWindow; | 36 class ServerWindow; |
| 37 class UserActivityMonitor; |
| 37 class WindowManagerState; | 38 class WindowManagerState; |
| 38 class WindowServerDelegate; | 39 class WindowServerDelegate; |
| 39 class WindowTree; | 40 class WindowTree; |
| 40 class WindowTreeBinding; | 41 class WindowTreeBinding; |
| 41 | 42 |
| 42 // WindowServer manages the set of clients of the window server (all the | 43 // WindowServer manages the set of clients of the window server (all the |
| 43 // WindowTrees) as well as providing the root of the hierarchy. | 44 // WindowTrees) as well as providing the root of the hierarchy. |
| 44 class WindowServer : public ServerWindowDelegate, | 45 class WindowServer : public ServerWindowDelegate, |
| 45 public ServerWindowObserver, | 46 public ServerWindowObserver, |
| 46 public DisplayManagerDelegate { | 47 public DisplayManagerDelegate { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 121 |
| 121 // Returns the WindowTree that has |id| as a root. | 122 // Returns the WindowTree that has |id| as a root. |
| 122 WindowTree* GetTreeWithRoot(const ServerWindow* window) { | 123 WindowTree* GetTreeWithRoot(const ServerWindow* window) { |
| 123 return const_cast<WindowTree*>( | 124 return const_cast<WindowTree*>( |
| 124 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window)); | 125 const_cast<const WindowServer*>(this)->GetTreeWithRoot(window)); |
| 125 } | 126 } |
| 126 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const; | 127 const WindowTree* GetTreeWithRoot(const ServerWindow* window) const; |
| 127 | 128 |
| 128 void OnFirstWindowManagerWindowTreeFactoryReady(); | 129 void OnFirstWindowManagerWindowTreeFactoryReady(); |
| 129 | 130 |
| 131 UserActivityMonitor* GetUserActivityMonitorForUser(const UserId& user_id); |
| 132 |
| 130 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { | 133 WindowManagerWindowTreeFactorySet* window_manager_window_tree_factory_set() { |
| 131 return &window_manager_window_tree_factory_set_; | 134 return &window_manager_window_tree_factory_set_; |
| 132 } | 135 } |
| 133 | 136 |
| 134 // Sets focus to |window|. Returns true if |window| already has focus, or | 137 // Sets focus to |window|. Returns true if |window| already has focus, or |
| 135 // focus was successfully changed. Returns |false| if |window| is not a valid | 138 // focus was successfully changed. Returns |false| if |window| is not a valid |
| 136 // window to receive focus. | 139 // window to receive focus. |
| 137 bool SetFocusedWindow(ServerWindow* window); | 140 bool SetFocusedWindow(ServerWindow* window); |
| 138 ServerWindow* GetFocusedWindow(); | 141 ServerWindow* GetFocusedWindow(); |
| 139 | 142 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 | 320 |
| 318 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; | 321 WindowManagerWindowTreeFactorySet window_manager_window_tree_factory_set_; |
| 319 | 322 |
| 320 DISALLOW_COPY_AND_ASSIGN(WindowServer); | 323 DISALLOW_COPY_AND_ASSIGN(WindowServer); |
| 321 }; | 324 }; |
| 322 | 325 |
| 323 } // namespace ws | 326 } // namespace ws |
| 324 } // namespace mus | 327 } // namespace mus |
| 325 | 328 |
| 326 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_ | 329 #endif // COMPONENTS_MUS_WS_WINDOW_SERVER_H_ |
| OLD | NEW |