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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 #include "content/public/common/sandbox_type.h" | 178 #include "content/public/common/sandbox_type.h" |
179 #include "content/public/common/service_manager_connection.h" | 179 #include "content/public/common/service_manager_connection.h" |
180 #include "content/public/common/service_names.mojom.h" | 180 #include "content/public/common/service_names.mojom.h" |
181 #include "content/public/common/url_utils.h" | 181 #include "content/public/common/url_utils.h" |
182 #include "content/public/common/web_preferences.h" | 182 #include "content/public/common/web_preferences.h" |
183 #include "device/bluetooth/adapter_factory.h" | 183 #include "device/bluetooth/adapter_factory.h" |
184 #include "device/bluetooth/public/interfaces/adapter.mojom.h" | 184 #include "device/bluetooth/public/interfaces/adapter.mojom.h" |
185 #include "device/usb/public/interfaces/chooser_service.mojom.h" | 185 #include "device/usb/public/interfaces/chooser_service.mojom.h" |
186 #include "device/usb/public/interfaces/device_manager.mojom.h" | 186 #include "device/usb/public/interfaces/device_manager.mojom.h" |
187 #include "extensions/features/features.h" | 187 #include "extensions/features/features.h" |
| 188 #include "media/audio/audio_manager.h" |
188 #include "media/media_features.h" | 189 #include "media/media_features.h" |
189 #include "net/base/mime_util.h" | 190 #include "net/base/mime_util.h" |
190 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 191 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
191 #include "net/cookies/canonical_cookie.h" | 192 #include "net/cookies/canonical_cookie.h" |
192 #include "net/cookies/cookie_options.h" | 193 #include "net/cookies/cookie_options.h" |
193 #include "net/ssl/ssl_cert_request_info.h" | 194 #include "net/ssl/ssl_cert_request_info.h" |
194 #include "ppapi/features/features.h" | 195 #include "ppapi/features/features.h" |
195 #include "ppapi/host/ppapi_host.h" | 196 #include "ppapi/host/ppapi_host.h" |
196 #include "printing/features/features.h" | 197 #include "printing/features/features.h" |
197 #include "services/image_decoder/public/interfaces/constants.mojom.h" | 198 #include "services/image_decoder/public/interfaces/constants.mojom.h" |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); | 1094 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); |
1094 #if BUILDFLAG(ENABLE_WEBRTC) | 1095 #if BUILDFLAG(ENABLE_WEBRTC) |
1095 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = | 1096 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = |
1096 new WebRtcLoggingHandlerHost(id, profile, | 1097 new WebRtcLoggingHandlerHost(id, profile, |
1097 g_browser_process->webrtc_log_uploader()); | 1098 g_browser_process->webrtc_log_uploader()); |
1098 host->AddFilter(webrtc_logging_handler_host); | 1099 host->AddFilter(webrtc_logging_handler_host); |
1099 host->SetUserData(WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey, | 1100 host->SetUserData(WebRtcLoggingHandlerHost::kWebRtcLoggingHandlerHostKey, |
1100 new base::UserDataAdapter<WebRtcLoggingHandlerHost>( | 1101 new base::UserDataAdapter<WebRtcLoggingHandlerHost>( |
1101 webrtc_logging_handler_host)); | 1102 webrtc_logging_handler_host)); |
1102 | 1103 |
| 1104 // The audio manager outlives the host, so it's safe to hand a raw pointer to |
| 1105 // it to the AudioDebugRecordingsHandler, which is owned by the host. |
1103 AudioDebugRecordingsHandler* audio_debug_recordings_handler = | 1106 AudioDebugRecordingsHandler* audio_debug_recordings_handler = |
1104 new AudioDebugRecordingsHandler(profile); | 1107 new AudioDebugRecordingsHandler(profile, media::AudioManager::Get()); |
1105 host->SetUserData( | 1108 host->SetUserData( |
1106 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, | 1109 AudioDebugRecordingsHandler::kAudioDebugRecordingsHandlerKey, |
1107 new base::UserDataAdapter<AudioDebugRecordingsHandler>( | 1110 new base::UserDataAdapter<AudioDebugRecordingsHandler>( |
1108 audio_debug_recordings_handler)); | 1111 audio_debug_recordings_handler)); |
1109 | 1112 |
1110 #endif | 1113 #endif |
1111 #if !defined(DISABLE_NACL) | 1114 #if !defined(DISABLE_NACL) |
1112 net::URLRequestContextGetter* context = | 1115 net::URLRequestContextGetter* context = |
1113 host->GetStoragePartition()->GetURLRequestContext(); | 1116 host->GetStoragePartition()->GetURLRequestContext(); |
1114 host->AddFilter(new nacl::NaClHostMessageFilter( | 1117 host->AddFilter(new nacl::NaClHostMessageFilter( |
(...skipping 2310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3425 return variations::GetVariationParamValue( | 3428 return variations::GetVariationParamValue( |
3426 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; | 3429 "BrowserScheduler", "RedirectDOMStorageTaskRunner") == "true"; |
3427 } | 3430 } |
3428 | 3431 |
3429 bool ChromeContentBrowserClient:: | 3432 bool ChromeContentBrowserClient:: |
3430 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3433 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3431 return variations::GetVariationParamValue( | 3434 return variations::GetVariationParamValue( |
3432 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3435 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3433 } | 3436 } |
3434 | 3437 |
3435 //static | 3438 // static |
3436 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3439 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3437 const storage::QuotaSettings* settings) { | 3440 const storage::QuotaSettings* settings) { |
3438 g_default_quota_settings = settings; | 3441 g_default_quota_settings = settings; |
3439 } | 3442 } |
OLD | NEW |