| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_MUS_WS_WINDOW_MANAGER_DISPLAY_ROOT_H_ |
| 6 #define COMPONENTS_MUS_WS_WINDOW_MANAGER_DISPLAY_ROOT_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <memory> |
| 11 |
| 12 #include "base/macros.h" |
| 13 |
| 14 namespace mus { |
| 15 namespace ws { |
| 16 |
| 17 class Display; |
| 18 class ServerWindow; |
| 19 class WindowManagerState; |
| 20 class WindowServer; |
| 21 |
| 22 namespace test { |
| 23 class WindowManagerDisplayRootTestApi; |
| 24 } |
| 25 |
| 26 // Owns the root window of a window manager for one display. Each window manager |
| 27 // has one WindowManagerDisplayRoot for each Display. The root window is |
| 28 // parented to the root of a Display. |
| 29 class WindowManagerDisplayRoot { |
| 30 public: |
| 31 explicit WindowManagerDisplayRoot(Display* display); |
| 32 ~WindowManagerDisplayRoot(); |
| 33 |
| 34 ServerWindow* root() { return root_.get(); } |
| 35 const ServerWindow* root() const { return root_.get(); } |
| 36 |
| 37 Display* display() { return display_; } |
| 38 const Display* display() const { return display_; } |
| 39 |
| 40 WindowManagerState* window_manager_state() { return window_manager_state_; } |
| 41 const WindowManagerState* window_manager_state() const { |
| 42 return window_manager_state_; |
| 43 } |
| 44 |
| 45 private: |
| 46 friend class Display; |
| 47 |
| 48 WindowServer* window_server(); |
| 49 |
| 50 Display* display_; |
| 51 // Root ServerWindow of this WindowManagerDisplayRoot. |root_| has a parent, |
| 52 // the root ServerWindow of the Display. |
| 53 std::unique_ptr<ServerWindow> root_; |
| 54 WindowManagerState* window_manager_state_ = nullptr; |
| 55 |
| 56 DISALLOW_COPY_AND_ASSIGN(WindowManagerDisplayRoot); |
| 57 }; |
| 58 |
| 59 } // namespace ws |
| 60 } // namespace mus |
| 61 |
| 62 #endif // COMPONENTS_MUS_WS_WINDOW_MANAGER_DISPLAY_ROOT_H_ |
| OLD | NEW |