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

Unified Diff: cc/input/scrollbar_animation_controller.h

Issue 2841943002: Overlay scrollbars expand only when mouse is near thumb (Closed)
Patch Set: weiliangc comment addressed Created 3 years, 8 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
« no previous file with comments | « no previous file | cc/input/scrollbar_animation_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/input/scrollbar_animation_controller.h
diff --git a/cc/input/scrollbar_animation_controller.h b/cc/input/scrollbar_animation_controller.h
index 6bb9de3274c557b322a0cdf2bd948b6525c7703d..87a6b366aa3aa01db6f9caa046ad56ecd2f21b13 100644
--- a/cc/input/scrollbar_animation_controller.h
+++ b/cc/input/scrollbar_animation_controller.h
@@ -76,13 +76,15 @@ class CC_EXPORT ScrollbarAnimationController {
void DidMouseDown();
void DidMouseUp();
void DidMouseLeave();
- void DidMouseMoveNear(ScrollbarOrientation, float);
+ void DidMouseMove(const gfx::PointF& device_viewport_point);
// Called when Blink wants to show the scrollbars (via
// ScrollableArea::showOverlayScrollbars).
void DidRequestShowFromMainThread();
- bool MouseIsOverScrollbar(ScrollbarOrientation orientation) const;
+ // These methods are public for testing.
+ bool MouseIsOverScrollbarThumb(ScrollbarOrientation orientation) const;
+ bool MouseIsNearScrollbarThumb(ScrollbarOrientation orientation) const;
bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const;
bool MouseIsNearAnyScrollbar() const;
@@ -121,9 +123,6 @@ class CC_EXPORT ScrollbarAnimationController {
bool Captured() const;
- bool CalcNeedTriggerScrollbarShow(ScrollbarOrientation orientation,
- float distance) const;
-
void ApplyOpacityToScrollbars(float opacity);
ScrollbarAnimationControllerClient* client_;
@@ -134,7 +133,7 @@ class CC_EXPORT ScrollbarAnimationController {
base::TimeDelta fade_duration_;
- bool need_trigger_scrollbar_show_;
+ bool need_trigger_scrollbar_fade_in_;
bool is_animating_;
AnimationChange animation_change_;
@@ -149,6 +148,7 @@ class CC_EXPORT ScrollbarAnimationController {
const bool show_scrollbars_on_scroll_gesture_;
const bool need_thinning_animation_;
+
std::unique_ptr<SingleScrollbarAnimationControllerThinning>
vertical_controller_;
std::unique_ptr<SingleScrollbarAnimationControllerThinning>
« no previous file with comments | « no previous file | cc/input/scrollbar_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698