| 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> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <queue> | 12 #include <queue> |
| 13 #include <set> | 13 #include <set> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "services/ui/common/types.h" | 17 #include "services/ui/common/types.h" |
| 18 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" | 18 #include "services/ui/public/interfaces/window_manager_constants.mojom.h" |
| 19 #include "services/ui/public/interfaces/window_tree_host.mojom.h" | 19 #include "services/ui/public/interfaces/window_tree_host.mojom.h" |
| 20 #include "services/ui/ws/focus_controller_delegate.h" | 20 #include "services/ui/ws/focus_controller_delegate.h" |
| 21 #include "services/ui/ws/focus_controller_observer.h" | 21 #include "services/ui/ws/focus_controller_observer.h" |
| 22 #include "services/ui/ws/platform_display.h" | 22 #include "services/ui/ws/platform_display.h" |
| 23 #include "services/ui/ws/server_window.h" | 23 #include "services/ui/ws/server_window.h" |
| 24 #include "services/ui/ws/server_window_observer.h" | 24 #include "services/ui/ws/server_window_observer.h" |
| 25 #include "services/ui/ws/server_window_tracker.h" | 25 #include "services/ui/ws/server_window_tracker.h" |
| 26 #include "services/ui/ws/user_id_tracker_observer.h" | 26 #include "services/ui/ws/user_id_tracker_observer.h" |
| 27 #include "services/ui/ws/window_manager_window_tree_factory_set_observer.h" | 27 #include "services/ui/ws/window_manager_window_tree_factory_set_observer.h" |
| 28 #include "ui/display/display.h" |
| 28 | 29 |
| 29 namespace ui { | 30 namespace ui { |
| 30 namespace ws { | 31 namespace ws { |
| 31 | 32 |
| 32 class DisplayBinding; | 33 class DisplayBinding; |
| 33 class DisplayManager; | 34 class DisplayManager; |
| 34 class FocusController; | 35 class FocusController; |
| 35 struct PlatformDisplayInitParams; | 36 struct PlatformDisplayInitParams; |
| 36 class WindowManagerDisplayRoot; | 37 class WindowManagerDisplayRoot; |
| 37 class WindowServer; | 38 class WindowServer; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 65 // Initializes state that depends on the existence of a Display. | 66 // Initializes state that depends on the existence of a Display. |
| 66 void Init(std::unique_ptr<DisplayBinding> binding); | 67 void Init(std::unique_ptr<DisplayBinding> binding); |
| 67 | 68 |
| 68 uint32_t id() const { return id_; } | 69 uint32_t id() const { return id_; } |
| 69 | 70 |
| 70 DisplayManager* display_manager(); | 71 DisplayManager* display_manager(); |
| 71 const DisplayManager* display_manager() const; | 72 const DisplayManager* display_manager() const; |
| 72 | 73 |
| 73 PlatformDisplay* platform_display() { return platform_display_.get(); } | 74 PlatformDisplay* platform_display() { return platform_display_.get(); } |
| 74 | 75 |
| 75 // Returns a mojom::Display for the specified display. WindowManager specific | 76 // Returns a mojom::WsDisplay for the specified display. WindowManager |
| 76 // values are not set. | 77 // specific values are not set. |
| 77 mojom::DisplayPtr ToMojomDisplay() const; | 78 mojom::WsDisplayPtr ToWsDisplay() const; |
| 79 |
| 80 // Returns a display::Display for the specficied display. |
| 81 ::display::Display ToDisplay() const; |
| 78 | 82 |
| 79 // Schedules a paint for the specified region in the coordinates of |window|. | 83 // Schedules a paint for the specified region in the coordinates of |window|. |
| 80 void SchedulePaint(const ServerWindow* window, const gfx::Rect& bounds); | 84 void SchedulePaint(const ServerWindow* window, const gfx::Rect& bounds); |
| 81 | 85 |
| 82 // Schedules destruction of surfaces in |window|. If a frame has been | 86 // Schedules destruction of surfaces in |window|. If a frame has been |
| 83 // scheduled but not drawn surface destruction is delayed until the frame is | 87 // scheduled but not drawn surface destruction is delayed until the frame is |
| 84 // drawn, otherwise destruction is immediate. | 88 // drawn, otherwise destruction is immediate. |
| 85 void ScheduleSurfaceDestruction(ServerWindow* window); | 89 void ScheduleSurfaceDestruction(ServerWindow* window); |
| 86 | 90 |
| 87 mojom::Rotation GetRotation() const; | 91 ::display::Display::Rotation GetRotation() const; |
| 88 gfx::Size GetSize() const; | 92 gfx::Size GetSize() const; |
| 89 | 93 |
| 90 // Returns the id for the corresponding id. | 94 // Returns the id for the corresponding id. |
| 91 int64_t GetPlatformDisplayId() const; | 95 int64_t GetPlatformDisplayId() const; |
| 92 | 96 |
| 93 WindowServer* window_server() { return window_server_; } | 97 WindowServer* window_server() { return window_server_; } |
| 94 | 98 |
| 95 // Returns the root of the Display. The root's children are the roots | 99 // Returns the root of the Display. The root's children are the roots |
| 96 // of the corresponding WindowManagers. | 100 // of the corresponding WindowManagers. |
| 97 ServerWindow* root_window() { return root_.get(); } | 101 ServerWindow* root_window() { return root_.get(); } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 220 |
| 217 WindowManagerDisplayRootMap window_manager_display_root_map_; | 221 WindowManagerDisplayRootMap window_manager_display_root_map_; |
| 218 | 222 |
| 219 DISALLOW_COPY_AND_ASSIGN(Display); | 223 DISALLOW_COPY_AND_ASSIGN(Display); |
| 220 }; | 224 }; |
| 221 | 225 |
| 222 } // namespace ws | 226 } // namespace ws |
| 223 } // namespace ui | 227 } // namespace ui |
| 224 | 228 |
| 225 #endif // SERVICES_UI_WS_DISPLAY_H_ | 229 #endif // SERVICES_UI_WS_DISPLAY_H_ |
| OLD | NEW |