Chromium Code Reviews| Index: components/exo/shell_surface.h |
| diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h |
| index 74ff30d1f6ff44122b53828e07ff33c83e6d8ddc..b862c5e6faef02dc6801fec9864f65ff7bc641dd 100644 |
| --- a/components/exo/shell_surface.h |
| +++ b/components/exo/shell_surface.h |
| @@ -45,7 +45,8 @@ class ShellSurface : public SurfaceDelegate, |
| public ash::wm::WindowStateObserver, |
| public aura::WindowObserver, |
| public WMHelper::ActivationObserver, |
| - public WMHelper::AccessibilityObserver { |
| + public WMHelper::AccessibilityObserver, |
| + public WMHelper::DisplayConfigurationObserver { |
| public: |
| enum class BoundsMode { SHELL, CLIENT, FIXED }; |
| @@ -80,6 +81,12 @@ class ShellSurface : public SurfaceDelegate, |
| surface_destroyed_callback_ = surface_destroyed_callback; |
| } |
| + // Set the callback to run when the display configuration changed. |
| + void set_display_config_changed_callback( |
| + const base::Closure& display_config_changed_callback) { |
| + display_config_changed_callback_ = display_config_changed_callback; |
| + } |
| + |
| // Set the callback to run when the surface state changed. |
| using StateChangedCallback = |
| base::Callback<void(ash::wm::WindowStateType old_state_type, |
| @@ -250,6 +257,9 @@ class ShellSurface : public SurfaceDelegate, |
| // Overridden from WMHelper::AccessibilityObserver: |
| void OnAccessibilityModeChanged() override; |
| + // Overridden from WMHelper::DisplayConfigurationObserver: |
| + void OnDisplayConfigurationChanged() override; |
| + |
| // Overridden from ui::EventHandler: |
| void OnKeyEvent(ui::KeyEvent* event) override; |
| void OnMouseEvent(ui::MouseEvent* event) override; |
| @@ -280,6 +290,8 @@ class ShellSurface : public SurfaceDelegate, |
| // Asks the client to configure its surface. |
| void Configure(); |
| + aura::Window* GetDragWindow() const; |
|
reveman
2017/03/06 19:02:13
Can this be private? nit: please add a comment exp
Dominik Laskowski
2017/03/08 23:13:23
Already private. Done.
|
| + |
| // Attempt to start a drag operation. The type of drag operation to start is |
| // determined by |component|. |
| void AttemptToStartDrag(int component); |
| @@ -307,6 +319,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_; |
| @@ -327,6 +342,7 @@ class ShellSurface : public SurfaceDelegate, |
| double pending_scale_ = 1.0; |
| base::Closure close_callback_; |
| base::Closure surface_destroyed_callback_; |
| + base::Closure display_config_changed_callback_; |
| StateChangedCallback state_changed_callback_; |
| ConfigureCallback configure_callback_; |
| ScopedConfigure* scoped_configure_ = nullptr; |