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

Unified Diff: third_party/WebKit/public/platform/WebScheduler.h

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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/public/blink_headers.gypi ('k') | third_party/WebKit/public/platform/WebTaskRunner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/platform/WebScheduler.h
diff --git a/third_party/WebKit/public/platform/WebScheduler.h b/third_party/WebKit/public/platform/WebScheduler.h
index 3fb63c5dd612424cc557fc984c9d7a8e31025229..1e04777faa4ac867d4f4f5e67e81dff950d93979 100644
--- a/third_party/WebKit/public/platform/WebScheduler.h
+++ b/third_party/WebKit/public/platform/WebScheduler.h
@@ -6,6 +6,7 @@
#define WebScheduler_h
#include "WebCommon.h"
+#include "WebString.h"
#include "public/platform/WebTaskRunner.h"
#include "public/platform/WebThread.h"
#include "public/platform/WebTraceLocation.h"
@@ -19,8 +20,18 @@ class WebView;
// This class is used to submit tasks and pass other information from Blink to
// the platform's scheduler.
+// TODO(skyostil): Replace this class with RendererScheduler.
class BLINK_PLATFORM_EXPORT WebScheduler {
public:
+ class BLINK_PLATFORM_EXPORT InterventionReporter {
+ public:
+ virtual ~InterventionReporter() {}
+
+ // The scheduler has performed an intervention, described by |message|,
+ // which should be reported to the developer.
+ virtual void ReportIntervention(const WebString& message) = 0;
+ };
+
virtual ~WebScheduler() { }
// Called to prevent any more pending tasks from running. Must be called on
@@ -69,7 +80,7 @@ public:
// Creates a new WebViewScheduler for a given WebView. Must be called from
// the associated WebThread.
- virtual std::unique_ptr<WebViewScheduler> createWebViewScheduler(blink::WebView*) = 0;
+ virtual std::unique_ptr<WebViewScheduler> createWebViewScheduler(InterventionReporter*) = 0;
// Suspends the timer queue and increments the timer queue suspension count.
// May only be called from the main thread.
« no previous file with comments | « third_party/WebKit/public/blink_headers.gypi ('k') | third_party/WebKit/public/platform/WebTaskRunner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698