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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 | 372 |
373 #if BUILDFLAG(ENABLE_WEBRTC) | 373 #if BUILDFLAG(ENABLE_WEBRTC) |
374 #include "chrome/browser/media/audio_debug_recordings_handler.h" | 374 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
375 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" | 375 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" |
376 #endif | 376 #endif |
377 | 377 |
378 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 378 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
379 #include "chrome/browser/media/cast_remoting_connector.h" | 379 #include "chrome/browser/media/cast_remoting_connector.h" |
380 #endif | 380 #endif |
381 | 381 |
| 382 #if BUILDFLAG(ENABLE_PRINTING) |
| 383 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" |
| 384 #endif |
| 385 |
382 #if BUILDFLAG(ENABLE_WAYLAND_SERVER) | 386 #if BUILDFLAG(ENABLE_WAYLAND_SERVER) |
383 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 387 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
384 #endif | 388 #endif |
385 | 389 |
386 #if BUILDFLAG(ENABLE_MOJO_MEDIA) | 390 #if BUILDFLAG(ENABLE_MOJO_MEDIA) |
387 #include "chrome/browser/media/output_protection_impl.h" | 391 #include "chrome/browser/media/output_protection_impl.h" |
388 #if BUILDFLAG(ENABLE_MOJO_CDM) && defined(OS_ANDROID) | 392 #if BUILDFLAG(ENABLE_MOJO_CDM) && defined(OS_ANDROID) |
389 #include "chrome/browser/media/android/cdm/media_drm_storage_factory.h" | 393 #include "chrome/browser/media/android/cdm/media_drm_storage_factory.h" |
390 #endif | 394 #endif |
391 #endif | 395 #endif |
(...skipping 2874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3266 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, | 3270 info.factory = base::Bind(&ash_util::CreateEmbeddedAshService, |
3267 base::ThreadTaskRunnerHandle::Get()); | 3271 base::ThreadTaskRunnerHandle::Get()); |
3268 info.task_runner = base::ThreadTaskRunnerHandle::Get(); | 3272 info.task_runner = base::ThreadTaskRunnerHandle::Get(); |
3269 services->insert(std::make_pair(ash::mojom::kServiceName, info)); | 3273 services->insert(std::make_pair(ash::mojom::kServiceName, info)); |
3270 } | 3274 } |
3271 #endif // OS_CHROMEOS | 3275 #endif // OS_CHROMEOS |
3272 } | 3276 } |
3273 | 3277 |
3274 void ChromeContentBrowserClient::RegisterOutOfProcessServices( | 3278 void ChromeContentBrowserClient::RegisterOutOfProcessServices( |
3275 OutOfProcessServiceMap* services) { | 3279 OutOfProcessServiceMap* services) { |
3276 #if BUILDFLAG(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 3280 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
3277 services->insert(std::make_pair("media", | 3281 services->emplace("media", base::ASCIIToUTF16("Media Service")); |
3278 base::ASCIIToUTF16("Media Service"))); | 3282 #endif |
| 3283 |
| 3284 #if BUILDFLAG(ENABLE_PRINTING) |
| 3285 services->emplace(printing::mojom::kServiceName, |
| 3286 base::ASCIIToUTF16("PDF Compositor Service")); |
3279 #endif | 3287 #endif |
3280 } | 3288 } |
3281 | 3289 |
3282 std::unique_ptr<base::Value> | 3290 std::unique_ptr<base::Value> |
3283 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { | 3291 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { |
3284 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 3292 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
3285 int id = -1; | 3293 int id = -1; |
3286 if (name == content::mojom::kBrowserServiceName) | 3294 if (name == content::mojom::kBrowserServiceName) |
3287 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; | 3295 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; |
3288 else if (name == content::mojom::kGpuServiceName) | 3296 else if (name == content::mojom::kGpuServiceName) |
(...skipping 16 matching lines...) Expand all Loading... |
3305 | 3313 |
3306 std::vector<content::ContentBrowserClient::ServiceManifestInfo> | 3314 std::vector<content::ContentBrowserClient::ServiceManifestInfo> |
3307 ChromeContentBrowserClient::GetExtraServiceManifests() { | 3315 ChromeContentBrowserClient::GetExtraServiceManifests() { |
3308 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ | 3316 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ |
3309 #if !defined(DISABLE_NACL) | 3317 #if !defined(DISABLE_NACL) |
3310 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, | 3318 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, |
3311 #if defined(OS_WIN) | 3319 #if defined(OS_WIN) |
3312 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, | 3320 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, |
3313 #endif // defined(OS_WIN) | 3321 #endif // defined(OS_WIN) |
3314 #endif // !defined(DISABLE_NACL) | 3322 #endif // !defined(DISABLE_NACL) |
| 3323 #if BUILDFLAG(ENABLE_PRINTING) |
| 3324 {printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST}, |
| 3325 #endif |
3315 }); | 3326 }); |
3316 } | 3327 } |
3317 | 3328 |
3318 void ChromeContentBrowserClient::OpenURL( | 3329 void ChromeContentBrowserClient::OpenURL( |
3319 content::BrowserContext* browser_context, | 3330 content::BrowserContext* browser_context, |
3320 const content::OpenURLParams& params, | 3331 const content::OpenURLParams& params, |
3321 const base::Callback<void(content::WebContents*)>& callback) { | 3332 const base::Callback<void(content::WebContents*)>& callback) { |
3322 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 3333 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
3323 | 3334 |
3324 #if defined(OS_ANDROID) | 3335 #if defined(OS_ANDROID) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3595 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3606 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
3596 return variations::GetVariationParamValue( | 3607 return variations::GetVariationParamValue( |
3597 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3608 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
3598 } | 3609 } |
3599 | 3610 |
3600 // static | 3611 // static |
3601 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3612 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
3602 const storage::QuotaSettings* settings) { | 3613 const storage::QuotaSettings* settings) { |
3603 g_default_quota_settings = settings; | 3614 g_default_quota_settings = settings; |
3604 } | 3615 } |
OLD | NEW |