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

Unified Diff: ui/aura/mus/window_port_mus.cc

Issue 2613903003: Reland of "Mustash: Ensure surfaces submitted to Mus by WM and embedders contain Surfaces with embe… (Closed)
Patch Set: fix Created 3 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 | « ui/aura/mus/window_port_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_port_mus.cc
diff --git a/ui/aura/mus/window_port_mus.cc b/ui/aura/mus/window_port_mus.cc
index 305fcfc16b603722063e646d1b5277d4fe8074ba..da1ae155fc2cc98e5f27764f39a5c79bde01a128 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -7,6 +7,7 @@
#include "base/memory/ptr_util.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/client/transient_window_client.h"
+#include "ui/aura/mus/client_surface_embedder.h"
#include "ui/aura/mus/property_converter.h"
#include "ui/aura/mus/surface_id_handler.h"
#include "ui/aura/mus/window_tree_client.h"
@@ -255,10 +256,22 @@ void WindowPortMus::SetSurfaceInfoFromServer(
}
}
WindowPortMus* parent = Get(window_->parent());
+ // TODO(mfomitchev): This is unused. We probably don't need this.
if (parent && parent->surface_id_handler_) {
parent->surface_id_handler_->OnChildWindowSurfaceChanged(window_,
surface_info);
}
+
+ // The fact that SetSurfaceIdFromServer was called means that this window
+ // corresponds to an embedded client.
+ if (!client_surface_embedder && surface_info.id().is_valid())
+ client_surface_embedder = base::MakeUnique<ClientSurfaceEmbedder>(window_);
+
+ if (surface_info.id().is_valid())
+ client_surface_embedder->UpdateSurface(surface_info);
+ else
+ client_surface_embedder.reset();
+
surface_info_ = surface_info;
}
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698