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

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

Issue 2456623002: Fixes to WindowTreeHostMus (Closed)
Patch Set: std::move 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
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..e437b5e2c80b9ffbd97812b36fdfcf653d946150 100644
--- a/ui/aura/mus/window_port_mus.cc
+++ b/ui/aura/mus/window_port_mus.cc
@@ -15,6 +15,10 @@
namespace aura {
+WindowPortMus::WindowMusChangeDataImpl::WindowMusChangeDataImpl() = default;
+
+WindowPortMus::WindowMusChangeDataImpl::~WindowMusChangeDataImpl() = default;
+
// static
WindowMus* WindowMus::Get(Window* window) {
return WindowPortMus::Get(window);
@@ -207,6 +211,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_);

Powered by Google App Engine
This is Rietveld 408576698