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 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 #if defined(USE_X11) | 296 #if defined(USE_X11) |
297 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" | 297 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" |
298 #endif | 298 #endif |
299 | 299 |
300 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) | 300 #if BUILDFLAG(ENABLE_CAPTIVE_PORTAL_DETECTION) |
301 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" | 301 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h" |
302 #endif | 302 #endif |
303 | 303 |
304 #if !defined(DISABLE_NACL) | 304 #if !defined(DISABLE_NACL) |
305 #include "components/nacl/browser/nacl_browser.h" | 305 #include "components/nacl/browser/nacl_browser.h" |
306 #include "components/nacl/browser/nacl_host_message_filter.h" | 306 #include "components/nacl/browser/nacl_host_impl.h" |
307 #include "components/nacl/browser/nacl_process_host.h" | 307 #include "components/nacl/browser/nacl_process_host.h" |
308 #include "components/nacl/common/nacl_process_type.h" | 308 #include "components/nacl/common/nacl_process_type.h" |
309 #include "components/nacl/common/nacl_switches.h" | 309 #include "components/nacl/common/nacl_switches.h" |
310 #endif | 310 #endif |
311 | 311 |
312 #if BUILDFLAG(ENABLE_EXTENSIONS) | 312 #if BUILDFLAG(ENABLE_EXTENSIONS) |
313 #include "chrome/browser/accessibility/animation_policy_prefs.h" | 313 #include "chrome/browser/accessibility/animation_policy_prefs.h" |
314 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" | 314 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
315 #include "chrome/browser/media/cast_transport_host_filter.h" | 315 #include "chrome/browser/media/cast_transport_host_filter.h" |
316 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | 316 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 webrtc_logging_handler_host)); | 1084 webrtc_logging_handler_host)); |
1085 | 1085 |
1086 AudioDebugRecordingsHandler* audio_debug_recordings_handler = | 1086 AudioDebugRecordingsHandler* audio_debug_recordings_handler = |
1087 new AudioDebugRecordingsHandler(profile); | 1087 new AudioDebugRecordingsHandler(profile); |
1088 host->SetUserData( | 1088 host->SetUserData( |
1089 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, | 1089 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, |
1090 new base::UserDataAdapter<AudioDebugRecordingsHandler>( | 1090 new base::UserDataAdapter<AudioDebugRecordingsHandler>( |
1091 audio_debug_recordings_handler)); | 1091 audio_debug_recordings_handler)); |
1092 | 1092 |
1093 #endif | 1093 #endif |
1094 #if !defined(DISABLE_NACL) | |
1095 net::URLRequestContextGetter* context = | |
1096 host->GetStoragePartition()->GetURLRequestContext(); | |
1097 host->AddFilter(new nacl::NaClHostMessageFilter( | |
1098 id, profile->IsOffTheRecord(), | |
1099 profile->GetPath(), | |
1100 context)); | |
1101 #endif | |
1102 #if defined(OS_ANDROID) | 1094 #if defined(OS_ANDROID) |
1103 host->AddFilter(new cdm::CdmMessageFilterAndroid()); | 1095 host->AddFilter(new cdm::CdmMessageFilterAndroid()); |
1104 #endif | 1096 #endif |
1105 | 1097 |
1106 bool is_incognito_process = profile->IsOffTheRecord(); | 1098 bool is_incognito_process = profile->IsOffTheRecord(); |
1107 | 1099 |
1108 chrome::mojom::RendererConfigurationAssociatedPtr rc_interface; | 1100 chrome::mojom::RendererConfigurationAssociatedPtr rc_interface; |
1109 host->GetChannel()->GetRemoteAssociatedInterface(&rc_interface); | 1101 host->GetChannel()->GetRemoteAssociatedInterface(&rc_interface); |
1110 rc_interface->SetInitialConfiguration(is_incognito_process); | 1102 rc_interface->SetInitialConfiguration(is_incognito_process); |
1111 | 1103 |
(...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 base::Unretained(ModuleDatabase::GetInstance())), | 2960 base::Unretained(ModuleDatabase::GetInstance())), |
2969 ui_task_runner); | 2961 ui_task_runner); |
2970 } | 2962 } |
2971 #endif | 2963 #endif |
2972 | 2964 |
2973 #if defined(OS_CHROMEOS) | 2965 #if defined(OS_CHROMEOS) |
2974 registry->AddInterface<metrics::mojom::LeakDetector>( | 2966 registry->AddInterface<metrics::mojom::LeakDetector>( |
2975 base::Bind(&metrics::LeakDetectorRemoteController::Create), | 2967 base::Bind(&metrics::LeakDetectorRemoteController::Create), |
2976 ui_task_runner); | 2968 ui_task_runner); |
2977 #endif | 2969 #endif |
| 2970 #if !defined(DISABLE_NACL) |
| 2971 Profile* profile = |
| 2972 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); |
| 2973 registry->AddInterface( |
| 2974 base::Bind(&nacl::NaClHostImpl::Create, render_process_host->GetID(), |
| 2975 profile->IsOffTheRecord(), profile->GetPath())); |
| 2976 #endif |
2978 } | 2977 } |
2979 | 2978 |
2980 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( | 2979 void ChromeContentBrowserClient::ExposeInterfacesToMediaService( |
2981 service_manager::InterfaceRegistry* registry, | 2980 service_manager::InterfaceRegistry* registry, |
2982 content::RenderFrameHost* render_frame_host) { | 2981 content::RenderFrameHost* render_frame_host) { |
2983 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. | 2982 // TODO(xhwang): Only register this when ENABLE_MOJO_MEDIA. |
2984 #if defined(OS_CHROMEOS) | 2983 #if defined(OS_CHROMEOS) |
2985 registry->AddInterface( | 2984 registry->AddInterface( |
2986 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, | 2985 base::Bind(&chromeos::attestation::PlatformVerificationImpl::Create, |
2987 render_frame_host)); | 2986 render_frame_host)); |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3403 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { | 3402 bool ChromeContentBrowserClient::ShouldRedirectDOMStorageTaskRunner() { |
3404 return variations::GetVariationParamValue( | 3403 return variations::GetVariationParamValue( |
3405 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3404 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
3406 } | 3405 } |
3407 | 3406 |
3408 bool ChromeContentBrowserClient:: | 3407 bool ChromeContentBrowserClient:: |
3409 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3408 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3410 return variations::GetVariationParamValue( | 3409 return variations::GetVariationParamValue( |
3411 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3410 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3412 } | 3411 } |
OLD | NEW |