| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_UI_WS_DISPLAY_H_ | 5 #ifndef SERVICES_UI_WS_DISPLAY_H_ |
| 6 #define SERVICES_UI_WS_DISPLAY_H_ | 6 #define SERVICES_UI_WS_DISPLAY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 class WindowManagerDisplayRoot; | 43 class WindowManagerDisplayRoot; |
| 44 class WindowServer; | 44 class WindowServer; |
| 45 class WindowTree; | 45 class WindowTree; |
| 46 | 46 |
| 47 namespace test { | 47 namespace test { |
| 48 class DisplayTestApi; | 48 class DisplayTestApi; |
| 49 } | 49 } |
| 50 | 50 |
| 51 // Displays manages the state associated with a single display. Display has a | 51 // Displays manages the state associated with a single display. Display has a |
| 52 // single root window whose children are the roots for a per-user | 52 // single root window whose children are the roots for a per-user |
| 53 // WindowManager. Display is configured in two distinct | 53 // WindowManager. Display is configured in two distinct ways: |
| 54 // ways: | |
| 55 // . with a DisplayBinding. In this mode there is only ever one WindowManager | 54 // . with a DisplayBinding. In this mode there is only ever one WindowManager |
| 56 // for the display, which comes from the client that created the | 55 // for the display, which comes from the client that created the |
| 57 // Display. | 56 // Display. |
| 58 // . without a DisplayBinding. In this mode a WindowManager is automatically | 57 // . without a DisplayBinding. In this mode a WindowManager is automatically |
| 59 // created per user. | 58 // created per user. |
| 60 class Display : public PlatformDisplayDelegate, | 59 class Display : public PlatformDisplayDelegate, |
| 61 public mojom::WindowTreeHost, | 60 public mojom::WindowTreeHost, |
| 62 public FocusControllerObserver, | 61 public FocusControllerObserver, |
| 63 public FocusControllerDelegate, | 62 public FocusControllerDelegate, |
| 64 public UserIdTrackerObserver, | 63 public UserIdTrackerObserver, |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void AddActivationParent(ServerWindow* window); | 138 void AddActivationParent(ServerWindow* window); |
| 140 void RemoveActivationParent(ServerWindow* window); | 139 void RemoveActivationParent(ServerWindow* window); |
| 141 | 140 |
| 142 void UpdateTextInputState(ServerWindow* window, | 141 void UpdateTextInputState(ServerWindow* window, |
| 143 const ui::TextInputState& state); | 142 const ui::TextInputState& state); |
| 144 void SetImeVisibility(ServerWindow* window, bool visible); | 143 void SetImeVisibility(ServerWindow* window, bool visible); |
| 145 | 144 |
| 146 // Called just before |tree| is destroyed. | 145 // Called just before |tree| is destroyed. |
| 147 void OnWillDestroyTree(WindowTree* tree); | 146 void OnWillDestroyTree(WindowTree* tree); |
| 148 | 147 |
| 148 // Removes |display_root| from internal maps. This called prior to |
| 149 // |display_root| being destroyed. |
| 150 void RemoveWindowManagerDisplayRoot(WindowManagerDisplayRoot* display_root); |
| 151 |
| 149 void UpdateNativeCursor(mojom::CursorType cursor_id); | 152 void UpdateNativeCursor(mojom::CursorType cursor_id); |
| 150 | 153 |
| 151 // mojom::WindowTreeHost: | 154 // mojom::WindowTreeHost: |
| 152 void SetSize(const gfx::Size& size) override; | 155 void SetSize(const gfx::Size& size) override; |
| 153 void SetTitle(const std::string& title) override; | 156 void SetTitle(const std::string& title) override; |
| 154 | 157 |
| 155 // Updates the size of display root ServerWindow and WM root ServerWindow(s). | 158 // Updates the size of display root ServerWindow and WM root ServerWindow(s). |
| 156 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics); | 159 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics); |
| 157 | 160 |
| 158 // Returns the root window of the active user. | 161 // Returns the root window of the active user. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 | 226 |
| 224 WindowManagerDisplayRootMap window_manager_display_root_map_; | 227 WindowManagerDisplayRootMap window_manager_display_root_map_; |
| 225 | 228 |
| 226 DISALLOW_COPY_AND_ASSIGN(Display); | 229 DISALLOW_COPY_AND_ASSIGN(Display); |
| 227 }; | 230 }; |
| 228 | 231 |
| 229 } // namespace ws | 232 } // namespace ws |
| 230 } // namespace ui | 233 } // namespace ui |
| 231 | 234 |
| 232 #endif // SERVICES_UI_WS_DISPLAY_H_ | 235 #endif // SERVICES_UI_WS_DISPLAY_H_ |
| OLD | NEW |