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 b6cf972f84d58e5b9cf7f41c16fa95d449c0da33..af5e7bf467ac2f16363853e9db0219dfaf834131 100644 |
--- a/third_party/WebKit/Source/platform/WebTaskRunner.h |
+++ b/third_party/WebKit/Source/platform/WebTaskRunner.h |
@@ -56,10 +56,9 @@ class BLINK_PLATFORM_EXPORT TaskHandle { |
}; |
// The blink representation of a chromium SingleThreadTaskRunner. |
-class BLINK_PLATFORM_EXPORT WebTaskRunner { |
+class BLINK_PLATFORM_EXPORT WebTaskRunner |
+ : public ThreadSafeRefCounted<WebTaskRunner> { |
public: |
- virtual ~WebTaskRunner() {} |
- |
class BLINK_PLATFORM_EXPORT Task { |
public: |
virtual ~Task() {} |
@@ -82,9 +81,6 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner { |
const base::Closure&, |
double delayMs) = 0; |
- // Returns a clone of the WebTaskRunner. |
- virtual std::unique_ptr<WebTaskRunner> clone() = 0; |
- |
// Returns true if the current thread is a thread on which a task may be run. |
// Can be called from any thread. |
virtual bool runsTasksOnCurrentThread() = 0; |
@@ -133,6 +129,14 @@ class BLINK_PLATFORM_EXPORT WebTaskRunner { |
postDelayedCancellableTask(const WebTraceLocation&, |
std::unique_ptr<WTF::Closure>, |
long long delayMs); |
+ |
+ protected: |
+ friend ThreadSafeRefCounted<WebTaskRunner>; |
+ WebTaskRunner() = default; |
+ virtual ~WebTaskRunner(); |
+ |
+ private: |
+ DISALLOW_COPY_AND_ASSIGN(WebTaskRunner); |
}; |
} // namespace blink |