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

Side by Side 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 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/callback_forward.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "build/build_config.h" 18 #include "build/build_config.h"
19 #include "content/public/common/content_client.h" 19 #include "content/public/common/content_client.h"
20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h" 20 #include "third_party/WebKit/public/platform/WebPageVisibilityState.h"
21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 21 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
22 #include "third_party/WebKit/public/web/WebNavigationType.h" 22 #include "third_party/WebKit/public/web/WebNavigationType.h"
23 #include "ui/base/page_transition_types.h" 23 #include "ui/base/page_transition_types.h"
24 #include "v8/include/v8.h" 24 #include "v8/include/v8.h"
25 25
26 class GURL; 26 class GURL;
27 class SkBitmap; 27 class SkBitmap;
28 28
29 namespace base { 29 namespace base {
30 class FilePath; 30 class FilePath;
31 class SchedulerWorkerPoolParams;
31 class SingleThreadTaskRunner; 32 class SingleThreadTaskRunner;
33 class TaskTraits;
32 } 34 }
33 35
34 namespace blink { 36 namespace blink {
35 class WebAudioDevice; 37 class WebAudioDevice;
36 class WebClipboard; 38 class WebClipboard;
37 class WebFrame; 39 class WebFrame;
38 class WebLocalFrame; 40 class WebLocalFrame;
39 class WebMIDIAccessor; 41 class WebMIDIAccessor;
40 class WebMIDIAccessorClient; 42 class WebMIDIAccessorClient;
41 class WebMediaStreamCenter; 43 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 131 // and the embedder's GetNavigationErrorHtml will be called afterwards to get
130 // the error html. 132 // the error html.
131 virtual bool HasErrorPage(int http_status_code, 133 virtual bool HasErrorPage(int http_status_code,
132 std::string* error_domain); 134 std::string* error_domain);
133 135
134 // Returns true if the embedder prefers not to show an error page for a failed 136 // Returns true if the embedder prefers not to show an error page for a failed
135 // navigation to |url| in |render_frame|. 137 // navigation to |url| in |render_frame|.
136 virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame, 138 virtual bool ShouldSuppressErrorPage(RenderFrame* render_frame,
137 const GURL& url); 139 const GURL& url);
138 140
141 // Provides TaskScheduler initialization arguments.
142 // |worker_pool_params_vector| describes the worker pools to create.
143 // |worker_pool_index_for_traits_callback| returns the index in
144 // |worker_pool_params_vector| of the worker pool in which a task with given
145 // traits should run. |redirect_sequenced_worker_pool| indicates whether tasks
146 // posted to a SequencedWorkerPool should be redirected to TaskScheduler.
147 virtual void GetTaskSchedulerInitializationArguments(
148 std::vector<base::SchedulerWorkerPoolParams>* worker_pool_params_vector,
149 base::Callback<size_t(const base::TaskTraits& traits)>*
150 worker_pool_index_for_traits_callback,
151 bool* redirect_sequenced_worker_pool);
152
139 // Returns the information to display when a navigation error occurs. 153 // 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 154 // 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. 155 // 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 156 // If |error_description| is not null it may be set to contain a brief
143 // message describing the error that has occurred. 157 // message describing the error that has occurred.
144 // Either of the out parameters may be not written to in certain cases 158 // 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 159 // (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. 160 // initialize the string values with safe defaults before the call.
147 virtual void GetNavigationErrorStrings( 161 virtual void GetNavigationErrorStrings(
148 content::RenderFrame* render_frame, 162 content::RenderFrame* render_frame,
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 service_manager::InterfaceRegistry* interface_registry) {} 384 service_manager::InterfaceRegistry* interface_registry) {}
371 385
372 // Overwrites the given URL to use an HTML5 embed if possible. 386 // Overwrites the given URL to use an HTML5 embed if possible.
373 // An empty URL is returned if the URL is not overriden. 387 // An empty URL is returned if the URL is not overriden.
374 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); 388 virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
375 }; 389 };
376 390
377 } // namespace content 391 } // namespace content
378 392
379 #endif // CONTENT_PUBLIC_RENDERER_CONTENT_RENDERER_CLIENT_H_ 393 #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/public/renderer/content_renderer_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698