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

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

Issue 993613007: [Android] Add slack to allow refresh after overscrolling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 9 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
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 CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 5 #ifndef CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 6 #define CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void UpdateDisplay(const gfx::SizeF& viewport_size, 62 void UpdateDisplay(const gfx::SizeF& viewport_size,
63 const gfx::SizeF& content_size, 63 const gfx::SizeF& content_size,
64 const gfx::Vector2dF& content_scroll_offset); 64 const gfx::Vector2dF& content_scroll_offset);
65 65
66 // Reset the effect to its inactive state, clearing any active effects. 66 // Reset the effect to its inactive state, clearing any active effects.
67 void Reset(); 67 void Reset();
68 68
69 // Whether the effect is active, either being pulled or receding. 69 // Whether the effect is active, either being pulled or receding.
70 bool IsActive() const; 70 bool IsActive() const;
71 71
72 // The maximum alpha value (in the range [0,1]) of any animated edge layers.
73 // If the effect is inactive, this will be 0.
74 float GetVisibleAlpha() const;
75
72 private: 76 private:
73 enum Axis { AXIS_X, AXIS_Y }; 77 enum Axis { AXIS_X, AXIS_Y };
74 78
75 // Returns whether the effect has been properly initialized. 79 // Returns whether the effect has been properly initialized.
76 bool InitializeIfNecessary(); 80 bool InitializeIfNecessary();
77 bool CheckNeedsAnimate(); 81 bool CheckNeedsAnimate();
78 void UpdateLayerAttachment(cc::Layer* parent); 82 void UpdateLayerAttachment(cc::Layer* parent);
79 void Detach(); 83 void Detach();
80 void Pull(base::TimeTicks current_time, 84 void Pull(base::TimeTicks current_time,
81 const gfx::Vector2dF& overscroll_delta, 85 const gfx::Vector2dF& overscroll_delta,
(...skipping 14 matching lines...) Expand all
96 bool initialized_; 100 bool initialized_;
97 101
98 scoped_refptr<cc::Layer> root_layer_; 102 scoped_refptr<cc::Layer> root_layer_;
99 103
100 DISALLOW_COPY_AND_ASSIGN(OverscrollGlow); 104 DISALLOW_COPY_AND_ASSIGN(OverscrollGlow);
101 }; 105 };
102 106
103 } // namespace content 107 } // namespace content
104 108
105 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_ 109 #endif // CONTENT_BROWSER_ANDROID_OVERSCROLL_GLOW_H_
OLDNEW
« no previous file with comments | « content/browser/android/overscroll_controller_android.cc ('k') | content/browser/android/overscroll_glow.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698