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

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

Issue 1640253003: Makes resolving ids work correctly in new world (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk 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/server_window_delegate.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 0604537ea8f770b95f898ba6955b7745546cd662..b7c22f994242c1619aad9cd86495c3f19e828cf0 100644
--- a/components/mus/ws/connection_manager.cc
+++ b/components/mus/ws/connection_manager.cc
@@ -535,6 +535,22 @@ void ConnectionManager::ScheduleSurfaceDestruction(ServerWindow* window) {
}
}
+ServerWindow* ConnectionManager::FindWindowForSurface(
+ const ServerWindow* ancestor,
+ mojom::SurfaceType surface_type,
+ const ClientWindowId& client_window_id) {
+ WindowTreeImpl* window_tree = GetConnection(ancestor->id().connection_id);
+ if (!window_tree)
+ return nullptr;
+ if (surface_type == mojom::SurfaceType::DEFAULT) {
+ // At embed points the default surface comes from the embedded app.
+ WindowTreeImpl* connection_with_root = GetConnectionWithRoot(ancestor);
+ if (connection_with_root)
+ window_tree = connection_with_root;
+ }
+ return window_tree->GetWindowByClientId(client_window_id);
+}
+
void ConnectionManager::OnWindowDestroyed(ServerWindow* window) {
if (!in_destructor_)
ProcessWindowDeleted(window);
« no previous file with comments | « components/mus/ws/connection_manager.h ('k') | components/mus/ws/server_window_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698