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

Unified Diff: ui/aura/mus/window_mus.h

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_mus.h
diff --git a/ui/aura/mus/window_mus.h b/ui/aura/mus/window_mus.h
index d9657966e64f4bcdf55f5ddd7b7fb66f5a1ed53c..c39baa2dd0f68671d67e8515565f3b55160704a8 100644
--- a/ui/aura/mus/window_mus.h
+++ b/ui/aura/mus/window_mus.h
@@ -16,6 +16,7 @@
namespace gfx {
class Rect;
+class Vector2d;
}
namespace ui {
@@ -30,6 +31,11 @@ struct SurfaceInfo;
class Window;
class WindowTreeClient;
+// See PrepareForServerBoundsChange() for details on this.
+struct AURA_EXPORT WindowMusChangeData {
+ virtual ~WindowMusChangeData() {}
+};
+
// WindowMus defines the interface used by WindowTreeClient to modify
// the underlying Window. It's defined as a separate interface to make it clear
// that any changes that WindowTreeClient makes must be propagated through
@@ -72,6 +78,16 @@ class AURA_EXPORT WindowMus {
virtual void SetSurfaceIdFromServer(
std::unique_ptr<SurfaceInfo> surface_info) = 0;
+ // Called in the rare case when WindowTreeClient needs to state and can't go
sadrul 2016/10/27 20:26:17 "...needs to +change state"?
sky 2016/10/27 22:15:04 Done.
+ // through one of the SetFooFromServer() functions above. Generally because
+ // it needs to call another function that as a side effect changes the window.
+ // Once the call to the underlying window has completed the returned object
+ // should be destroyed.
+ virtual std::unique_ptr<WindowMusChangeData> PrepareForServerBoundsChange(
+ const gfx::Rect& bounds) = 0;
+ virtual std::unique_ptr<WindowMusChangeData> PrepareForServerVisibilityChange(
sadrul 2016/10/27 20:26:17 It doesn't look like the visibility one is being u
sky 2016/10/27 22:15:04 It should have. I added test coverage, which uncov
+ bool value) = 0;
+
virtual void NotifyEmbeddedAppDisconnected() = 0;
private:

Powered by Google App Engine
This is Rietveld 408576698