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

Unified Diff: third_party/WebKit/Source/platform/WebTaskRunner.h

Issue 2876513002: Use WTF::TimeDelta to specify delays on WebTaskRunner (Closed)
Patch Set: mac fix Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/platform/Timer.cpp ('k') | third_party/WebKit/Source/platform/WebTaskRunner.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/WebTaskRunner.h
diff --git a/third_party/WebKit/Source/platform/WebTaskRunner.h b/third_party/WebKit/Source/platform/WebTaskRunner.h
index c5c19f8c9943bf1be027f7182d6a2c8b2cbe0373..19f8690614e483f4c9f1185afdddfb5ce2c5fe01 100644
--- a/third_party/WebKit/Source/platform/WebTaskRunner.h
+++ b/third_party/WebKit/Source/platform/WebTaskRunner.h
@@ -10,6 +10,7 @@
#include "platform/wtf/Compiler.h"
#include "platform/wtf/Functional.h"
#include "platform/wtf/RefCounted.h"
+#include "platform/wtf/Time.h"
#include "platform/wtf/WeakPtr.h"
#include "public/platform/WebCommon.h"
#include "public/platform/WebTraceLocation.h"
@@ -59,12 +60,6 @@ class BLINK_PLATFORM_EXPORT TaskHandle {
class BLINK_PLATFORM_EXPORT WebTaskRunner
: public ThreadSafeRefCounted<WebTaskRunner> {
public:
- // Schedule a task to be run after |delayMs| on the the associated WebThread.
- // Can be called from any thread.
- virtual void PostDelayedTask(const WebTraceLocation&,
- base::OnceClosure,
- double delay_ms) = 0;
-
// Drepecated: favor RunsTasksInCurrentSequence().
// TODO(http://crbug.com/665062): mass redirect callers and remove this.
bool RunsTasksOnCurrentThread();
@@ -101,13 +96,13 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner
void PostTask(const WebTraceLocation&, std::unique_ptr<CrossThreadClosure>);
void PostDelayedTask(const WebTraceLocation&,
std::unique_ptr<CrossThreadClosure>,
- long long delay_ms);
+ TimeDelta delay);
// For same-thread posting. Must be called from the associated WebThread.
void PostTask(const WebTraceLocation&, std::unique_ptr<WTF::Closure>);
void PostDelayedTask(const WebTraceLocation&,
std::unique_ptr<WTF::Closure>,
- long long delay_ms);
+ TimeDelta delay);
// For same-thread cancellable task posting. Returns a TaskHandle object for
// cancellation.
@@ -116,7 +111,7 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner
WARN_UNUSED_RESULT TaskHandle
PostDelayedCancellableTask(const WebTraceLocation&,
std::unique_ptr<WTF::Closure>,
- long long delay_ms);
+ TimeDelta delay);
protected:
friend ThreadSafeRefCounted<WebTaskRunner>;
« no previous file with comments | « third_party/WebKit/Source/platform/Timer.cpp ('k') | third_party/WebKit/Source/platform/WebTaskRunner.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698