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

Unified Diff: cc/input/single_scrollbar_animation_controller_thinning.h

Issue 2692243005: Merge Compositor's ScrollbarAnimationControllers into single class (Closed)
Patch Set: fix confict constant Created 3 years, 10 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: cc/input/single_scrollbar_animation_controller_thinning.h
diff --git a/cc/input/single_scrollbar_animation_controller_thinning.h b/cc/input/single_scrollbar_animation_controller_thinning.h
index b9743874b844ed980191be7b0fa46540a3e9bd8d..1437ccde89662cae8e8bb63e345051fadbdf2ba6 100644
--- a/cc/input/single_scrollbar_animation_controller_thinning.h
+++ b/cc/input/single_scrollbar_animation_controller_thinning.h
@@ -22,6 +22,9 @@ class ScrollbarAnimationControllerClient;
// ScrollbarAnimationControllerThinning for one scrollbar
class CC_EXPORT SingleScrollbarAnimationControllerThinning {
public:
+ static constexpr float kIdleThicknessScale = 0.4f;
+ static constexpr float kDefaultMouseMoveDistanceToTriggerAnimation = 25.f;
+
static std::unique_ptr<SingleScrollbarAnimationControllerThinning> Create(
int scroll_layer_id,
ScrollbarOrientation orientation,
@@ -30,9 +33,6 @@ class CC_EXPORT SingleScrollbarAnimationControllerThinning {
~SingleScrollbarAnimationControllerThinning() {}
- void set_mouse_move_distance_for_test(float distance) {
- mouse_move_distance_to_trigger_animation_ = distance;
- }
bool mouse_is_over_scrollbar() const { return mouse_is_over_scrollbar_; }
bool mouse_is_near_scrollbar() const { return mouse_is_near_scrollbar_; }
bool captured() const { return captured_; }
@@ -84,8 +84,6 @@ class CC_EXPORT SingleScrollbarAnimationControllerThinning {
bool mouse_is_near_scrollbar_;
// Are we narrowing or thickening the bars.
AnimationChange thickness_change_;
- // How close should the mouse be to the scrollbar before we thicken it.
- float mouse_move_distance_to_trigger_animation_;
base::TimeDelta thinning_duration_;

Powered by Google App Engine
This is Rietveld 408576698