| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // Display. | 51 // Display. |
| 52 // . without a DisplayBinding. In this mode a WindowManager is automatically | 52 // . without a DisplayBinding. In this mode a WindowManager is automatically |
| 53 // created per user. | 53 // created per user. |
| 54 class Display : public PlatformDisplayDelegate, | 54 class Display : public PlatformDisplayDelegate, |
| 55 public mojom::WindowTreeHost, | 55 public mojom::WindowTreeHost, |
| 56 public FocusControllerObserver, | 56 public FocusControllerObserver, |
| 57 public FocusControllerDelegate, | 57 public FocusControllerDelegate, |
| 58 public UserIdTrackerObserver, | 58 public UserIdTrackerObserver, |
| 59 public WindowManagerWindowTreeFactorySetObserver { | 59 public WindowManagerWindowTreeFactorySetObserver { |
| 60 public: | 60 public: |
| 61 Display(WindowServer* window_server, | 61 Display(WindowServer* window_server, PlatformDisplayInitParams init_params); |
| 62 const PlatformDisplayInitParams& platform_display_init_params); | |
| 63 ~Display() override; | 62 ~Display() override; |
| 64 | 63 |
| 65 // Initializes state that depends on the existence of a Display. | 64 // Initializes state that depends on the existence of a Display. |
| 66 void Init(std::unique_ptr<DisplayBinding> binding); | 65 void Init(std::unique_ptr<DisplayBinding> binding); |
| 67 | 66 |
| 68 int64_t GetId() const; | 67 int64_t GetId() const; |
| 69 | 68 |
| 70 DisplayManager* display_manager(); | 69 DisplayManager* display_manager(); |
| 71 const DisplayManager* display_manager() const; | 70 const DisplayManager* display_manager() const; |
| 72 | 71 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // Inits the necessary state once the display is ready. | 155 // Inits the necessary state once the display is ready. |
| 157 void InitWindowManagerDisplayRootsIfNecessary(); | 156 void InitWindowManagerDisplayRootsIfNecessary(); |
| 158 | 157 |
| 159 // Creates the set of WindowManagerDisplayRoots from the | 158 // Creates the set of WindowManagerDisplayRoots from the |
| 160 // WindowManagerWindowTreeFactorySet. | 159 // WindowManagerWindowTreeFactorySet. |
| 161 void CreateWindowManagerDisplayRootsFromFactories(); | 160 void CreateWindowManagerDisplayRootsFromFactories(); |
| 162 | 161 |
| 163 void CreateWindowManagerDisplayRootFromFactory( | 162 void CreateWindowManagerDisplayRootFromFactory( |
| 164 WindowManagerWindowTreeFactory* factory); | 163 WindowManagerWindowTreeFactory* factory); |
| 165 | 164 |
| 165 // Creates the root ServerWindow for this display. The root window will have |
| 166 // |size| in DIP. |
| 167 void CreateRootWindow(const gfx::Size& size); |
| 168 |
| 166 // PlatformDisplayDelegate: | 169 // PlatformDisplayDelegate: |
| 167 void CreateRootWindow(const gfx::Size& size) override; | |
| 168 ServerWindow* GetRootWindow() override; | 170 ServerWindow* GetRootWindow() override; |
| 169 bool IsInHighContrastMode() override; | 171 bool IsInHighContrastMode() override; |
| 170 void OnEvent(const ui::Event& event) override; | 172 void OnEvent(const ui::Event& event) override; |
| 171 void OnNativeCaptureLost() override; | 173 void OnNativeCaptureLost() override; |
| 172 | 174 |
| 173 // FocusControllerDelegate: | 175 // FocusControllerDelegate: |
| 174 bool CanHaveActiveChildren(ServerWindow* window) const override; | 176 bool CanHaveActiveChildren(ServerWindow* window) const override; |
| 175 | 177 |
| 176 // FocusControllerObserver: | 178 // FocusControllerObserver: |
| 177 void OnActivationChanged(ServerWindow* old_active_window, | 179 void OnActivationChanged(ServerWindow* old_active_window, |
| (...skipping 24 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 |