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 #include "ash/frame/caption_buttons/frame_size_button.h" | 5 #include "ash/frame/caption_buttons/frame_size_button.h" |
6 | 6 |
7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/touch/touch_uma.h" | 10 #include "ash/touch/touch_uma.h" |
11 #include "ash/wm/window_state.h" | 11 #include "ash/wm/window_state.h" |
12 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
13 #include "ash/wm/wm_event.h" | 13 #include "ash/wm/wm_event.h" |
14 #include "ash/wm/workspace/phantom_window_controller.h" | 14 #include "ash/wm/workspace/phantom_window_controller.h" |
15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
16 #include "ui/gfx/vector2d.h" | 16 #include "ui/gfx/geometry/vector2d.h" |
17 #include "ui/views/widget/widget.h" | 17 #include "ui/views/widget/widget.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // The default delay between the user pressing the size button and the buttons | 21 // The default delay between the user pressing the size button and the buttons |
22 // adjacent to the size button morphing into buttons for snapping left and | 22 // adjacent to the size button morphing into buttons for snapping left and |
23 // right. | 23 // right. |
24 const int kSetButtonsToSnapModeDelayMs = 150; | 24 const int kSetButtonsToSnapModeDelayMs = 150; |
25 | 25 |
26 // The amount that a user can overshoot one of the caption buttons while in | 26 // The amount that a user can overshoot one of the caption buttons while in |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 void FrameSizeButton::SetButtonsToNormalMode( | 277 void FrameSizeButton::SetButtonsToNormalMode( |
278 FrameSizeButtonDelegate::Animate animate) { | 278 FrameSizeButtonDelegate::Animate animate) { |
279 in_snap_mode_ = false; | 279 in_snap_mode_ = false; |
280 snap_type_ = SNAP_NONE; | 280 snap_type_ = SNAP_NONE; |
281 set_buttons_to_snap_mode_timer_.Stop(); | 281 set_buttons_to_snap_mode_timer_.Stop(); |
282 delegate_->SetButtonsToNormal(animate); | 282 delegate_->SetButtonsToNormal(animate); |
283 phantom_window_controller_.reset(); | 283 phantom_window_controller_.reset(); |
284 } | 284 } |
285 | 285 |
286 } // namespace ash | 286 } // namespace ash |
OLD | NEW |