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

Unified Diff: public/platform/WebTaskRunner.h

Issue 1303153005: Introduce WebTaskRunner Patch 3/5 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing #include Created 5 years, 3 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 | « public/platform/WebScheduler.h ('k') | public/platform/WebThread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebTaskRunner.h
diff --git a/public/platform/WebTaskRunner.h b/public/platform/WebTaskRunner.h
index edaf128538fa1863a020463761b034dfba17ff03..b3e9745fed227a7ff3dc4f9900b96bb97c47f51b 100644
--- a/public/platform/WebTaskRunner.h
+++ b/public/platform/WebTaskRunner.h
@@ -7,6 +7,10 @@
#include "WebCommon.h"
+#ifdef INSIDE_BLINK
+#include "wtf/Functional.h"
+#endif
+
namespace blink {
class WebTraceLocation;
@@ -35,7 +39,15 @@ public:
// Takes ownership of |Task|. Can be called from any thread.
virtual void postDelayedTask(const WebTraceLocation&, Task*, double delayMs) {}
- // TODO(alexclarke): Add helpers for posting bound functions as tasks.
+#ifdef INSIDE_BLINK
+ // Helpers for posting bound functions as tasks.
+ typedef Function<void()> ClosureTask;
+
+ void postTask(const WebTraceLocation&, PassOwnPtr<ClosureTask>);
+ // TODO(alexclarke): Remove this when possible.
+ void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ClosureTask>, long long delayMs);
+ void postDelayedTask(const WebTraceLocation&, PassOwnPtr<ClosureTask>, double delayMs);
+#endif
};
} // namespace blink
« no previous file with comments | « public/platform/WebScheduler.h ('k') | public/platform/WebThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698