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 7d95d335e5fd3332b1729a9ec6c4db493b554e1b..7dc9ca341db5a1eed8c6b20b7f3f0be9bfef041c 100644 |
--- a/ash/wm/workspace/frame_maximize_button.h |
+++ b/ash/wm/workspace/frame_maximize_button.h |
@@ -34,6 +34,8 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton { |
virtual SkBitmap GetImageToPaint() OVERRIDE; |
private: |
+ class EscapeEventFilter; |
+ |
// Where to snap to. |
enum SnapType { |
SNAP_LEFT, |
@@ -43,6 +45,13 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton { |
SNAP_NONE |
}; |
+ // Cancels snap behavior. |
+ void Cancel(); |
+ |
+ // Installs/uninstalls an EventFilter to track when escape is pressed. |
+ 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); |
@@ -73,6 +82,8 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton { |
// Current snap type. |
SnapType snap_type_; |
+ scoped_ptr<EscapeEventFilter> escape_event_filter_; |
+ |
DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); |
}; |