| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ | 5 #ifndef ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ |
| 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ | 6 #define ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/frame/caption_buttons/frame_caption_button.h" | 9 #include "ash/frame/caption_buttons/frame_caption_button.h" |
| 10 #include "ash/frame/caption_buttons/frame_size_button_delegate.h" | 10 #include "ash/frame/caption_buttons/frame_size_button_delegate.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 // Location of the event which started |set_buttons_to_snap_mode_timer_| in | 91 // Location of the event which started |set_buttons_to_snap_mode_timer_| in |
| 92 // view coordinates. | 92 // view coordinates. |
| 93 gfx::Point set_buttons_to_snap_mode_timer_event_location_; | 93 gfx::Point set_buttons_to_snap_mode_timer_event_location_; |
| 94 | 94 |
| 95 // The delay between the user pressing the size button and the buttons | 95 // The delay between the user pressing the size button and the buttons |
| 96 // adjacent to the size button morphing into buttons for snapping left and | 96 // adjacent to the size button morphing into buttons for snapping left and |
| 97 // right. | 97 // right. |
| 98 int set_buttons_to_snap_mode_delay_ms_; | 98 int set_buttons_to_snap_mode_delay_ms_; |
| 99 | 99 |
| 100 base::OneShotTimer<FrameSizeButton> set_buttons_to_snap_mode_timer_; | 100 base::OneShotTimer set_buttons_to_snap_mode_timer_; |
| 101 | 101 |
| 102 // Whether the buttons adjacent to the size button snap the window left and | 102 // Whether the buttons adjacent to the size button snap the window left and |
| 103 // right. | 103 // right. |
| 104 bool in_snap_mode_; | 104 bool in_snap_mode_; |
| 105 | 105 |
| 106 // The action to execute when the drag/click is ended. If | 106 // The action to execute when the drag/click is ended. If |
| 107 // |snap_type_| == SNAP_NONE, the size button's default action is run when the | 107 // |snap_type_| == SNAP_NONE, the size button's default action is run when the |
| 108 // drag/click is ended. | 108 // drag/click is ended. |
| 109 SnapType snap_type_; | 109 SnapType snap_type_; |
| 110 | 110 |
| 111 // Displays a preview of how the window's bounds will change as a result of | 111 // Displays a preview of how the window's bounds will change as a result of |
| 112 // snapping the window left or right. The preview is only visible if the snap | 112 // snapping the window left or right. The preview is only visible if the snap |
| 113 // left or snap right button is pressed. | 113 // left or snap right button is pressed. |
| 114 scoped_ptr<PhantomWindowController> phantom_window_controller_; | 114 scoped_ptr<PhantomWindowController> phantom_window_controller_; |
| 115 | 115 |
| 116 DISALLOW_COPY_AND_ASSIGN(FrameSizeButton); | 116 DISALLOW_COPY_AND_ASSIGN(FrameSizeButton); |
| 117 }; | 117 }; |
| 118 | 118 |
| 119 } // namespace ash | 119 } // namespace ash |
| 120 | 120 |
| 121 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ | 121 #endif // ASH_FRAME_CAPTION_BUTTONS_FRAME_SIZE_BUTTON_H_ |
| OLD | NEW |