OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ | 5 #ifndef UI_ANDROID_EDGE_EFFECT_H_ |
6 #define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ | 6 #define UI_ANDROID_EDGE_EFFECT_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
9 #include "content/browser/android/edge_effect_base.h" | 10 #include "ui/android/edge_effect_base.h" |
| 11 #include "ui/android/ui_android_export.h" |
10 | 12 |
11 namespace cc { | 13 namespace cc { |
12 class Layer; | 14 class Layer; |
13 } | 15 } |
14 | 16 |
15 namespace ui { | 17 namespace ui { |
16 class ResourceManager; | 18 class ResourceManager; |
17 } | 19 } |
18 | 20 |
19 namespace content { | 21 namespace ui { |
20 | 22 |
21 // |EdgeEffect| mirrors its Android counterpart, EdgeEffect.java. | 23 // |EdgeEffect| mirrors its Android counterpart, EdgeEffect.java. |
22 // Conscious tradeoffs were made to align this as closely as possible with the | 24 // Conscious tradeoffs were made to align this as closely as possible with the |
23 // the original Android java version. | 25 // the original Android java version. |
24 // All coordinates and dimensions are in device pixels. | 26 // All coordinates and dimensions are in device pixels. |
25 class EdgeEffect : public EdgeEffectBase { | 27 class UI_ANDROID_EXPORT EdgeEffect : public EdgeEffectBase { |
26 public: | 28 public: |
27 explicit EdgeEffect(ui::ResourceManager* resource_manager, | 29 explicit EdgeEffect(ui::ResourceManager* resource_manager, |
28 float device_scale_factor); | 30 float device_scale_factor); |
29 ~EdgeEffect() override; | 31 ~EdgeEffect() override; |
30 | 32 |
31 void Pull(base::TimeTicks current_time, | 33 void Pull(base::TimeTicks current_time, |
32 float delta_distance, | 34 float delta_distance, |
33 float displacement) override; | 35 float displacement) override; |
34 void Absorb(base::TimeTicks current_time, float velocity) override; | 36 void Absorb(base::TimeTicks current_time, float velocity) override; |
35 bool Update(base::TimeTicks current_time) override; | 37 bool Update(base::TimeTicks current_time) override; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 base::TimeTicks start_time_; | 74 base::TimeTicks start_time_; |
73 base::TimeDelta duration_; | 75 base::TimeDelta duration_; |
74 | 76 |
75 State state_; | 77 State state_; |
76 | 78 |
77 float pull_distance_; | 79 float pull_distance_; |
78 | 80 |
79 DISALLOW_COPY_AND_ASSIGN(EdgeEffect); | 81 DISALLOW_COPY_AND_ASSIGN(EdgeEffect); |
80 }; | 82 }; |
81 | 83 |
82 } // namespace content | 84 } // namespace ui |
83 | 85 |
84 #endif // CONTENT_BROWSER_ANDROID_EDGE_EFFECT_H_ | 86 #endif // UI_ANDROID_EDGE_EFFECT_H_ |
OLD | NEW |