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