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

Side by Side Diff: cc/input/scrollbar_animation_controller_thinning.h

Issue 2422353002: Iframe/div MD scrollbars get idle when mouse leaves the nested elements. (Closed)
Patch Set: Move the scrollbar animation logic to animation controllers. Created 4 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ 5 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ 6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 ~ScrollbarAnimationControllerThinning() override; 29 ~ScrollbarAnimationControllerThinning() override;
30 30
31 void set_mouse_move_distance_for_test(float distance) { 31 void set_mouse_move_distance_for_test(float distance) {
32 mouse_move_distance_to_trigger_animation_ = distance; 32 mouse_move_distance_to_trigger_animation_ = distance;
33 } 33 }
34 bool mouse_is_over_scrollbar() const { return mouse_is_over_scrollbar_; } 34 bool mouse_is_over_scrollbar() const { return mouse_is_over_scrollbar_; }
35 bool mouse_is_near_scrollbar() const { return mouse_is_near_scrollbar_; } 35 bool mouse_is_near_scrollbar() const { return mouse_is_near_scrollbar_; }
36 36
37 void DidScrollUpdate(bool on_resize) override; 37 void DidScrollUpdate(bool on_resize) override;
38 38
39 void DidCaptureScrollbarBegin() override; 39 void DidMouseDown() override;
40 void DidCaptureScrollbarEnd() override; 40 void DidMouseUp() override;
41 void DidMouseMoveOffScrollbar() override; 41 void DidMouseMoveOffScrollbar() override;
42 void DidMouseMoveNear(float distance) override; 42 void DidMouseMoveNear(float distance) override;
43 43
44 protected: 44 protected:
45 ScrollbarAnimationControllerThinning( 45 ScrollbarAnimationControllerThinning(
46 int scroll_layer_id, 46 int scroll_layer_id,
47 ScrollbarAnimationControllerClient* client, 47 ScrollbarAnimationControllerClient* client,
48 base::TimeDelta delay_before_starting, 48 base::TimeDelta delay_before_starting,
49 base::TimeDelta resize_delay_before_starting, 49 base::TimeDelta resize_delay_before_starting,
50 base::TimeDelta duration); 50 base::TimeDelta duration);
(...skipping 23 matching lines...) Expand all
74 AnimationChange opacity_change_; 74 AnimationChange opacity_change_;
75 // How close should the mouse be to the scrollbar before we thicken it. 75 // How close should the mouse be to the scrollbar before we thicken it.
76 float mouse_move_distance_to_trigger_animation_; 76 float mouse_move_distance_to_trigger_animation_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning); 78 DISALLOW_COPY_AND_ASSIGN(ScrollbarAnimationControllerThinning);
79 }; 79 };
80 80
81 } // namespace cc 81 } // namespace cc
82 82
83 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_ 83 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_THINNING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698