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

Side by Side Diff: content/browser/android/edge_effect_base.h

Issue 367173003: [Android] Implementation of overscroll effect for Android L (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Write event location through DidOverscrollParams Created 6 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_ANDROID_EDGE_EFFECT_BASE_H_
6 #define CONTENT_BROWSER_ANDROID_EDGE_EFFECT_BASE_H_
7
8 #include "base/basictypes.h"
9 #include "base/time/time.h"
10 #include "ui/gfx/geometry/size_f.h"
11 #include "ui/gfx/transform.h"
12
13 namespace cc {
14 class Layer;
15 }
16
17 namespace content {
18
19 // A base class for overscroll-related Android effects.
20 class EdgeEffectBase {
21 public:
22 enum State {
23 STATE_IDLE = 0,
24 STATE_PULL,
25 STATE_ABSORB,
26 STATE_RECEDE,
27 STATE_PULL_DECAY
28 };
29
30 virtual ~EdgeEffectBase() {}
31
32 virtual void Pull(base::TimeTicks current_time, float delta_distance) = 0;
aelias_OOO_until_Jul13 2014/08/14 22:54:19 This variant seems unnecessary, can we remove it?
jdduke (slow) 2014/08/15 19:15:06 Yeah, looks like they kept it in the Android frame
33 virtual void Pull(base::TimeTicks current_time,
34 float delta_distance,
35 float displacement) = 0;
36 virtual void Absorb(base::TimeTicks current_time, float velocity) = 0;
37 virtual bool Update(base::TimeTicks current_time) = 0;
38 virtual void Release(base::TimeTicks current_time) = 0;
39
40 virtual void Finish() = 0;
41 virtual bool IsFinished() const = 0;
42
43 virtual void ApplyToLayers(const gfx::SizeF& size,
44 const gfx::Transform& transform) = 0;
45 virtual void SetParent(cc::Layer* parent) = 0;
46 };
47
48 } // namespace content
49
50 #endif // CONTENT_BROWSER_ANDROID_EDGE_EFFECT_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698