| Index: components/exo/shell_surface.h
|
| diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
|
| index 20b6d5b2dd0fc2a0c22a7a5ac6d7ed4b2e216900..089872f2606b7855c2ad6822f52861249ce4ae2c 100644
|
| --- a/components/exo/shell_surface.h
|
| +++ b/components/exo/shell_surface.h
|
| @@ -56,7 +56,8 @@ class ShellSurface : public SurfaceDelegate,
|
| //
|
| // When bounds are controlled by the client, it represents the origin of a
|
| // coordinate system to which the position of the shell surface, specified
|
| - // as part of the geometry, is relative.
|
| + // as part of the geometry, is relative. The client must acknowledge changes
|
| + // to the origin, and offset the geometry accordingly.
|
| ShellSurface(Surface* surface,
|
| ShellSurface* parent,
|
| BoundsMode bounds_mode,
|
| @@ -73,6 +74,11 @@ class ShellSurface : public SurfaceDelegate,
|
| close_callback_ = close_callback;
|
| }
|
|
|
| + // Set the callback to run when the shell surface is destroyed.
|
| + void set_destroyed_callback(const base::Closure& destroyed_callback) {
|
| + destroyed_callback_ = destroyed_callback;
|
| + }
|
| +
|
| // Set the callback to run when the surface is destroyed.
|
| void set_surface_destroyed_callback(
|
| const base::Closure& surface_destroyed_callback) {
|
| @@ -96,7 +102,8 @@ class ShellSurface : public SurfaceDelegate,
|
| base::Callback<uint32_t(const gfx::Size& size,
|
| ash::wm::WindowStateType state_type,
|
| bool resizing,
|
| - bool activated)>;
|
| + bool activated,
|
| + const gfx::Point& origin)>;
|
| void set_configure_callback(const ConfigureCallback& configure_callback) {
|
| configure_callback_ = configure_callback;
|
| }
|
| @@ -282,8 +289,12 @@ class ShellSurface : public SurfaceDelegate,
|
| // determined by |component|.
|
| void AttemptToStartDrag(int component);
|
|
|
| + // Attempt to start a client-driven drag operation.
|
| + void AttemptToStartClientDrag();
|
| +
|
| // End current drag operation.
|
| void EndDrag(bool revert);
|
| + void EndDrag(aura::Window* window, bool revert);
|
|
|
| // Returns true if surface is currently being resized.
|
| bool IsResizing() const;
|
| @@ -305,6 +316,9 @@ class ShellSurface : public SurfaceDelegate,
|
| // |pending_shadow_content_bounds_|.
|
| void UpdateShadow();
|
|
|
| + // In the coordinate system of the parent root window.
|
| + gfx::Point GetMouseLocation() const;
|
| +
|
| views::Widget* widget_ = nullptr;
|
| Surface* surface_;
|
| aura::Window* parent_;
|
| @@ -324,6 +338,7 @@ class ShellSurface : public SurfaceDelegate,
|
| double scale_ = 1.0;
|
| double pending_scale_ = 1.0;
|
| base::Closure close_callback_;
|
| + base::Closure destroyed_callback_;
|
| base::Closure surface_destroyed_callback_;
|
| StateChangedCallback state_changed_callback_;
|
| ConfigureCallback configure_callback_;
|
|
|