Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(962)

Side by Side Diff: components/mus/ws/window_tree.h

Issue 2072343002: Changes how window manager obtains WindowTree from mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/mus/ws/window_server.cc ('k') | components/mus/ws/window_tree.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 COMPONENTS_MUS_WS_WINDOW_TREE_H_ 5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_H_
6 #define COMPONENTS_MUS_WS_WINDOW_TREE_H_ 6 #define COMPONENTS_MUS_WS_WINDOW_TREE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 const_cast<const WindowTree*>(this)->GetDisplay(window)); 122 const_cast<const WindowTree*>(this)->GetDisplay(window));
123 } 123 }
124 124
125 const WindowManagerState* GetWindowManagerState( 125 const WindowManagerState* GetWindowManagerState(
126 const ServerWindow* window) const; 126 const ServerWindow* window) const;
127 WindowManagerState* GetWindowManagerState(const ServerWindow* window) { 127 WindowManagerState* GetWindowManagerState(const ServerWindow* window) {
128 return const_cast<WindowManagerState*>( 128 return const_cast<WindowManagerState*>(
129 const_cast<const WindowTree*>(this)->GetWindowManagerState(window)); 129 const_cast<const WindowTree*>(this)->GetWindowManagerState(window));
130 } 130 }
131 131
132 // Adds a new root to this tree. This is only valid for window managers.
133 void AddRootForWindowManager(const ServerWindow* root);
134
132 // Invoked when a tree is about to be destroyed. 135 // Invoked when a tree is about to be destroyed.
133 void OnWindowDestroyingTreeImpl(WindowTree* tree); 136 void OnWindowDestroyingTreeImpl(WindowTree* tree);
134 137
135 // These functions are synchronous variants of those defined in the mojom. The 138 // These functions are synchronous variants of those defined in the mojom. The
136 // WindowTree implementations all call into these. See the mojom for details. 139 // WindowTree implementations all call into these. See the mojom for details.
137 bool SetCapture(const ClientWindowId& client_window_id); 140 bool SetCapture(const ClientWindowId& client_window_id);
138 bool NewWindow(const ClientWindowId& client_window_id, 141 bool NewWindow(const ClientWindowId& client_window_id,
139 const std::map<std::string, std::vector<uint8_t>>& properties); 142 const std::map<std::string, std::vector<uint8_t>>& properties);
140 bool AddWindow(const ClientWindowId& parent_id, 143 bool AddWindow(const ClientWindowId& parent_id,
141 const ClientWindowId& child_id); 144 const ClientWindowId& child_id);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 DELETED, 242 DELETED,
240 243
241 // Another client is being embedded in the window. 244 // Another client is being embedded in the window.
242 EMBED, 245 EMBED,
243 }; 246 };
244 247
245 DisplayManager* display_manager(); 248 DisplayManager* display_manager();
246 const DisplayManager* display_manager() const; 249 const DisplayManager* display_manager() const;
247 250
248 // Used when this tree is the window manager. 251 // Used when this tree is the window manager.
249 Display* GetDisplayForWindowManager();
250 WindowManagerState* GetWindowManagerStateForWindowManager(); 252 WindowManagerState* GetWindowManagerStateForWindowManager();
251 253
252 bool ShouldRouteToWindowManager(const ServerWindow* window) const; 254 bool ShouldRouteToWindowManager(const ServerWindow* window) const;
253 255
254 ClientWindowId ClientWindowIdForWindow(const ServerWindow* window) const; 256 ClientWindowId ClientWindowIdForWindow(const ServerWindow* window) const;
255 257
256 // Returns true if |id| is a valid WindowId for a new window. 258 // Returns true if |id| is a valid WindowId for a new window.
257 bool IsValidIdForNewWindow(const ClientWindowId& id) const; 259 bool IsValidIdForNewWindow(const ClientWindowId& id) const;
258 260
259 WindowId GenerateNewWindowId(); 261 WindowId GenerateNewWindowId();
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 std::unique_ptr<WaitingForTopLevelWindowInfo> 473 std::unique_ptr<WaitingForTopLevelWindowInfo>
472 waiting_for_top_level_window_info_; 474 waiting_for_top_level_window_info_;
473 475
474 DISALLOW_COPY_AND_ASSIGN(WindowTree); 476 DISALLOW_COPY_AND_ASSIGN(WindowTree);
475 }; 477 };
476 478
477 } // namespace ws 479 } // namespace ws
478 } // namespace mus 480 } // namespace mus
479 481
480 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_H_ 482 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_server.cc ('k') | components/mus/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698