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

Side by Side Diff: services/ui/ws/window_tree.h

Issue 2349003002: Makes WindowTree::DeleteWindow() unembed for roots (Closed)
Patch Set: comment Created 4 years, 3 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 | « services/ui/ws/window_server.cc ('k') | services/ui/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 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 const std::vector<uint8_t>* new_data, 219 const std::vector<uint8_t>* new_data,
220 bool originated_change); 220 bool originated_change);
221 void ProcessWindowHierarchyChanged(const ServerWindow* window, 221 void ProcessWindowHierarchyChanged(const ServerWindow* window,
222 const ServerWindow* new_parent, 222 const ServerWindow* new_parent,
223 const ServerWindow* old_parent, 223 const ServerWindow* old_parent,
224 bool originated_change); 224 bool originated_change);
225 void ProcessWindowReorder(const ServerWindow* window, 225 void ProcessWindowReorder(const ServerWindow* window,
226 const ServerWindow* relative_window, 226 const ServerWindow* relative_window,
227 mojom::OrderDirection direction, 227 mojom::OrderDirection direction,
228 bool originated_change); 228 bool originated_change);
229 void ProcessWindowDeleted(const ServerWindow* window, bool originated_change); 229 void ProcessWindowDeleted(ServerWindow* window, bool originated_change);
230 void ProcessWillChangeWindowVisibility(const ServerWindow* window, 230 void ProcessWillChangeWindowVisibility(const ServerWindow* window,
231 bool originated_change); 231 bool originated_change);
232 void ProcessWindowOpacityChanged(const ServerWindow* window, 232 void ProcessWindowOpacityChanged(const ServerWindow* window,
233 float old_opacity, 233 float old_opacity,
234 float new_opacity, 234 float new_opacity,
235 bool originated_change); 235 bool originated_change);
236 void ProcessCursorChanged(const ServerWindow* window, 236 void ProcessCursorChanged(const ServerWindow* window,
237 int32_t cursor_id, 237 int32_t cursor_id,
238 bool originated_change); 238 bool originated_change);
239 void ProcessFocusChanged(const ServerWindow* old_focused_window, 239 void ProcessFocusChanged(const ServerWindow* old_focused_window,
(...skipping 29 matching lines...) Expand all
269 // Change id we created for the window manager. 269 // Change id we created for the window manager.
270 uint32_t wm_change_id; 270 uint32_t wm_change_id;
271 }; 271 };
272 272
273 enum class RemoveRootReason { 273 enum class RemoveRootReason {
274 // The window is being removed. 274 // The window is being removed.
275 DELETED, 275 DELETED,
276 276
277 // Another client is being embedded in the window. 277 // Another client is being embedded in the window.
278 EMBED, 278 EMBED,
279
280 // The embedded client explicitly asked to be unembedded.
281 UNEMBED,
279 }; 282 };
280 283
281 bool ShouldRouteToWindowManager(const ServerWindow* window) const; 284 bool ShouldRouteToWindowManager(const ServerWindow* window) const;
282 285
283 ClientWindowId ClientWindowIdForWindow(const ServerWindow* window) const; 286 ClientWindowId ClientWindowIdForWindow(const ServerWindow* window) const;
284 287
285 // Returns true if |id| is a valid WindowId for a new window. 288 // Returns true if |id| is a valid WindowId for a new window.
286 bool IsValidIdForNewWindow(const ClientWindowId& id) const; 289 bool IsValidIdForNewWindow(const ClientWindowId& id) const;
287 290
288 WindowId GenerateNewWindowId(); 291 WindowId GenerateNewWindowId();
(...skipping 18 matching lines...) Expand all
307 bool RemoveFromMaps(const ServerWindow* window); 310 bool RemoveFromMaps(const ServerWindow* window);
308 311
309 // Removes |window| and all its descendants from the necessary maps. This 312 // Removes |window| and all its descendants from the necessary maps. This
310 // does not recurse through windows that were created by this tree. All 313 // does not recurse through windows that were created by this tree. All
311 // windows owned by this tree are added to |local_windows|. 314 // windows owned by this tree are added to |local_windows|.
312 void RemoveFromKnown(const ServerWindow* window, 315 void RemoveFromKnown(const ServerWindow* window,
313 std::vector<ServerWindow*>* local_windows); 316 std::vector<ServerWindow*>* local_windows);
314 317
315 // Removes a root from set of roots of this tree. This does not remove 318 // Removes a root from set of roots of this tree. This does not remove
316 // the window from the window tree, only from the set of roots. 319 // the window from the window tree, only from the set of roots.
317 void RemoveRoot(const ServerWindow* window, RemoveRootReason reason); 320 void RemoveRoot(ServerWindow* window, RemoveRootReason reason);
318 321
319 // Converts Window(s) to WindowData(s) for transport. This assumes all the 322 // Converts Window(s) to WindowData(s) for transport. This assumes all the
320 // windows are valid for the client. The parent of windows the client is not 323 // windows are valid for the client. The parent of windows the client is not
321 // allowed to see are set to NULL (in the returned WindowData(s)). 324 // allowed to see are set to NULL (in the returned WindowData(s)).
322 mojo::Array<mojom::WindowDataPtr> WindowsToWindowDatas( 325 mojo::Array<mojom::WindowDataPtr> WindowsToWindowDatas(
323 const std::vector<const ServerWindow*>& windows); 326 const std::vector<const ServerWindow*>& windows);
324 mojom::WindowDataPtr WindowToWindowData(const ServerWindow* window); 327 mojom::WindowDataPtr WindowToWindowData(const ServerWindow* window);
325 328
326 // Implementation of GetWindowTree(). Adds |window| to |windows| and recurses 329 // Implementation of GetWindowTree(). Adds |window| to |windows| and recurses
327 // if CanDescendIntoWindowForWindowTree() returns true. 330 // if CanDescendIntoWindowForWindowTree() returns true.
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 waiting_for_top_level_window_info_; 558 waiting_for_top_level_window_info_;
556 bool embedder_intercepts_events_ = false; 559 bool embedder_intercepts_events_ = false;
557 560
558 DISALLOW_COPY_AND_ASSIGN(WindowTree); 561 DISALLOW_COPY_AND_ASSIGN(WindowTree);
559 }; 562 };
560 563
561 } // namespace ws 564 } // namespace ws
562 } // namespace ui 565 } // namespace ui
563 566
564 #endif // SERVICES_UI_WS_WINDOW_TREE_H_ 567 #endif // SERVICES_UI_WS_WINDOW_TREE_H_
OLDNEW
« no previous file with comments | « services/ui/ws/window_server.cc ('k') | services/ui/ws/window_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698