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

Unified Diff: components/exo/shell_surface.h

Issue 2645663004: exo: Initial support for multiple displays in ARC (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « no previous file | components/exo/shell_surface.cc » ('j') | components/exo/shell_surface.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.h
diff --git a/components/exo/shell_surface.h b/components/exo/shell_surface.h
index 74ff30d1f6ff44122b53828e07ff33c83e6d8ddc..a43565da38f122c4cf726e71755a449491f35fc0 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;
@@ -284,8 +294,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;
@@ -307,6 +321,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 +344,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;
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | components/exo/shell_surface.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698