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

Unified Diff: third_party/WebKit/Source/platform/scroll/ScrollableArea.h

Issue 2644243002: Move ScrollableArea timer to TaskRunnerTimer. (Closed)
Patch Set: use derived class in unique_ptr Created 3 years, 11 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: third_party/WebKit/Source/platform/scroll/ScrollableArea.h
diff --git a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
index 8c433da061fa448d30c7a4713ef06fb8648ed2e4..f5f6a86dd3463eda42ea8a71a86622a9c72d28ce 100644
--- a/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
+++ b/third_party/WebKit/Source/platform/scroll/ScrollableArea.h
@@ -366,6 +366,10 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
virtual void didScrollWithScrollbar(ScrollbarPart, ScrollbarOrientation) {}
+ // Returns the task runner to be used for scrollable area timers.
+ // Ideally a frame-specific throttled one can be used.
+ virtual RefPtr<WebTaskRunner> getTimerTaskRunner() const = 0;
+
protected:
ScrollableArea();
@@ -420,7 +424,7 @@ class PLATFORM_EXPORT ScrollableArea : public GarbageCollectedMixin {
mutable Member<ScrollAnimatorBase> m_scrollAnimator;
mutable Member<ProgrammaticScrollAnimator> m_programmaticScrollAnimator;
- std::unique_ptr<Timer<ScrollableArea>> m_fadeOverlayScrollbarsTimer;
+ std::unique_ptr<TaskRunnerTimer<ScrollableArea>> m_fadeOverlayScrollbarsTimer;
unsigned m_scrollbarOverlayColorTheme : 2;

Powered by Google App Engine
This is Rietveld 408576698