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

Side by Side Diff: ui/android/edge_effect_l.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, 2 months 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/edge_effect_base.cc ('k') | ui/android/edge_effect_l.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 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 #ifndef CONTENT_BROWSER_ANDROID_EDGE_EFFECT_L_H_ 5 #ifndef UI_ANDROID_EDGE_EFFECT_L_H_
6 #define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_L_H_ 6 #define UI_ANDROID_EDGE_EFFECT_L_H_
7 7
8 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
10 #include "content/browser/android/edge_effect_base.h" 11 #include "ui/android/edge_effect_base.h"
12 #include "ui/android/ui_android_export.h"
11 #include "ui/gfx/geometry/rect_f.h" 13 #include "ui/gfx/geometry/rect_f.h"
12 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
13 15
14 namespace cc { 16 namespace cc {
15 class Layer; 17 class Layer;
16 class UIResourceLayer; 18 class UIResourceLayer;
17 } 19 }
18 20
19 namespace ui { 21 namespace ui {
20 class ResourceManager; 22 class ResourceManager;
21 } 23 }
22 24
23 namespace content { 25 namespace ui {
24 26
25 // |EdgeEffectL| mirrors its Android L counterpart, EdgeEffect.java. 27 // |EdgeEffectL| mirrors its Android L counterpart, EdgeEffect.java.
26 // Conscious tradeoffs were made to align this as closely as possible with the 28 // Conscious tradeoffs were made to align this as closely as possible with the
27 // the original Android java version. 29 // the original Android java version.
28 // All coordinates and dimensions are in device pixels. 30 // All coordinates and dimensions are in device pixels.
29 class EdgeEffectL : public EdgeEffectBase { 31 class UI_ANDROID_EXPORT EdgeEffectL : public EdgeEffectBase {
30 public: 32 public:
31 explicit EdgeEffectL(ui::ResourceManager* resource_manager); 33 explicit EdgeEffectL(ui::ResourceManager* resource_manager);
32 ~EdgeEffectL() override; 34 ~EdgeEffectL() override;
33 35
34 void Pull(base::TimeTicks current_time, 36 void Pull(base::TimeTicks current_time,
35 float delta_distance, 37 float delta_distance,
36 float displacement) override; 38 float displacement) override;
37 void Absorb(base::TimeTicks current_time, float velocity) override; 39 void Absorb(base::TimeTicks current_time, float velocity) override;
38 bool Update(base::TimeTicks current_time) override; 40 bool Update(base::TimeTicks current_time) override;
39 void Release(base::TimeTicks current_time) override; 41 void Release(base::TimeTicks current_time) override;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 base::TimeTicks start_time_; 73 base::TimeTicks start_time_;
72 base::TimeDelta duration_; 74 base::TimeDelta duration_;
73 75
74 State state_; 76 State state_;
75 77
76 float pull_distance_; 78 float pull_distance_;
77 79
78 DISALLOW_COPY_AND_ASSIGN(EdgeEffectL); 80 DISALLOW_COPY_AND_ASSIGN(EdgeEffectL);
79 }; 81 };
80 82
81 } // namespace content 83 } // namespace ui
82 84
83 #endif // CONTENT_BROWSER_ANDROID_EDGE_EFFECT_L_H_ 85 #endif // UI_ANDROID_EDGE_EFFECT_L_H_
OLDNEW
« no previous file with comments | « ui/android/edge_effect_base.cc ('k') | ui/android/edge_effect_l.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698