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

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

Issue 2491823005: Initialize TaskScheduler in renderers. (Closed)
Patch Set: add dcheck Created 4 years, 1 month 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: 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 f2a854f75735738adacdcd120b69eb2fdcf1291c..0ea5c1b243c4cf7342e5cccf76b061380d2c6bcb 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -12,7 +12,7 @@
#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 "build/build_config.h"
@@ -28,7 +28,9 @@ class SkBitmap;
namespace base {
class FilePath;
+class SchedulerWorkerPoolParams;
class SingleThreadTaskRunner;
+class TaskTraits;
}
namespace blink {
@@ -136,6 +138,18 @@ class CONTENT_EXPORT ContentRendererClient {
virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame,
const GURL& url);
+ // Provides TaskScheduler initialization arguments.
+ // |worker_pool_params_vector| describes the worker pools to create.
+ // |worker_pool_index_for_traits_callback| returns the index in
+ // |worker_pool_params_vector| of the worker pool in which a task with given
+ // traits should run. |redirect_sequenced_worker_pool| indicates whether tasks
+ // posted to a SequencedWorkerPool should be redirected to TaskScheduler.
+ virtual void GetTaskSchedulerInitializationArguments(
+ std::vector<base::SchedulerWorkerPoolParams>* worker_pool_params_vector,
+ base::Callback<size_t(const base::TaskTraits& traits)>*
+ worker_pool_index_for_traits_callback,
+ bool* redirect_sequenced_worker_pool);
+
// Returns the information to display when a navigation error occurs.
// If |error_html| is not null then it may be set to a HTML page containing
// the details of the error and maybe links to more info.
« no previous file with comments | « no previous file | content/public/renderer/content_renderer_client.cc » ('j') | content/public/renderer/content_renderer_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698