| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 | 136 |
| 137 void UpdateNativeCursor(mojom::Cursor cursor_id); | 137 void UpdateNativeCursor(mojom::Cursor cursor_id); |
| 138 | 138 |
| 139 // mojom::WindowTreeHost: | 139 // mojom::WindowTreeHost: |
| 140 void SetSize(const gfx::Size& size) override; | 140 void SetSize(const gfx::Size& size) override; |
| 141 void SetTitle(const std::string& title) override; | 141 void SetTitle(const std::string& title) override; |
| 142 | 142 |
| 143 // Updates the size of display root ServerWindow and WM root ServerWindow(s). | 143 // Updates the size of display root ServerWindow and WM root ServerWindow(s). |
| 144 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics); | 144 void OnViewportMetricsChanged(const display::ViewportMetrics& metrics); |
| 145 | 145 |
| 146 // Returns the root window of the active user. |
| 147 ServerWindow* GetActiveRootWindow(); |
| 148 |
| 146 private: | 149 private: |
| 147 friend class test::DisplayTestApi; | 150 friend class test::DisplayTestApi; |
| 148 | 151 |
| 149 using WindowManagerDisplayRootMap = | 152 using WindowManagerDisplayRootMap = |
| 150 std::map<UserId, WindowManagerDisplayRoot*>; | 153 std::map<UserId, WindowManagerDisplayRoot*>; |
| 151 | 154 |
| 152 // Inits the necessary state once the display is ready. | 155 // Inits the necessary state once the display is ready. |
| 153 void InitWindowManagerDisplayRoots(); | 156 void InitWindowManagerDisplayRoots(); |
| 154 | 157 |
| 155 // Creates the set of WindowManagerDisplayRoots from the | 158 // Creates the set of WindowManagerDisplayRoots from the |
| 156 // WindowManagerWindowTreeFactorySet. | 159 // WindowManagerWindowTreeFactorySet. |
| 157 void CreateWindowManagerDisplayRootsFromFactories(); | 160 void CreateWindowManagerDisplayRootsFromFactories(); |
| 158 | 161 |
| 159 void CreateWindowManagerDisplayRootFromFactory( | 162 void CreateWindowManagerDisplayRootFromFactory( |
| 160 WindowManagerWindowTreeFactory* factory); | 163 WindowManagerWindowTreeFactory* factory); |
| 161 | 164 |
| 162 // Creates the root ServerWindow for this display, where |size| is in physical | 165 // Creates the root ServerWindow for this display, where |size| is in physical |
| 163 // pixels. | 166 // pixels. |
| 164 void CreateRootWindow(const gfx::Size& size); | 167 void CreateRootWindow(const gfx::Size& size); |
| 165 | 168 |
| 166 // PlatformDisplayDelegate: | 169 // PlatformDisplayDelegate: |
| 167 display::Display GetDisplay() override; | 170 display::Display GetDisplay() override; |
| 168 ServerWindow* GetRootWindow() override; | 171 ServerWindow* GetRootWindow() override; |
| 169 ServerWindow* GetActiveRootWindow() override; | |
| 170 void OnAcceleratedWidgetAvailable() override; | 172 void OnAcceleratedWidgetAvailable() override; |
| 171 bool IsInHighContrastMode() override; | 173 bool IsInHighContrastMode() override; |
| 172 void OnEvent(const ui::Event& event) override; | 174 void OnEvent(const ui::Event& event) override; |
| 173 void OnNativeCaptureLost() override; | 175 void OnNativeCaptureLost() override; |
| 174 | 176 |
| 175 // FocusControllerDelegate: | 177 // FocusControllerDelegate: |
| 176 bool CanHaveActiveChildren(ServerWindow* window) const override; | 178 bool CanHaveActiveChildren(ServerWindow* window) const override; |
| 177 | 179 |
| 178 // FocusControllerObserver: | 180 // FocusControllerObserver: |
| 179 void OnActivationChanged(ServerWindow* old_active_window, | 181 void OnActivationChanged(ServerWindow* old_active_window, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 202 | 204 |
| 203 WindowManagerDisplayRootMap window_manager_display_root_map_; | 205 WindowManagerDisplayRootMap window_manager_display_root_map_; |
| 204 | 206 |
| 205 DISALLOW_COPY_AND_ASSIGN(Display); | 207 DISALLOW_COPY_AND_ASSIGN(Display); |
| 206 }; | 208 }; |
| 207 | 209 |
| 208 } // namespace ws | 210 } // namespace ws |
| 209 } // namespace ui | 211 } // namespace ui |
| 210 | 212 |
| 211 #endif // SERVICES_UI_WS_DISPLAY_H_ | 213 #endif // SERVICES_UI_WS_DISPLAY_H_ |
| OLD | NEW |