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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 #if defined(USE_X11) | 305 #if defined(USE_X11) |
306 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" | 306 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" |
307 #endif | 307 #endif |
308 | 308 |
309 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) | 309 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
310 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 310 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
311 #endif | 311 #endif |
312 | 312 |
313 #if !defined(DISABLE_NACL) | 313 #if !defined(DISABLE_NACL) |
314 #include "components/nacl/browser/nacl_browser.h" | 314 #include "components/nacl/browser/nacl_browser.h" |
315 #include "components/nacl/browser/nacl_host_message_filter.h" | 315 #include "components/nacl/browser/nacl_host_impl.h" |
316 #include "components/nacl/browser/nacl_process_host.h" | 316 #include "components/nacl/browser/nacl_process_host.h" |
317 #include "components/nacl/common/nacl_process_type.h" | 317 #include "components/nacl/common/nacl_process_type.h" |
318 #include "components/nacl/common/nacl_switches.h" | 318 #include "components/nacl/common/nacl_switches.h" |
319 #endif | 319 #endif |
320 | 320 |
321 #if BUILDFLAG(ENABLE_EXTENSIONS) | 321 #if BUILDFLAG(ENABLE_EXTENSIONS) |
322 #include "chrome/browser/accessibility/animation_policy_prefs.h" | 322 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
323 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" | 323 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
324 #include "chrome/browser/media/cast_transport_host_filter.h" | 324 #include "chrome/browser/media/cast_transport_host_filter.h" |
325 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | 325 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
(...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 webrtc_logging_handler_host)); | 1181 webrtc_logging_handler_host)); |
1182 | 1182 |
1183 AudioDebugRecordingsHandler* audio_debug_recordings_handler = | 1183 AudioDebugRecordingsHandler* audio_debug_recordings_handler = |
1184 new AudioDebugRecordingsHandler(profile); | 1184 new AudioDebugRecordingsHandler(profile); |
1185 host->SetUserData( | 1185 host->SetUserData( |
1186 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, | 1186 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, |
1187 new base::UserDataAdapter<AudioDebugRecordingsHandler>( | 1187 new base::UserDataAdapter<AudioDebugRecordingsHandler>( |
1188 audio_debug_recordings_handler)); | 1188 audio_debug_recordings_handler)); |
1189 | 1189 |
1190 #endif | 1190 #endif |
1191 #if !defined(DISABLE_NACL) | |
1192 net::URLRequestContextGetter* context = | |
1193 host->GetStoragePartition()->GetURLRequestContext(); | |
1194 host->AddFilter(new nacl::NaClHostMessageFilter( | |
1195 id, profile->IsOffTheRecord(), | |
1196 profile->GetPath(), | |
1197 context)); | |
1198 #endif | |
1199 #if defined(OS_ANDROID) | 1191 #if defined(OS_ANDROID) |
1200 host->AddFilter(new cdm::CdmMessageFilterAndroid()); | 1192 host->AddFilter(new cdm::CdmMessageFilterAndroid()); |
1201 #endif | 1193 #endif |
1202 | 1194 |
1203 bool is_incognito_process = profile->IsOffTheRecord(); | 1195 bool is_incognito_process = profile->IsOffTheRecord(); |
1204 | 1196 |
1205 chrome::mojom::RendererConfigurationAssociatedPtr rc_interface; | 1197 chrome::mojom::RendererConfigurationAssociatedPtr rc_interface; |
1206 host->GetChannel()->GetRemoteAssociatedInterface(&rc_interface); | 1198 host->GetChannel()->GetRemoteAssociatedInterface(&rc_interface); |
1207 rc_interface->SetInitialConfiguration(is_incognito_process); | 1199 rc_interface->SetInitialConfiguration(is_incognito_process); |
1208 | 1200 |
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3086 base::Unretained(ModuleDatabase::GetInstance())), | 3078 base::Unretained(ModuleDatabase::GetInstance())), |
3087 ui_task_runner); | 3079 ui_task_runner); |
3088 } | 3080 } |
3089 #endif | 3081 #endif |
3090 | 3082 |
3091 #if defined(OS_CHROMEOS) | 3083 #if defined(OS_CHROMEOS) |
3092 registry->AddInterface<metrics::mojom::LeakDetector>( | 3084 registry->AddInterface<metrics::mojom::LeakDetector>( |
3093 base::Bind(&metrics::LeakDetectorRemoteController::Create), | 3085 base::Bind(&metrics::LeakDetectorRemoteController::Create), |
3094 ui_task_runner); | 3086 ui_task_runner); |
3095 #endif | 3087 #endif |
| 3088 #if !defined(DISABLE_NACL) |
| 3089 Profile* profile = |
| 3090 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); |
| 3091 registry->AddInterface( |
| 3092 base::Bind(&nacl::NaClHostImpl::Create, render_process_host->GetID(), |
| 3093 profile->IsOffTheRecord(), profile->GetPath())); |
| 3094 #endif |
3096 } | 3095 } |
3097 | 3096 |
3098 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( | 3097 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( |
3099 service_manager::InterfaceRegistry* registry, | 3098 service_manager::InterfaceRegistry* registry, |
3100 content::RenderFrameHost* render_frame_host) { | 3099 content::RenderFrameHost* render_frame_host) { |
3101 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. | 3100 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. |
3102 #if defined(OS_CHROMEOS) | 3101 #if defined(OS_CHROMEOS) |
3103 registry->AddInterface( | 3102 registry->AddInterface( |
3104 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 3103 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
3105 render_frame_host)); | 3104 render_frame_host)); |
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3541 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3540 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3542 return variations::GetVariationParamValue( | 3541 return variations::GetVariationParamValue( |
3543 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3542 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3544 } | 3543 } |
3545 | 3544 |
3546 // static | 3545 // static |
3547 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3546 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3548 const storage::QuotaSettings* settings) { | 3547 const storage::QuotaSettings* settings) { |
3549 g_default_quota_settings = settings; | 3548 g_default_quota_settings = settings; |
3550 } | 3549 } |
OLD | NEW |