Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: ui/android/edge_effect.h

Issue 1419123002: android: move overscroll effects to ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix exports for component build Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/android/animation_utils.h ('k') | ui/android/edge_effect.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « ui/android/animation_utils.h ('k') | ui/android/edge_effect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698