| OLD | NEW |
| 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 #include "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/bind_helpers.h" | 12 #include "base/bind_helpers.h" |
| 13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
| 14 #include "base/files/scoped_file.h" | 14 #include "base/files/scoped_file.h" |
| 15 #include "base/i18n/icu_util.h" | 15 #include "base/i18n/icu_util.h" |
| 16 #include "base/lazy_instance.h" | 16 #include "base/lazy_instance.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/prefs/pref_service.h" | 18 #include "base/prefs/pref_service.h" |
| 19 #include "base/prefs/scoped_user_pref_update.h" | 19 #include "base/prefs/scoped_user_pref_update.h" |
| 20 #include "base/strings/string_number_conversions.h" | 20 #include "base/strings/string_number_conversions.h" |
| 21 #include "base/strings/utf_string_conversions.h" | 21 #include "base/strings/utf_string_conversions.h" |
| 22 #include "base/thread_task_runner_handle.h" |
| 22 #include "base/threading/sequenced_worker_pool.h" | 23 #include "base/threading/sequenced_worker_pool.h" |
| 23 #include "chrome/browser/after_startup_task_utils.h" | 24 #include "chrome/browser/after_startup_task_utils.h" |
| 24 #include "chrome/browser/browser_about_handler.h" | 25 #include "chrome/browser/browser_about_handler.h" |
| 25 #include "chrome/browser/browser_process.h" | 26 #include "chrome/browser/browser_process.h" |
| 26 #include "chrome/browser/browser_shutdown.h" | 27 #include "chrome/browser/browser_shutdown.h" |
| 27 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 28 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 28 #include "chrome/browser/browsing_data/browsing_data_remover.h" | 29 #include "chrome/browser/browsing_data/browsing_data_remover.h" |
| 29 #include "chrome/browser/character_encoding.h" | 30 #include "chrome/browser/character_encoding.h" |
| 30 #include "chrome/browser/chrome_content_browser_client_parts.h" | 31 #include "chrome/browser/chrome_content_browser_client_parts.h" |
| 31 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" | 32 #include "chrome/browser/chrome_net_benchmarking_message_filter.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 #include "content/public/browser/render_process_host.h" | 117 #include "content/public/browser/render_process_host.h" |
| 117 #include "content/public/browser/render_view_host.h" | 118 #include "content/public/browser/render_view_host.h" |
| 118 #include "content/public/browser/resource_context.h" | 119 #include "content/public/browser/resource_context.h" |
| 119 #include "content/public/browser/site_instance.h" | 120 #include "content/public/browser/site_instance.h" |
| 120 #include "content/public/browser/web_contents.h" | 121 #include "content/public/browser/web_contents.h" |
| 121 #include "content/public/common/child_process_host.h" | 122 #include "content/public/common/child_process_host.h" |
| 122 #include "content/public/common/content_descriptors.h" | 123 #include "content/public/common/content_descriptors.h" |
| 123 #include "content/public/common/service_registry.h" | 124 #include "content/public/common/service_registry.h" |
| 124 #include "content/public/common/url_utils.h" | 125 #include "content/public/common/url_utils.h" |
| 125 #include "content/public/common/web_preferences.h" | 126 #include "content/public/common/web_preferences.h" |
| 127 #include "device/devices_app/devices_app.h" |
| 126 #include "gin/v8_initializer.h" | 128 #include "gin/v8_initializer.h" |
| 127 #include "net/base/mime_util.h" | 129 #include "net/base/mime_util.h" |
| 128 #include "net/cookies/canonical_cookie.h" | 130 #include "net/cookies/canonical_cookie.h" |
| 129 #include "net/cookies/cookie_options.h" | 131 #include "net/cookies/cookie_options.h" |
| 130 #include "net/ssl/ssl_cert_request_info.h" | 132 #include "net/ssl/ssl_cert_request_info.h" |
| 131 #include "ppapi/host/ppapi_host.h" | 133 #include "ppapi/host/ppapi_host.h" |
| 132 #include "storage/browser/fileapi/external_mount_points.h" | 134 #include "storage/browser/fileapi/external_mount_points.h" |
| 133 #include "ui/base/l10n/l10n_util.h" | 135 #include "ui/base/l10n/l10n_util.h" |
| 134 #include "ui/base/resource/resource_bundle.h" | 136 #include "ui/base/resource/resource_bundle.h" |
| 135 #include "ui/resources/grit/ui_resources.h" | 137 #include "ui/resources/grit/ui_resources.h" |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2355 void ChromeContentBrowserClient::OverrideRenderFrameMojoServices( | 2357 void ChromeContentBrowserClient::OverrideRenderFrameMojoServices( |
| 2356 content::ServiceRegistry* registry, | 2358 content::ServiceRegistry* registry, |
| 2357 content::RenderFrameHost* render_frame_host) { | 2359 content::RenderFrameHost* render_frame_host) { |
| 2358 #if defined(OS_CHROMEOS) | 2360 #if defined(OS_CHROMEOS) |
| 2359 registry->AddService( | 2361 registry->AddService( |
| 2360 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 2362 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
| 2361 render_frame_host)); | 2363 render_frame_host)); |
| 2362 #endif | 2364 #endif |
| 2363 } | 2365 } |
| 2364 | 2366 |
| 2367 void ChromeContentBrowserClient::RegisterMojoApplications( |
| 2368 StaticMojoApplicationMap* apps) { |
| 2369 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 2370 apps->insert(std::make_pair(GURL(device::kDevicesMojoAppUrl), |
| 2371 base::Bind(&device::DevicesApp::CreateDelegate, |
| 2372 base::ThreadTaskRunnerHandle::Get()))); |
| 2373 #endif |
| 2374 } |
| 2375 |
| 2365 void ChromeContentBrowserClient::OpenURL( | 2376 void ChromeContentBrowserClient::OpenURL( |
| 2366 content::BrowserContext* browser_context, | 2377 content::BrowserContext* browser_context, |
| 2367 const content::OpenURLParams& params, | 2378 const content::OpenURLParams& params, |
| 2368 const base::Callback<void(content::WebContents*)>& callback) { | 2379 const base::Callback<void(content::WebContents*)>& callback) { |
| 2369 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 2380 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 2370 | 2381 |
| 2371 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 2382 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 2372 NavigateParams nav_params(Profile::FromBrowserContext(browser_context), | 2383 NavigateParams nav_params(Profile::FromBrowserContext(browser_context), |
| 2373 params.url, | 2384 params.url, |
| 2374 params.transition); | 2385 params.transition); |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2478 switches::kDisableWebRtcEncryption, | 2489 switches::kDisableWebRtcEncryption, |
| 2479 }; | 2490 }; |
| 2480 to_command_line->CopySwitchesFrom(from_command_line, | 2491 to_command_line->CopySwitchesFrom(from_command_line, |
| 2481 kWebRtcDevSwitchNames, | 2492 kWebRtcDevSwitchNames, |
| 2482 arraysize(kWebRtcDevSwitchNames)); | 2493 arraysize(kWebRtcDevSwitchNames)); |
| 2483 } | 2494 } |
| 2484 } | 2495 } |
| 2485 #endif // defined(ENABLE_WEBRTC) | 2496 #endif // defined(ENABLE_WEBRTC) |
| 2486 | 2497 |
| 2487 } // namespace chrome | 2498 } // namespace chrome |
| OLD | NEW |