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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 #if BUILDFLAG(ENABLE_EXTENSIONS) | 351 #if BUILDFLAG(ENABLE_EXTENSIONS) |
352 #include "chrome/browser/media/cast_transport_host_filter.h" | 352 #include "chrome/browser/media/cast_transport_host_filter.h" |
353 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 353 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
354 | 354 |
355 #if BUILDFLAG(ENABLE_PLUGINS) | 355 #if BUILDFLAG(ENABLE_PLUGINS) |
356 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h" | 356 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h" |
357 #include "chrome/browser/plugins/flash_download_interception.h" | 357 #include "chrome/browser/plugins/flash_download_interception.h" |
358 #endif | 358 #endif |
359 | 359 |
360 #if BUILDFLAG(ENABLE_SPELLCHECK) | 360 #if BUILDFLAG(ENABLE_SPELLCHECK) |
361 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 361 #include "chrome/browser/spellchecker/spellcheck_host_impl.h" |
362 #endif | 362 #endif |
363 | 363 |
364 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 364 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
365 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" | 365 #include "components/spellcheck/browser/spellcheck_message_filter_platform.h" |
366 #endif | 366 #endif |
367 | 367 |
368 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) | 368 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
369 #include "chrome/browser/supervised_user/supervised_user_google_auth_navigation_
throttle.h" | 369 #include "chrome/browser/supervised_user/supervised_user_google_auth_navigation_
throttle.h" |
370 #endif | 370 #endif |
371 | 371 |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1193 content::RenderProcessHost* host) { | 1193 content::RenderProcessHost* host) { |
1194 int id = host->GetID(); | 1194 int id = host->GetID(); |
1195 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 1195 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
1196 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); | 1196 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); |
1197 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1197 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1198 host->AddFilter(new cast::CastTransportHostFilter); | 1198 host->AddFilter(new cast::CastTransportHostFilter); |
1199 #endif | 1199 #endif |
1200 #if BUILDFLAG(ENABLE_PRINTING) | 1200 #if BUILDFLAG(ENABLE_PRINTING) |
1201 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); | 1201 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); |
1202 #endif | 1202 #endif |
1203 #if BUILDFLAG(ENABLE_SPELLCHECK) | |
1204 host->AddFilter(new SpellCheckMessageFilter(id)); | |
1205 #endif | |
1206 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) | 1203 #if BUILDFLAG(USE_BROWSER_SPELLCHECKER) |
1207 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); | 1204 host->AddFilter(new SpellCheckMessageFilterPlatform(id)); |
1208 #endif | 1205 #endif |
1209 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); | 1206 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); |
1210 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); | 1207 host->AddFilter(new TtsMessageFilter(host->GetBrowserContext())); |
1211 #if BUILDFLAG(ENABLE_WEBRTC) | 1208 #if BUILDFLAG(ENABLE_WEBRTC) |
1212 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = | 1209 WebRtcLoggingHandlerHost* webrtc_logging_handler_host = |
1213 new WebRtcLoggingHandlerHost(id, profile, | 1210 new WebRtcLoggingHandlerHost(id, profile, |
1214 g_browser_process->webrtc_log_uploader()); | 1211 g_browser_process->webrtc_log_uploader()); |
1215 host->AddFilter(webrtc_logging_handler_host); | 1212 host->AddFilter(webrtc_logging_handler_host); |
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3087 | 3084 |
3088 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = | 3085 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner = |
3089 content::BrowserThread::GetTaskRunnerForThread( | 3086 content::BrowserThread::GetTaskRunnerForThread( |
3090 content::BrowserThread::UI); | 3087 content::BrowserThread::UI); |
3091 registry->AddInterface( | 3088 registry->AddInterface( |
3092 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create), | 3089 base::Bind(&startup_metric_utils::StartupMetricHostImpl::Create), |
3093 ui_task_runner); | 3090 ui_task_runner); |
3094 registry->AddInterface( | 3091 registry->AddInterface( |
3095 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()), | 3092 base::Bind(&BudgetServiceImpl::Create, render_process_host->GetID()), |
3096 ui_task_runner); | 3093 ui_task_runner); |
| 3094 #if BUILDFLAG(ENABLE_SPELLCHECK) |
| 3095 registry->AddInterface( |
| 3096 base::Bind(&SpellCheckHostImpl::Create, render_process_host->GetID()), |
| 3097 ui_task_runner); |
| 3098 #endif |
3097 registry->AddInterface( | 3099 registry->AddInterface( |
3098 base::Bind(&rappor::RapporRecorderImpl::Create, | 3100 base::Bind(&rappor::RapporRecorderImpl::Create, |
3099 g_browser_process->rappor_service()), | 3101 g_browser_process->rappor_service()), |
3100 ui_task_runner); | 3102 ui_task_runner); |
3101 if (NetBenchmarking::CheckBenchmarkingEnabled()) { | 3103 if (NetBenchmarking::CheckBenchmarkingEnabled()) { |
3102 Profile* profile = | 3104 Profile* profile = |
3103 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); | 3105 Profile::FromBrowserContext(render_process_host->GetBrowserContext()); |
3104 net::URLRequestContextGetter* context = | 3106 net::URLRequestContextGetter* context = |
3105 render_process_host->GetStoragePartition()->GetURLRequestContext(); | 3107 render_process_host->GetStoragePartition()->GetURLRequestContext(); |
3106 registry->AddInterface( | 3108 registry->AddInterface( |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3611 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3613 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3612 return variations::GetVariationParamValue( | 3614 return variations::GetVariationParamValue( |
3613 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3615 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3614 } | 3616 } |
3615 | 3617 |
3616 // static | 3618 // static |
3617 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3619 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3618 const storage::QuotaSettings* settings) { | 3620 const storage::QuotaSettings* settings) { |
3619 g_default_quota_settings = settings; | 3621 g_default_quota_settings = settings; |
3620 } | 3622 } |
OLD | NEW |