| 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 0124c2f4159d92d5c4799c1e4a4688c292e3a654..67559b96a88b05b5f56e95c8ea68e8f5cd9ce5be 100644
|
| --- a/ash/wm/workspace/frame_maximize_button.h
|
| +++ b/ash/wm/workspace/frame_maximize_button.h
|
| @@ -21,9 +21,21 @@ class PhantomWindowController;
|
| class SnapSizer;
|
| }
|
|
|
| +class MaximizeBubble;
|
| +
|
| // Button used for the maximize control on the frame. Handles snapping logic.
|
| class ASH_EXPORT FrameMaximizeButton : public views::ImageButton {
|
| public:
|
| + // Where to snap to.
|
| + enum SnapType {
|
| + SNAP_LEFT,
|
| + SNAP_RIGHT,
|
| + SNAP_MAXIMIZE,
|
| + SNAP_MINIMIZE,
|
| + SNAP_RESTORE,
|
| + SNAP_NONE
|
| + };
|
| +
|
| FrameMaximizeButton(views::ButtonListener* listener,
|
| views::NonClientFrameView* frame);
|
| virtual ~FrameMaximizeButton();
|
| @@ -38,6 +50,22 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton {
|
| virtual ui::GestureStatus OnGestureEvent(
|
| const views::GestureEvent& event) OVERRIDE;
|
|
|
| + // Updates |snap_type_| based on a a given snap type. This is used by
|
| + // external hover events from the button menu.
|
| + void SnapButtonHovered(SnapType type);
|
| +
|
| + // The user clicked the |type| button.
|
| + void SnapButtonClicked(SnapType type);
|
| +
|
| + // The menu should reflect the user selected type.
|
| + void UpdateVisibleMenu(SnapType type);
|
| +
|
| + // Remove the maximize menu from the screen (and destroy it).
|
| + void DestroyMaximizeMenu();
|
| +
|
| + // Returns true when the user clicks and drags the button.
|
| + bool is_snap_enabled() { return is_snap_enabled_; }
|
| +
|
| protected:
|
| // ImageButton overrides:
|
| virtual gfx::ImageSkia GetImageToPaint() OVERRIDE;
|
| @@ -45,16 +73,6 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton {
|
| private:
|
| class EscapeEventFilter;
|
|
|
| - // Where to snap to.
|
| - enum SnapType {
|
| - SNAP_LEFT,
|
| - SNAP_RIGHT,
|
| - SNAP_MAXIMIZE,
|
| - SNAP_MINIMIZE,
|
| - SNAP_RESTORE,
|
| - SNAP_NONE
|
| - };
|
| -
|
| // Initializes the snap-gesture based on the event. This should only be called
|
| // when the event is confirmed to have started a snap gesture.
|
| void ProcessStartEvent(const views::LocatedEvent& event);
|
| @@ -118,6 +136,8 @@ class ASH_EXPORT FrameMaximizeButton : public views::ImageButton {
|
|
|
| base::OneShotTimer<FrameMaximizeButton> update_timer_;
|
|
|
| + scoped_ptr<MaximizeBubble> maximizer_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton);
|
| };
|
|
|
|
|