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

Unified Diff: content/public/renderer/content_renderer_client.h

Issue 2491823005: Initialize TaskScheduler in renderers. (Closed)
Patch Set: self-review Created 4 years 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 | « no previous file | content/renderer/render_process_impl.cc » ('j') | content/renderer/render_process_impl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/renderer/content_renderer_client.h
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index d624bcdf6b97ef2671ec6d03ca80885b4a7c1d3e..8ed597d9c35a1bba3b54a1b5b56e294e395c921e 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -12,9 +12,10 @@
#include <string>
#include <vector>
-#include "base/bind.h"
+#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
+#include "base/task_scheduler/task_scheduler.h"
#include "build/build_config.h"
#include "content/public/common/content_client.h"
#include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
@@ -28,6 +29,7 @@ class SkBitmap;
namespace base {
class FilePath;
+class SchedulerWorkerPoolParams;
class SingleThreadTaskRunner;
}
@@ -371,6 +373,16 @@ class CONTENT_EXPORT ContentRendererClient {
// Overwrites the given URL to use an HTML5 embed if possible.
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
+
+ // Provides parameters for initializing the global task scheduler. If
+ // |params_vector| is left empty, default parameters are used.
+ virtual void GetTaskSchedulerInitializationParams(
+ std::vector<base::SchedulerWorkerPoolParams>* params_vector,
+ base::TaskScheduler::WorkerPoolIndexForTraitsCallback*
+ index_to_traits_callback) {}
+
+ // Performs any necessary PostTask API redirection to the task scheduler.
+ virtual void PerformExperimentalTaskSchedulerRedirections() {}
};
} // namespace content
« no previous file with comments | « no previous file | content/renderer/render_process_impl.cc » ('j') | content/renderer/render_process_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698