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

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

Issue 2423143002: Scrollbar fade animation broken on Android regression resolved. (Closed)
Patch Set: review comments addressed. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.h » ('j') | cc/trees/layer_tree_host_impl.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ 5 #ifndef CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_
6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ 6 #define CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_
7 7
8 #include "base/cancelable_callback.h" 8 #include "base/cancelable_callback.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 28 matching lines...) Expand all
39 bool Animate(base::TimeTicks now); 39 bool Animate(base::TimeTicks now);
40 40
41 virtual void DidScrollBegin(); 41 virtual void DidScrollBegin();
42 virtual void DidScrollUpdate(bool on_resize); 42 virtual void DidScrollUpdate(bool on_resize);
43 virtual void DidScrollEnd(); 43 virtual void DidScrollEnd();
44 virtual void DidMouseDown() {} 44 virtual void DidMouseDown() {}
45 virtual void DidMouseUp() {} 45 virtual void DidMouseUp() {}
46 virtual void DidMouseLeave() {} 46 virtual void DidMouseLeave() {}
47 virtual void DidMouseMoveNear(float distance) {} 47 virtual void DidMouseMoveNear(float distance) {}
48 48
49 // Used for testing.
50 bool currently_scrolling() { return currently_scrolling_; }
51
49 protected: 52 protected:
50 ScrollbarAnimationController(int scroll_layer_id, 53 ScrollbarAnimationController(int scroll_layer_id,
51 ScrollbarAnimationControllerClient* client, 54 ScrollbarAnimationControllerClient* client,
52 base::TimeDelta delay_before_starting, 55 base::TimeDelta delay_before_starting,
53 base::TimeDelta resize_delay_before_starting); 56 base::TimeDelta resize_delay_before_starting);
54 57
55 virtual void RunAnimationFrame(float progress) = 0; 58 virtual void RunAnimationFrame(float progress) = 0;
56 virtual const base::TimeDelta& Duration() = 0; 59 virtual const base::TimeDelta& Duration() = 0;
57 60
58 void StartAnimation(); 61 void StartAnimation();
(...skipping 19 matching lines...) Expand all
78 bool currently_scrolling_; 81 bool currently_scrolling_;
79 bool scroll_gesture_has_scrolled_; 82 bool scroll_gesture_has_scrolled_;
80 base::CancelableClosure delayed_scrollbar_fade_; 83 base::CancelableClosure delayed_scrollbar_fade_;
81 84
82 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; 85 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_;
83 }; 86 };
84 87
85 } // namespace cc 88 } // namespace cc
86 89
87 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ 90 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.h » ('j') | cc/trees/layer_tree_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698