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

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

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 years, 11 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
Index: third_party/WebKit/Source/platform/WebFrameScheduler.h
diff --git a/third_party/WebKit/Source/platform/WebFrameScheduler.h b/third_party/WebKit/Source/platform/WebFrameScheduler.h
index f6b2d5bc91c3640952ac092f849259a5d842f885..899d78e630d223cf4b8175492253df6bdad2cbe2 100644
--- a/third_party/WebKit/Source/platform/WebFrameScheduler.h
+++ b/third_party/WebKit/Source/platform/WebFrameScheduler.h
@@ -5,6 +5,8 @@
#ifndef WebFrameScheduler_h
#define WebFrameScheduler_h
+#include "wtf/RefPtr.h"
+
namespace blink {
class WebTaskRunner;
@@ -33,11 +35,11 @@ class WebFrameScheduler {
// Returns the WebTaskRunner for loading tasks.
// WebFrameScheduler owns the returned WebTaskRunner.
- virtual WebTaskRunner* loadingTaskRunner() { return nullptr; }
+ virtual RefPtr<WebTaskRunner> loadingTaskRunner() = 0;
// Returns the WebTaskRunner for timer tasks.
// WebFrameScheduler owns the returned WebTaskRunner.
- virtual WebTaskRunner* timerTaskRunner() { return nullptr; }
+ virtual RefPtr<WebTaskRunner> timerTaskRunner() = 0;
// Returns the WebTaskRunner for tasks which should never get throttled.
// This is generally used for executing internal browser tasks which should
@@ -45,7 +47,7 @@ class WebFrameScheduler {
// are known should be posted to this task runner; for example user
// JavaScript is discouraged. WebFrameScheduler owns the returned
// WebTaskRunner.
- virtual WebTaskRunner* unthrottledTaskRunner() { return nullptr; }
+ virtual RefPtr<WebTaskRunner> unthrottledTaskRunner() = 0;
// Returns the parent WebViewScheduler.
virtual WebViewScheduler* webViewScheduler() { return nullptr; }
« no previous file with comments | « third_party/WebKit/Source/platform/TimerTest.cpp ('k') | third_party/WebKit/Source/platform/WebTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698