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

Side by Side Diff: content/public/renderer/content_renderer_client.h

Issue 2491823005: Initialize TaskScheduler in renderers. (Closed)
Patch Set: do not enable in this CL 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 6 #define CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/bind.h" 15 #include "base/bind.h"
16 #include "base/callback_forward.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
18 #include "build/build_config.h" 19 #include "build/build_config.h"
19 #include "content/public/common/content_client.h" 20 #include "content/public/common/content_client.h"
20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 21 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 22 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
22 #include "third_party/WebKit/public/web/WebNavigationType.h" 23 #include "third_party/WebKit/public/web/WebNavigationType.h"
23 #include "ui/base/page_transition_types.h" 24 #include "ui/base/page_transition_types.h"
24 #include "v8/include/v8.h" 25 #include "v8/include/v8.h"
25 26
26 class GURL; 27 class GURL;
27 class SkBitmap; 28 class SkBitmap;
28 29
29 namespace base { 30 namespace base {
30 class FilePath; 31 class FilePath;
32 class SchedulerWorkerPoolParams;
31 class SingleThreadTaskRunner; 33 class SingleThreadTaskRunner;
34 class TaskTraits;
32 } 35 }
33 36
34 namespace blink { 37 namespace blink {
35 class WebAudioDevice; 38 class WebAudioDevice;
36 class WebClipboard; 39 class WebClipboard;
37 class WebFrame; 40 class WebFrame;
38 class WebLocalFrame; 41 class WebLocalFrame;
39 class WebMIDIAccessor; 42 class WebMIDIAccessor;
40 class WebMIDIAccessorClient; 43 class WebMIDIAccessorClient;
41 class WebMediaStreamCenter; 44 class WebMediaStreamCenter;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // and the embedder's GetNavigationErrorHtml will be called afterwards to get 132 // and the embedder's GetNavigationErrorHtml will be called afterwards to get
130 // the error html. 133 // the error html.
131 virtual bool HasErrorPage(int http_status_code, 134 virtual bool HasErrorPage(int http_status_code,
132 std::string* error_domain); 135 std::string* error_domain);
133 136
134 // Returns true if the embedder prefers not to show an error page for a failed 137 // Returns true if the embedder prefers not to show an error page for a failed
135 // navigation to |url| in |render_frame|. 138 // navigation to |url| in |render_frame|.
136 virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame, 139 virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame,
137 const GURL& url); 140 const GURL& url);
138 141
142 // Returns true if the renderer should initialize a TaskScheduler. If so,
143 // |worker_pool_params_vector| is filled with parameters describing the worker
144 // pools to create, |worker_pool_index_for_traits_callback| is set to a
145 // callback that returns the index in |worker_pools_params_vector| of the
146 // worker pool in which a task with given traits should run and
147 // |should_redirect_sequenced_worker_pool| indicates whether
148 // SequencedWorkerPools should be redirected to TaskScheduler.
149 virtual bool ShouldInitializeTaskScheduler(
150 std::vector<base::SchedulerWorkerPoolParams>* worker_pool_params_vector,
151 base::Callback<size_t(const base::TaskTraits& traits)>*
152 worker_pool_index_for_traits_callback,
153 bool* should_redirect_sequenced_worker_pool);
154
139 // Returns the information to display when a navigation error occurs. 155 // Returns the information to display when a navigation error occurs.
140 // If |error_html| is not null then it may be set to a HTML page containing 156 // If |error_html| is not null then it may be set to a HTML page containing
141 // the details of the error and maybe links to more info. 157 // the details of the error and maybe links to more info.
142 // If |error_description| is not null it may be set to contain a brief 158 // If |error_description| is not null it may be set to contain a brief
143 // message describing the error that has occurred. 159 // message describing the error that has occurred.
144 // Either of the out parameters may be not written to in certain cases 160 // Either of the out parameters may be not written to in certain cases
145 // (lack of information on the error code) so the caller should take care to 161 // (lack of information on the error code) so the caller should take care to
146 // initialize the string values with safe defaults before the call. 162 // initialize the string values with safe defaults before the call.
147 virtual void GetNavigationErrorStrings( 163 virtual void GetNavigationErrorStrings(
148 content::RenderFrame* render_frame, 164 content::RenderFrame* render_frame,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 service_manager::InterfaceRegistry* interface_registry) {} 386 service_manager::InterfaceRegistry* interface_registry) {}
371 387
372 // Overwrites the given URL to use an HTML5 embed if possible. 388 // Overwrites the given URL to use an HTML5 embed if possible.
373 // An empty URL is returned if the URL is not overriden. 389 // An empty URL is returned if the URL is not overriden.
374 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); 390 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
375 }; 391 };
376 392
377 } // namespace content 393 } // namespace content
378 394
379 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 395 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_
OLDNEW
« no previous file with comments | « no previous file | content/public/renderer/content_renderer_client.cc » ('j') | content/renderer/render_process_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698