| 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void FrameSizeButton::SetButtonsToNormalMode( | 275 void FrameSizeButton::SetButtonsToNormalMode( |
| 276 FrameSizeButtonDelegate::Animate animate) { | 276 FrameSizeButtonDelegate::Animate animate) { |
| 277 in_snap_mode_ = false; | 277 in_snap_mode_ = false; |
| 278 snap_type_ = SNAP_NONE; | 278 snap_type_ = SNAP_NONE; |
| 279 set_buttons_to_snap_mode_timer_.Stop(); | 279 set_buttons_to_snap_mode_timer_.Stop(); |
| 280 delegate_->SetButtonsToNormal(animate); | 280 delegate_->SetButtonsToNormal(animate); |
| 281 phantom_window_controller_.reset(); | 281 phantom_window_controller_.reset(); |
| 282 } | 282 } |
| 283 | 283 |
| 284 } // namespace ash | 284 } // namespace ash |
| OLD | NEW |