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

Unified Diff: content/browser/android/overscroll_glow.h

Issue 17413016: Fix overscroll glow when the FIP dialog is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/android/overscroll_glow.h
diff --git a/content/browser/android/overscroll_glow.h b/content/browser/android/overscroll_glow.h
index 31497cd6ffed4322e2d5051b51986dd277294fc2..93858991f4b11b47c65ee65b9d2d6528790229eb 100644
--- a/content/browser/android/overscroll_glow.h
+++ b/content/browser/android/overscroll_glow.h
@@ -33,28 +33,36 @@ class OverscrollGlow {
~OverscrollGlow();
+ // If false, the glow will be deactivated, and subsequent calls to
+ // OnOverscrolled or Animate will have no effect. Defaults to enabled.
+ void SetEnabled(bool enabled);
+
+ // |overscroll| is the accumulated overscroll for the current gesture.
+ // |velocity| is the instantaneous velocity for the overscroll.
void OnOverscrolled(base::TimeTicks current_time,
gfx::Vector2dF overscroll,
gfx::Vector2dF velocity);
+
// Returns true if the effect still needs animation ticks.
bool Animate(base::TimeTicks current_time);
- void Finish();
// Returns true if the effect needs animation ticks.
- bool IsActive() const;
+ bool NeedsAnimate() const;
// The root layer of the effect (not necessarily of the tree).
scoped_refptr<cc::Layer> root_layer() const {
return root_layer_;
}
+ // Horizontal overscroll will be ignored when false.
void set_horizontal_overscroll_enabled(bool enabled) {
horizontal_overscroll_enabled_ = enabled;
}
+ // Vertical overscroll will be ignored when false.
void set_vertical_overscroll_enabled(bool enabled) {
vertical_overscroll_enabled_ = enabled;
}
-
+ // The size of the layer for which edges will be animated.
void set_size(gfx::SizeF size) {
size_ = size;
}
@@ -78,6 +86,7 @@ class OverscrollGlow {
scoped_ptr<EdgeEffect> edge_effects_[EdgeEffect::EDGE_COUNT];
+ bool enabled_;
gfx::SizeF size_;
gfx::Vector2dF old_overscroll_;
gfx::Vector2dF old_velocity_;
« no previous file with comments | « no previous file | content/browser/android/overscroll_glow.cc » ('j') | content/browser/android/overscroll_glow.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698