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

Unified Diff: public/platform/WebThread.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/WebTaskRunner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebThread.h
diff --git a/public/platform/WebThread.h b/public/platform/WebThread.h
index 51f204b49c7f448e75445e5258fa6470e871be3f..0a33daca09b53af5e1b3204d142e4924a197ab94 100644
--- a/public/platform/WebThread.h
+++ b/public/platform/WebThread.h
@@ -28,10 +28,6 @@
#include "WebCommon.h"
#include <stdint.h>
-#ifdef INSIDE_BLINK
-#include "wtf/Functional.h"
-#endif
-
namespace blink {
class WebScheduler;
class WebTaskRunner;
@@ -54,6 +50,7 @@ public:
virtual void run(double deadlineSeconds) = 0;
};
+ // TODO(alexclarke): Remove this once it's no longer referenced by chromium.
class BLINK_PLATFORM_EXPORT Task {
public:
virtual ~Task() { }
@@ -71,8 +68,8 @@ public:
// object. It is safe to invoke postTask() and postDelayedTask() from any
// thread.
// TODO(alexclarke): Remove postTask & postDelayedTask.
- virtual void postTask(const WebTraceLocation&, Task*) = 0;
- virtual void postDelayedTask(const WebTraceLocation&, Task*, long long delayMs) = 0;
+ virtual void postTask(const WebTraceLocation&, Task*) { }
+ virtual void postDelayedTask(const WebTraceLocation&, Task*, long long delayMs) { };
// Returns a WebTaskRunner bound to the underlying scheduler's default task queue.
virtual WebTaskRunner* taskRunner() { return nullptr; }
@@ -87,12 +84,6 @@ public:
virtual WebScheduler* scheduler() const = 0;
virtual ~WebThread() { }
-
-#ifdef INSIDE_BLINK
- // Helpers for posting bound functions as tasks.
- void postTask(const WebTraceLocation&, PassOwnPtr<Function<void()>>);
- void postDelayedTask(const WebTraceLocation&, PassOwnPtr<Function<void()>>, long long delayMs);
-#endif
};
} // namespace blink
« no previous file with comments | « public/platform/WebTaskRunner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698