| 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_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ | 5 #ifndef ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ |
| 6 #define ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ | 6 #define ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> |
| 9 |
| 8 #include "base/macros.h" | 10 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "base/timer/timer.h" | 11 #include "base/timer/timer.h" |
| 11 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 12 #include "ui/gfx/animation/linear_animation.h" | 13 #include "ui/gfx/animation/linear_animation.h" |
| 13 #include "ui/gfx/geometry/point.h" | 14 #include "ui/gfx/geometry/point.h" |
| 14 | 15 |
| 15 namespace ui { | 16 namespace ui { |
| 16 class GestureEvent; | 17 class GestureEvent; |
| 17 } | 18 } |
| 18 | 19 |
| 19 namespace ash { | 20 namespace ash { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 void StopAffordance(); | 54 void StopAffordance(); |
| 54 void SetTapDownTarget(aura::Window* target); | 55 void SetTapDownTarget(aura::Window* target); |
| 55 | 56 |
| 56 // Overridden from gfx::LinearAnimation. | 57 // Overridden from gfx::LinearAnimation. |
| 57 void AnimateToState(double state) override; | 58 void AnimateToState(double state) override; |
| 58 void AnimationStopped() override; | 59 void AnimationStopped() override; |
| 59 | 60 |
| 60 // Overridden from aura::WindowObserver. | 61 // Overridden from aura::WindowObserver. |
| 61 void OnWindowDestroying(aura::Window* window) override; | 62 void OnWindowDestroying(aura::Window* window) override; |
| 62 | 63 |
| 63 scoped_ptr<LongPressAffordanceView> view_; | 64 std::unique_ptr<LongPressAffordanceView> view_; |
| 64 gfx::Point tap_down_location_; | 65 gfx::Point tap_down_location_; |
| 65 base::OneShotTimer timer_; | 66 base::OneShotTimer timer_; |
| 66 aura::Window* tap_down_target_; | 67 aura::Window* tap_down_target_; |
| 67 LongPressAnimationType current_animation_type_; | 68 LongPressAnimationType current_animation_type_; |
| 68 | 69 |
| 69 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceHandler); | 70 DISALLOW_COPY_AND_ASSIGN(LongPressAffordanceHandler); |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 } // namespace ash | 73 } // namespace ash |
| 73 | 74 |
| 74 #endif // ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ | 75 #endif // ASH_WM_GESTURES_LONG_PRESS_AFFORDANCE_HANDLER_H_ |
| OLD | NEW |