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

Side by Side Diff: extensions/shell/browser/shell_content_browser_client.cc

Issue 2465253010: Add WebView PlzNavigate related fixes to extensions_browsertests harness. (Closed)
Patch Set: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "extensions/shell/browser/shell_content_browser_client.h" 5 #include "extensions/shell/browser/shell_content_browser_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "components/guest_view/browser/guest_view_message_filter.h" 13 #include "components/guest_view/browser/guest_view_message_filter.h"
14 #include "content/public/browser/browser_thread.h" 14 #include "content/public/browser/browser_thread.h"
15 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
16 #include "content/public/browser/site_instance.h" 16 #include "content/public/browser/site_instance.h"
17 #include "content/public/browser/storage_partition.h" 17 #include "content/public/browser/storage_partition.h"
18 #include "content/public/common/content_descriptors.h" 18 #include "content/public/common/content_descriptors.h"
19 #include "content/public/common/content_switches.h" 19 #include "content/public/common/content_switches.h"
20 #include "content/public/common/url_constants.h" 20 #include "content/public/common/url_constants.h"
21 #include "content/shell/browser/shell_browser_context.h" 21 #include "content/shell/browser/shell_browser_context.h"
22 #include "content/shell/browser/shell_devtools_manager_delegate.h" 22 #include "content/shell/browser/shell_devtools_manager_delegate.h"
23 #include "extensions/browser/extension_message_filter.h" 23 #include "extensions/browser/extension_message_filter.h"
24 #include "extensions/browser/extension_navigation_throttle.h"
25 #include "extensions/browser/extension_navigation_ui_data.h"
24 #include "extensions/browser/extension_protocols.h" 26 #include "extensions/browser/extension_protocols.h"
25 #include "extensions/browser/extension_registry.h" 27 #include "extensions/browser/extension_registry.h"
26 #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" 28 #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h"
27 #include "extensions/browser/info_map.h" 29 #include "extensions/browser/info_map.h"
28 #include "extensions/browser/io_thread_extension_message_filter.h" 30 #include "extensions/browser/io_thread_extension_message_filter.h"
29 #include "extensions/browser/process_map.h" 31 #include "extensions/browser/process_map.h"
30 #include "extensions/common/constants.h" 32 #include "extensions/common/constants.h"
31 #include "extensions/common/extension.h" 33 #include "extensions/common/extension.h"
32 #include "extensions/common/switches.h" 34 #include "extensions/common/switches.h"
33 #include "extensions/shell/browser/shell_browser_context.h" 35 #include "extensions/shell/browser/shell_browser_context.h"
34 #include "extensions/shell/browser/shell_browser_main_parts.h" 36 #include "extensions/shell/browser/shell_browser_main_parts.h"
35 #include "extensions/shell/browser/shell_extension_system.h" 37 #include "extensions/shell/browser/shell_extension_system.h"
38 #include "extensions/shell/browser/shell_navigation_ui_data.h"
36 #include "extensions/shell/browser/shell_speech_recognition_manager_delegate.h" 39 #include "extensions/shell/browser/shell_speech_recognition_manager_delegate.h"
37 #include "url/gurl.h" 40 #include "url/gurl.h"
38 41
39 #if !defined(DISABLE_NACL) 42 #if !defined(DISABLE_NACL)
40 #include "components/nacl/browser/nacl_browser.h" 43 #include "components/nacl/browser/nacl_browser.h"
41 #include "components/nacl/browser/nacl_host_message_filter.h" 44 #include "components/nacl/browser/nacl_host_message_filter.h"
42 #include "components/nacl/browser/nacl_process_host.h" 45 #include "components/nacl/browser/nacl_process_host.h"
43 #include "components/nacl/common/nacl_process_type.h" 46 #include "components/nacl/common/nacl_process_type.h"
44 #include "components/nacl/common/nacl_switches.h" 47 #include "components/nacl/common/nacl_switches.h"
45 #include "content/public/browser/browser_child_process_host.h" 48 #include "content/public/browser/browser_child_process_host.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem( 224 ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
222 additional_allowed_schemes); 225 additional_allowed_schemes);
223 additional_allowed_schemes->push_back(kExtensionScheme); 226 additional_allowed_schemes->push_back(kExtensionScheme);
224 } 227 }
225 228
226 content::DevToolsManagerDelegate* 229 content::DevToolsManagerDelegate*
227 ShellContentBrowserClient::GetDevToolsManagerDelegate() { 230 ShellContentBrowserClient::GetDevToolsManagerDelegate() {
228 return new content::ShellDevToolsManagerDelegate(GetBrowserContext()); 231 return new content::ShellDevToolsManagerDelegate(GetBrowserContext());
229 } 232 }
230 233
234 ScopedVector<content::NavigationThrottle>
235 ShellContentBrowserClient::CreateThrottlesForNavigation(
236 content::NavigationHandle* navigation_handle) {
237 ScopedVector<content::NavigationThrottle> throttles;
238 throttles.push_back(new ExtensionNavigationThrottle(navigation_handle));
239 return throttles;
240 }
241
242 std::unique_ptr<content::NavigationUIData>
243 ShellContentBrowserClient::GetNavigationUIData(
244 content::NavigationHandle* navigation_handle) {
245 return base::MakeUnique<ShellNavigationUIData>(navigation_handle);
246 }
247
231 ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts( 248 ShellBrowserMainParts* ShellContentBrowserClient::CreateShellBrowserMainParts(
232 const content::MainFunctionParams& parameters, 249 const content::MainFunctionParams& parameters,
233 ShellBrowserMainDelegate* browser_main_delegate) { 250 ShellBrowserMainDelegate* browser_main_delegate) {
234 return new ShellBrowserMainParts(parameters, browser_main_delegate); 251 return new ShellBrowserMainParts(parameters, browser_main_delegate);
235 } 252 }
236 253
237 void ShellContentBrowserClient::AppendRendererSwitches( 254 void ShellContentBrowserClient::AppendRendererSwitches(
238 base::CommandLine* command_line) { 255 base::CommandLine* command_line) {
239 // TODO(jamescook): Should we check here if the process is in the extension 256 // TODO(jamescook): Should we check here if the process is in the extension
240 // service process map, or can we assume all renderers are extension 257 // service process map, or can we assume all renderers are extension
(...skipping 13 matching lines...) Expand all
254 271
255 const Extension* ShellContentBrowserClient::GetExtension( 272 const Extension* ShellContentBrowserClient::GetExtension(
256 content::SiteInstance* site_instance) { 273 content::SiteInstance* site_instance) {
257 ExtensionRegistry* registry = 274 ExtensionRegistry* registry =
258 ExtensionRegistry::Get(site_instance->GetBrowserContext()); 275 ExtensionRegistry::Get(site_instance->GetBrowserContext());
259 return registry->enabled_extensions().GetExtensionOrAppByURL( 276 return registry->enabled_extensions().GetExtensionOrAppByURL(
260 site_instance->GetSiteURL()); 277 site_instance->GetSiteURL());
261 } 278 }
262 279
263 } // namespace extensions 280 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_content_browser_client.h ('k') | extensions/shell/browser/shell_extensions_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698