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

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

Issue 2770293003: Feed ScrollableArea::showOverlayScrollbars into ScrollbarAnimationController. (Closed)
Patch Set: rebase 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 unified diff | Download patch
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/input/scrollbar_animation_controller.cc » ('j') | no next file with comments »
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void DidResize(); 78 void DidResize();
79 79
80 void DidScrollBegin(); 80 void DidScrollBegin();
81 void DidScrollEnd(); 81 void DidScrollEnd();
82 82
83 void DidMouseDown(); 83 void DidMouseDown();
84 void DidMouseUp(); 84 void DidMouseUp();
85 void DidMouseLeave(); 85 void DidMouseLeave();
86 void DidMouseMoveNear(ScrollbarOrientation, float); 86 void DidMouseMoveNear(ScrollbarOrientation, float);
87 87
88 // Called when Blink wants to show the scrollbars (via
89 // ScrollableArea::showOverlayScrollbars).
90 void DidRequestShowFromMainThread();
91
88 bool MouseIsOverScrollbar(ScrollbarOrientation orientation) const; 92 bool MouseIsOverScrollbar(ScrollbarOrientation orientation) const;
89 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const; 93 bool MouseIsNearScrollbar(ScrollbarOrientation orientation) const;
90 bool MouseIsNearAnyScrollbar() const; 94 bool MouseIsNearAnyScrollbar() const;
91 95
92 static constexpr float kMouseMoveDistanceToTriggerShow = 30.0f; 96 static constexpr float kMouseMoveDistanceToTriggerShow = 30.0f;
93 97
94 private: 98 private:
95 ScrollbarAnimationController(int scroll_layer_id, 99 ScrollbarAnimationController(int scroll_layer_id,
96 ScrollbarAnimationControllerClient* client, 100 ScrollbarAnimationControllerClient* client,
97 base::TimeDelta fade_out_delay, 101 base::TimeDelta fade_out_delay,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 vertical_controller_; 164 vertical_controller_;
161 std::unique_ptr<SingleScrollbarAnimationControllerThinning> 165 std::unique_ptr<SingleScrollbarAnimationControllerThinning>
162 horizontal_controller_; 166 horizontal_controller_;
163 167
164 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_; 168 base::WeakPtrFactory<ScrollbarAnimationController> weak_factory_;
165 }; 169 };
166 170
167 } // namespace cc 171 } // namespace cc
168 172
169 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_ 173 #endif // CC_INPUT_SCROLLBAR_ANIMATION_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/input/scrollbar_animation_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698