Chromium Code Reviews| 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 371 | 371 |
| 372 #if BUILDFLAG(ENABLE_WEBRTC) | 372 #if BUILDFLAG(ENABLE_WEBRTC) |
| 373 #include "chrome/browser/media/audio_debug_recordings_handler.h" | 373 #include "chrome/browser/media/audio_debug_recordings_handler.h" |
| 374 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" | 374 #include "chrome/browser/media/webrtc/webrtc_logging_handler_host.h" |
| 375 #endif | 375 #endif |
| 376 | 376 |
| 377 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) | 377 #if BUILDFLAG(ENABLE_MEDIA_REMOTING) |
| 378 #include "chrome/browser/media/cast_remoting_connector.h" | 378 #include "chrome/browser/media/cast_remoting_connector.h" |
| 379 #endif | 379 #endif |
| 380 | 380 |
| 381 #if BUILDFLAG(ENABLE_PRINTING) | |
| 382 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" | |
| 383 #endif | |
| 384 | |
| 381 #if BUILDFLAG(ENABLE_WAYLAND_SERVER) | 385 #if BUILDFLAG(ENABLE_WAYLAND_SERVER) |
| 382 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" | 386 #include "chrome/browser/chrome_browser_main_extra_parts_exo.h" |
| 383 #endif | 387 #endif |
| 384 | 388 |
| 385 #if defined(ENABLE_MOJO_MEDIA) | 389 #if defined(ENABLE_MOJO_MEDIA) |
| 386 #include "chrome/browser/media/output_protection_impl.h" | 390 #include "chrome/browser/media/output_protection_impl.h" |
| 387 #if defined(ENABLE_MOJO_CDM) && defined(OS_ANDROID) | 391 #if defined(ENABLE_MOJO_CDM) && defined(OS_ANDROID) |
| 388 #include "chrome/browser/media/android/cdm/media_drm_storage_factory.h" | 392 #include "chrome/browser/media/android/cdm/media_drm_storage_factory.h" |
| 389 #endif | 393 #endif |
| 390 #endif | 394 #endif |
| (...skipping 2893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3284 } | 3288 } |
| 3285 #endif // OS_CHROMEOS | 3289 #endif // OS_CHROMEOS |
| 3286 } | 3290 } |
| 3287 | 3291 |
| 3288 void ChromeContentBrowserClient::RegisterOutOfProcessServices( | 3292 void ChromeContentBrowserClient::RegisterOutOfProcessServices( |
| 3289 OutOfProcessServiceMap* services) { | 3293 OutOfProcessServiceMap* services) { |
| 3290 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) | 3294 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) |
| 3291 services->insert(std::make_pair("media", | 3295 services->insert(std::make_pair("media", |
| 3292 base::ASCIIToUTF16("Media Service"))); | 3296 base::ASCIIToUTF16("Media Service"))); |
| 3293 #endif | 3297 #endif |
| 3298 | |
| 3299 #if BUILDFLAG(ENABLE_PRINTING) | |
| 3300 services->insert( | |
|
dcheng
2017/05/10 07:36:47
Nit: let's use emplace(printing::mojom::kServiceNa
Wei Li
2017/05/11 16:53:01
Done.
| |
| 3301 std::make_pair(printing::mojom::kServiceName, | |
| 3302 base::ASCIIToUTF16("PDF Compositor Service"))); | |
| 3303 #endif | |
| 3294 } | 3304 } |
| 3295 | 3305 |
| 3296 std::unique_ptr<base::Value> | 3306 std::unique_ptr<base::Value> |
| 3297 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { | 3307 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { |
| 3298 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 3308 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 3299 int id = -1; | 3309 int id = -1; |
| 3300 if (name == content::mojom::kBrowserServiceName) | 3310 if (name == content::mojom::kBrowserServiceName) |
| 3301 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; | 3311 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; |
| 3302 else if (name == content::mojom::kGpuServiceName) | 3312 else if (name == content::mojom::kGpuServiceName) |
| 3303 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY; | 3313 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 3319 | 3329 |
| 3320 std::vector<content::ContentBrowserClient::ServiceManifestInfo> | 3330 std::vector<content::ContentBrowserClient::ServiceManifestInfo> |
| 3321 ChromeContentBrowserClient::GetExtraServiceManifests() { | 3331 ChromeContentBrowserClient::GetExtraServiceManifests() { |
| 3322 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ | 3332 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ |
| 3323 #if !defined(DISABLE_NACL) | 3333 #if !defined(DISABLE_NACL) |
| 3324 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, | 3334 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, |
| 3325 #if defined(OS_WIN) | 3335 #if defined(OS_WIN) |
| 3326 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, | 3336 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, |
| 3327 #endif // defined(OS_WIN) | 3337 #endif // defined(OS_WIN) |
| 3328 #endif // !defined(DISABLE_NACL) | 3338 #endif // !defined(DISABLE_NACL) |
| 3339 #if BUILDFLAG(ENABLE_PRINTING) | |
| 3340 {printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST}, | |
| 3341 #endif | |
| 3329 }); | 3342 }); |
| 3330 } | 3343 } |
| 3331 | 3344 |
| 3332 void ChromeContentBrowserClient::OpenURL( | 3345 void ChromeContentBrowserClient::OpenURL( |
| 3333 content::BrowserContext* browser_context, | 3346 content::BrowserContext* browser_context, |
| 3334 const content::OpenURLParams& params, | 3347 const content::OpenURLParams& params, |
| 3335 const base::Callback<void(content::WebContents*)>& callback) { | 3348 const base::Callback<void(content::WebContents*)>& callback) { |
| 3336 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 3349 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 3337 | 3350 |
| 3338 #if defined(OS_ANDROID) | 3351 #if defined(OS_ANDROID) |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3609 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { | 3622 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { |
| 3610 return variations::GetVariationParamValue( | 3623 return variations::GetVariationParamValue( |
| 3611 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; | 3624 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; |
| 3612 } | 3625 } |
| 3613 | 3626 |
| 3614 // static | 3627 // static |
| 3615 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( | 3628 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( |
| 3616 const storage::QuotaSettings* settings) { | 3629 const storage::QuotaSettings* settings) { |
| 3617 g_default_quota_settings = settings; | 3630 g_default_quota_settings = settings; |
| 3618 } | 3631 } |
| OLD | NEW |