Index: ash/wm/workspace/frame_maximize_button.h |
diff --git a/ash/wm/workspace/frame_maximize_button.h b/ash/wm/workspace/frame_maximize_button.h |
index 7dc9ca341db5a1eed8c6b20b7f3f0be9bfef041c..1a0264b9e29f2b3f372d1098291367f22b88e5c9 100644 |
--- a/ash/wm/workspace/frame_maximize_button.h |
+++ b/ash/wm/workspace/frame_maximize_button.h |
@@ -13,6 +13,7 @@ namespace ash { |
namespace internal { |
class PhantomWindowController; |
+class SnapSizer; |
} |
// Button used for the maximize control on the frame. Handles snapping logic. |
@@ -52,17 +53,19 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton { |
void InstallEventFilter(); |
void UninstallEventFilter(); |
- // Updates |snap_type_| based on a mouse drag. The parameters are relative to |
- // the mouse pressed location. |
- void UpdateSnap(int delta_x, int delta_y); |
+ // Updates |snap_type_| based on a mouse drag. |
+ void UpdateSnap(const gfx::Point& location); |
- // Returns the type of snap based on the specified coordaintes (relative to |
- // the press location). |
- SnapType SnapTypeForDelta(int delta_x, int delta_y) const; |
+ // Returns the type of snap based on the specified location. |
+ SnapType SnapTypeForLocation(const gfx::Point& location) const; |
// Returns the bounds of the resulting window for the specified type. |
gfx::Rect BoundsForType(SnapType type) const; |
+ // Converts location to screen coordinates and returns it. These are the |
+ // coordinates used by the SnapSizer. |
+ gfx::Point LocationForSnapSizer(const gfx::Point& location) const; |
+ |
// Snaps the window to the current snap position. |
void Snap(); |
@@ -82,6 +85,8 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton { |
// Current snap type. |
SnapType snap_type_; |
+ scoped_ptr<internal::SnapSizer> snap_sizer_; |
+ |
scoped_ptr<EscapeEventFilter> escape_event_filter_; |
DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); |