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

Side by Side Diff: public/platform/WebScheduler.h

Issue 1261993006: Fix the drift in repeating timers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed tests Created 5 years, 4 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 | « Source/platform/TimerTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 WebScheduler_h 5 #ifndef WebScheduler_h
6 #define WebScheduler_h 6 #define WebScheduler_h
7 7
8 #include "WebCommon.h" 8 #include "WebCommon.h"
9 #include "public/platform/WebThread.h" 9 #include "public/platform/WebThread.h"
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Schedule a loading task to be run on the the associated WebThread. Loadin g 59 // Schedule a loading task to be run on the the associated WebThread. Loadin g
60 // tasks usually have the default priority, but may be deprioritised 60 // tasks usually have the default priority, but may be deprioritised
61 // when the user is interacting with the device. 61 // when the user is interacting with the device.
62 // Takes ownership of |WebThread::Task|. Can be called from any thread. 62 // Takes ownership of |WebThread::Task|. Can be called from any thread.
63 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { } 63 virtual void postLoadingTask(const WebTraceLocation&, WebThread::Task*) { }
64 64
65 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks 65 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks
66 // tasks usually have the default priority, but may be delayed 66 // tasks usually have the default priority, but may be delayed
67 // when the user is interacting with the device. 67 // when the user is interacting with the device.
68 // Takes ownership of |WebThread::Task|. Can be called from any thread. 68 // Takes ownership of |WebThread::Task|. Can be called from any thread.
69 virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, long l ong delayMs) {} 69 virtual void postTimerTask(const WebTraceLocation&, WebThread::Task*, double delaySecs) {}
70 70
71 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks 71 // Schedule a timer task to be run on the the associated WebThread. Timer Ta sks
72 // tasks usually have the default priority, but may be delayed 72 // tasks usually have the default priority, but may be delayed
73 // when the user is interacting with the device. 73 // when the user is interacting with the device.
74 // |monotonicTime| is in the timebase of WTF::monotonicallyIncreasingTime(). 74 // |monotonicTime| is in the timebase of WTF::monotonicallyIncreasingTime().
75 // Takes ownership of |WebThread::Task|. Can be called from any thread. 75 // Takes ownership of |WebThread::Task|. Can be called from any thread.
76 virtual void postTimerTaskAt(const WebTraceLocation&, WebThread::Task*, doub le monotonicTime) {} 76 virtual void postTimerTaskAt(const WebTraceLocation&, WebThread::Task*, doub le monotonicTime) {}
77 77
78 // Suspends the timer queue and increments the timer queue suspension count. 78 // Suspends the timer queue and increments the timer queue suspension count.
79 // May only be called from the main thread. 79 // May only be called from the main thread.
(...skipping 11 matching lines...) Expand all
91 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); 91 void postIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
92 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>); 92 void postNonNestableIdleTask(const WebTraceLocation&, PassOwnPtr<IdleTask>);
93 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>); 93 void postIdleTaskAfterWakeup(const WebTraceLocation&, PassOwnPtr<IdleTask>);
94 void postLoadingTask(const WebTraceLocation&, PassOwnPtr<Task>); 94 void postLoadingTask(const WebTraceLocation&, PassOwnPtr<Task>);
95 #endif 95 #endif
96 }; 96 };
97 97
98 } // namespace blink 98 } // namespace blink
99 99
100 #endif // WebScheduler_h 100 #endif // WebScheduler_h
OLDNEW
« no previous file with comments | « Source/platform/TimerTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698