| 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/maximize_bubble_frame_state.h" |
| 9 #include "ash/wm/workspace/snap_types.h" | 10 #include "ash/wm/workspace/snap_types.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/timer.h" | 12 #include "base/timer.h" |
| 12 #include "ui/aura/window_observer.h" | 13 #include "ui/aura/window_observer.h" |
| 13 #include "ui/views/controls/button/image_button.h" | 14 #include "ui/views/controls/button/image_button.h" |
| 14 | 15 |
| 15 namespace views { | 16 namespace views { |
| 16 class NonClientFrameView; | 17 class NonClientFrameView; |
| 17 } | 18 } |
| 18 | 19 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 gfx::Rect ScreenBoundsForType(SnapType type, | 111 gfx::Rect ScreenBoundsForType(SnapType type, |
| 111 const internal::SnapSizer& snap_sizer) const; | 112 const internal::SnapSizer& snap_sizer) const; |
| 112 | 113 |
| 113 // Converts location to screen coordinates and returns it. These are the | 114 // Converts location to screen coordinates and returns it. These are the |
| 114 // coordinates used by the SnapSizer. | 115 // coordinates used by the SnapSizer. |
| 115 gfx::Point LocationForSnapSizer(const gfx::Point& location) const; | 116 gfx::Point LocationForSnapSizer(const gfx::Point& location) const; |
| 116 | 117 |
| 117 // Snaps the window to the current snap position. | 118 // Snaps the window to the current snap position. |
| 118 void Snap(const internal::SnapSizer& snap_sizer); | 119 void Snap(const internal::SnapSizer& snap_sizer); |
| 119 | 120 |
| 121 // Determine the maximize type of this window. |
| 122 MaximizeBubbleFrameState GetMaximizeBubbleFrameState() const; |
| 123 |
| 120 // Frame that the maximize button acts on. | 124 // Frame that the maximize button acts on. |
| 121 views::NonClientFrameView* frame_; | 125 views::NonClientFrameView* frame_; |
| 122 | 126 |
| 123 // Renders the snap position. | 127 // Renders the snap position. |
| 124 scoped_ptr<internal::PhantomWindowController> phantom_window_; | 128 scoped_ptr<internal::PhantomWindowController> phantom_window_; |
| 125 | 129 |
| 126 // Is snapping enabled? Set on press so that in drag we know whether we | 130 // Is snapping enabled? Set on press so that in drag we know whether we |
| 127 // should show the snap locations. | 131 // should show the snap locations. |
| 128 bool is_snap_enabled_; | 132 bool is_snap_enabled_; |
| 129 | 133 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 149 | 153 |
| 150 // The delay of the bubble appearance. | 154 // The delay of the bubble appearance. |
| 151 int bubble_appearance_delay_ms_; | 155 int bubble_appearance_delay_ms_; |
| 152 | 156 |
| 153 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); | 157 DISALLOW_COPY_AND_ASSIGN(FrameMaximizeButton); |
| 154 }; | 158 }; |
| 155 | 159 |
| 156 } // namespace ash | 160 } // namespace ash |
| 157 | 161 |
| 158 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ | 162 #endif // ASH_WM_WORKSPACE_FRAME_MAXIMIZE_BUTTON_H_ |
| OLD | NEW |