OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 5 #ifndef ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 6 #define ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ash/wm/workspace/snap_types.h" | 9 #include "ash/wm/workspace/snap_types.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 // Returns true when the user clicks and drags the button. | 47 // Returns true when the user clicks and drags the button. |
48 bool is_snap_enabled() const { return is_snap_enabled_; } | 48 bool is_snap_enabled() const { return is_snap_enabled_; } |
49 | 49 |
50 // WindowObserver overrides: | 50 // WindowObserver overrides: |
51 virtual void OnWindowBoundsChanged(aura::Window* window, | 51 virtual void OnWindowBoundsChanged(aura::Window* window, |
52 const gfx::Rect& old_bounds, | 52 const gfx::Rect& old_bounds, |
53 const gfx::Rect& new_bounds) OVERRIDE; | 53 const gfx::Rect& new_bounds) OVERRIDE; |
54 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; | 54 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE; |
55 | 55 |
56 // ImageButton overrides: | 56 // ImageButton overrides: |
57 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 57 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
58 virtual void OnMouseEntered(const views::MouseEvent& event) OVERRIDE; | 58 virtual void OnMouseEntered(const ui::MouseEvent& event) OVERRIDE; |
59 virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE; | 59 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; |
60 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 60 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; |
61 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 61 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
62 virtual void OnMouseCaptureLost() OVERRIDE; | 62 virtual void OnMouseCaptureLost() OVERRIDE; |
63 virtual ui::GestureStatus OnGestureEvent( | 63 virtual ui::GestureStatus OnGestureEvent( |
64 const views::GestureEvent& event) OVERRIDE; | 64 const views::GestureEvent& event) OVERRIDE; |
65 | 65 |
66 private: | 66 private: |
67 class EscapeEventFilter; | 67 class EscapeEventFilter; |
68 | 68 |
69 // Initializes the snap-gesture based on the event. This should only be called | 69 // Initializes the snap-gesture based on the event. This should only be called |
70 // when the event is confirmed to have started a snap gesture. | 70 // when the event is confirmed to have started a snap gesture. |
71 void ProcessStartEvent(const ui::LocatedEvent& event); | 71 void ProcessStartEvent(const ui::LocatedEvent& event); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 base::OneShotTimer<FrameMaximizeButton> update_timer_; | 135 base::OneShotTimer<FrameMaximizeButton> update_timer_; |
136 | 136 |
137 scoped_ptr<MaximizeBubbleController> maximizer_; | 137 scoped_ptr<MaximizeBubbleController> maximizer_; |
138 | 138 |
139 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); | 139 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); |
140 }; | 140 }; |
141 | 141 |
142 } // namespace ash | 142 } // namespace ash |
143 | 143 |
144 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 144 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
OLD | NEW |