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

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

Issue 2456623002: Fixes to WindowTreeHostMus (Closed)
Patch Set: merge Created 4 years, 2 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') | ui/aura/mus/window_tree_client.h » ('j') | 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 e3742929a4d7fdacadf642afde94c480a5c27127..86431fb1c59238635e1e1f19413b027203e2ea37 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -15,13 +15,18 @@
namespace aura {
+WindowPortMus::WindowMusChangeDataImpl::WindowMusChangeDataImpl() = default;
+
+WindowPortMus::WindowMusChangeDataImpl::~WindowMusChangeDataImpl() = default;
+
// static
WindowMus* WindowMus::Get(Window* window) {
return WindowPortMus::Get(window);
}
-WindowPortMus::WindowPortMus(WindowTreeClient* client)
- : window_tree_client_(client) {}
+WindowPortMus::WindowPortMus(WindowTreeClient* client,
+ bool create_remote_window)
+ : WindowMus(create_remote_window), window_tree_client_(client) {}
WindowPortMus::~WindowPortMus() {
if (surface_info_)
@@ -207,6 +212,28 @@ void WindowPortMus::SetSurfaceIdFromServer(
surface_info_ = std::move(surface_info);
}
+std::unique_ptr<WindowMusChangeData>
+WindowPortMus::PrepareForServerBoundsChange(const gfx::Rect& bounds) {
+ std::unique_ptr<WindowMusChangeDataImpl> data(
+ base::MakeUnique<WindowMusChangeDataImpl>());
+ ServerChangeData change_data;
+ change_data.bounds = bounds;
+ data->change = base::MakeUnique<ScopedServerChange>(
+ this, ServerChangeType::BOUNDS, change_data);
+ return std::move(data);
+}
+
+std::unique_ptr<WindowMusChangeData>
+WindowPortMus::PrepareForServerVisibilityChange(bool value) {
+ std::unique_ptr<WindowMusChangeDataImpl> data(
+ base::MakeUnique<WindowMusChangeDataImpl>());
+ ServerChangeData change_data;
+ change_data.visible = value;
+ data->change = base::MakeUnique<ScopedServerChange>(
+ this, ServerChangeType::VISIBLE, change_data);
+ return std::move(data);
+}
+
void WindowPortMus::NotifyEmbeddedAppDisconnected() {
for (WindowObserver& observer : *GetObservers(window_))
observer.OnEmbeddedAppDisconnected(window_);
« no previous file with comments | « ui/aura/mus/window_port_mus.h ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698