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 5e62b3a451a3a8c8b184daa436fc14c56a5ee342..940d7c7812d31042999715bef490d63b0cf7d0d2 100644 |
--- a/content/public/renderer/content_renderer_client.h |
+++ b/content/public/renderer/content_renderer_client.h |
@@ -13,6 +13,7 @@ |
#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 +29,9 @@ class SkBitmap; |
namespace base { |
class FilePath; |
+class SchedulerWorkerPoolParams; |
class SingleThreadTaskRunner; |
+class TaskTraits; |
} |
namespace blink { |
@@ -136,6 +139,19 @@ class CONTENT_EXPORT ContentRendererClient { |
virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame, |
const GURL& url); |
+ // Returns true if the renderer should initialize a TaskScheduler. If so, |
+ // |worker_pool_params_vector| is filled with parameters describing the worker |
+ // pools to create, |worker_pool_index_for_traits_callback| is set to a |
+ // callback that returns the index in |worker_pools_params_vector| of the |
+ // worker pool in which a task with given traits should run and |
+ // |should_redirect_sequenced_worker_pool| indicates whether |
+ // SequencedWorkerPools should be redirected to TaskScheduler. |
+ virtual bool ShouldInitializeTaskScheduler( |
+ std::vector<base::SchedulerWorkerPoolParams>* worker_pool_params_vector, |
+ base::Callback<size_t(const base::TaskTraits& traits)>* |
+ worker_pool_index_for_traits_callback, |
+ bool* should_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. |