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

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

Issue 2580063002: Mustash: Ensure surfaces submitted to Mus by WM and embedders contain Surfaces with embeded content. (Closed)
Patch Set: Addressing feedback. Created 3 years, 12 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
« ui/aura/mus/client_surface_embedder.cc ('K') | « 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 8f7aa82d3847ae808b091b13292475694ff6680e..e8eb176d658945687588df3b2758f123cb437f46 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -6,6 +6,7 @@
#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::SetSurfaceIdFromServer(
}
}
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)
+ client_surface_embedder = base::MakeUnique<ClientSurfaceEmbedder>(window_);
+
+ if (surface_info)
+ client_surface_embedder->UpdateSurface(*surface_info.get());
+ else
+ client_surface_embedder.reset();
+
surface_info_ = std::move(surface_info);
}
« ui/aura/mus/client_surface_embedder.cc ('K') | « 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