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

Unified Diff: components/mus/ws/connection_manager.cc

Issue 1639223003: Makes it so each windowtreeclient can use whatever ids it wants (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/ids.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/connection_manager.cc
diff --git a/components/mus/ws/connection_manager.cc b/components/mus/ws/connection_manager.cc
index c7a6bee3a7fb9e3e7bd1b8d2aa60ed81268495e5..0604537ea8f770b95f898ba6955b7745546cd662 100644
--- a/components/mus/ws/connection_manager.cc
+++ b/components/mus/ws/connection_manager.cc
@@ -283,27 +283,29 @@ void ConnectionManager::WindowManagerChangeCompleted(
void ConnectionManager::WindowManagerCreatedTopLevelWindow(
WindowTreeImpl* wm_connection,
uint32_t window_manager_change_id,
- Id transport_window_id) {
+ const ServerWindow* window) {
InFlightWindowManagerChange change;
if (!GetAndClearInFlightWindowManagerChange(window_manager_change_id,
&change)) {
return;
}
+ if (!window) {
+ WindowManagerSentBogusMessage();
+ return;
+ }
- const WindowId window_id(WindowIdFromTransportId(transport_window_id));
- const ServerWindow* window = GetWindow(window_id);
WindowTreeImpl* connection = GetConnection(change.connection_id);
// The window manager should have created the window already, and it should
// be ready for embedding.
if (!connection->IsWaitingForNewTopLevelWindow(window_manager_change_id) ||
!window || window->id().connection_id != wm_connection->id() ||
!window->children().empty() || GetConnectionWithRoot(window)) {
- WindowManagerSentBogusMessage(connection);
+ WindowManagerSentBogusMessage();
return;
}
connection->OnWindowManagerCreatedTopLevelWindow(
- window_manager_change_id, change.client_change_id, window_id);
+ window_manager_change_id, change.client_change_id, window);
}
void ConnectionManager::ProcessWindowBoundsChanged(
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/ids.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698