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 UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_H_ | 5 #ifndef UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_H_ |
6 #define UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_H_ | 6 #define UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_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 "ui/gfx/animation/animation_delegate.h" | 11 #include "ui/gfx/animation/animation_delegate.h" |
11 #include "ui/views/views_export.h" | 12 #include "ui/views/views_export.h" |
12 | 13 |
13 namespace gfx { | 14 namespace gfx { |
14 class SlideAnimation; | 15 class SlideAnimation; |
15 } | 16 } |
16 | 17 |
17 namespace views { | 18 namespace views { |
18 | 19 |
19 class VIEWS_EXPORT ScrollDelegate { | 20 class VIEWS_EXPORT ScrollDelegate { |
(...skipping 26 matching lines...) Expand all Loading... |
46 void AnimationCanceled(const gfx::Animation* animation) override; | 47 void AnimationCanceled(const gfx::Animation* animation) override; |
47 | 48 |
48 ScrollDelegate* delegate_; | 49 ScrollDelegate* delegate_; |
49 | 50 |
50 float velocity_x_; | 51 float velocity_x_; |
51 float velocity_y_; | 52 float velocity_y_; |
52 float last_t_; | 53 float last_t_; |
53 float duration_; | 54 float duration_; |
54 float acceleration_; | 55 float acceleration_; |
55 | 56 |
56 scoped_ptr<gfx::SlideAnimation> animation_; | 57 std::unique_ptr<gfx::SlideAnimation> animation_; |
57 | 58 |
58 DISALLOW_COPY_AND_ASSIGN(ScrollAnimator); | 59 DISALLOW_COPY_AND_ASSIGN(ScrollAnimator); |
59 }; | 60 }; |
60 | 61 |
61 } // namespace views | 62 } // namespace views |
62 | 63 |
63 #endif // UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_H_ | 64 #endif // UI_VIEWS_ANIMATION_SCROLL_ANIMATOR_H_ |
OLD | NEW |