OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_WINDOW_TREE_H_ | 5 #ifndef SERVICES_UI_WS_WINDOW_TREE_H_ |
6 #define SERVICES_UI_WS_WINDOW_TREE_H_ | 6 #define SERVICES_UI_WS_WINDOW_TREE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 WindowManagerState* window_manager_state() { | 142 WindowManagerState* window_manager_state() { |
143 return window_manager_state_.get(); | 143 return window_manager_state_.get(); |
144 } | 144 } |
145 | 145 |
146 DisplayManager* display_manager(); | 146 DisplayManager* display_manager(); |
147 const DisplayManager* display_manager() const; | 147 const DisplayManager* display_manager() const; |
148 | 148 |
149 WindowServer* window_server() { return window_server_; } | 149 WindowServer* window_server() { return window_server_; } |
150 const WindowServer* window_server() const { return window_server_; } | 150 const WindowServer* window_server() const { return window_server_; } |
151 | 151 |
| 152 void WillCreateRootDisplay(uint32_t transport_window_id) { |
| 153 pending_client_id_ = transport_window_id; |
| 154 } |
| 155 |
| 156 // Calls WindowTreeClient::OnEmbed. |
| 157 void DoOnEmbed(mojom::WindowTreePtr tree, ServerWindow* root); |
| 158 |
152 // Called from ~WindowServer. Reset WindowTreeClient so that it no longer gets | 159 // Called from ~WindowServer. Reset WindowTreeClient so that it no longer gets |
153 // any messages. | 160 // any messages. |
154 void PrepareForWindowServerShutdown(); | 161 void PrepareForWindowServerShutdown(); |
155 | 162 |
| 163 // Adds a new root to this tree. |
| 164 void AddRoot(const ServerWindow* root); |
| 165 |
156 // Adds a new root to this tree. This is only valid for window managers. | 166 // Adds a new root to this tree. This is only valid for window managers. |
157 void AddRootForWindowManager(const ServerWindow* root); | 167 void AddRootForWindowManager(const ServerWindow* root); |
158 | 168 |
159 // Invoked when a tree is about to be destroyed. | 169 // Invoked when a tree is about to be destroyed. |
160 void OnWindowDestroyingTreeImpl(WindowTree* tree); | 170 void OnWindowDestroyingTreeImpl(WindowTree* tree); |
161 | 171 |
162 // Sends updated display information. | 172 // Sends updated display information. |
163 void OnWmDisplayModified(const display::Display& display); | 173 void OnWmDisplayModified(const display::Display& display); |
164 | 174 |
165 // These functions are synchronous variants of those defined in the mojom. The | 175 // These functions are synchronous variants of those defined in the mojom. The |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 581 |
572 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManagerClient>> | 582 std::unique_ptr<mojo::AssociatedBinding<mojom::WindowManagerClient>> |
573 window_manager_internal_client_binding_; | 583 window_manager_internal_client_binding_; |
574 mojom::WindowManager* window_manager_internal_; | 584 mojom::WindowManager* window_manager_internal_; |
575 std::unique_ptr<WindowManagerState> window_manager_state_; | 585 std::unique_ptr<WindowManagerState> window_manager_state_; |
576 | 586 |
577 std::unique_ptr<WaitingForTopLevelWindowInfo> | 587 std::unique_ptr<WaitingForTopLevelWindowInfo> |
578 waiting_for_top_level_window_info_; | 588 waiting_for_top_level_window_info_; |
579 bool embedder_intercepts_events_ = false; | 589 bool embedder_intercepts_events_ = false; |
580 | 590 |
| 591 uint32_t pending_client_id_ = kInvalidClientId; |
| 592 |
581 DISALLOW_COPY_AND_ASSIGN(WindowTree); | 593 DISALLOW_COPY_AND_ASSIGN(WindowTree); |
582 }; | 594 }; |
583 | 595 |
584 } // namespace ws | 596 } // namespace ws |
585 } // namespace ui | 597 } // namespace ui |
586 | 598 |
587 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ | 599 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ |
OLD | NEW |