Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 defined(ENABLE_MOJO_MEDIA) 390 #if defined(ENABLE_MOJO_MEDIA)
387 #include "chrome/browser/media/output_protection_impl.h" 391 #include "chrome/browser/media/output_protection_impl.h"
388 #if defined(ENABLE_MOJO_CDM) && defined(OS_ANDROID) 392 #if defined(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 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
3279 } 3283 }
3280 #endif // OS_CHROMEOS 3284 #endif // OS_CHROMEOS
3281 } 3285 }
3282 3286
3283 void ChromeContentBrowserClient::RegisterOutOfProcessServices( 3287 void ChromeContentBrowserClient::RegisterOutOfProcessServices(
3284 OutOfProcessServiceMap* services) { 3288 OutOfProcessServiceMap* services) {
3285 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 3289 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
3286 services->insert(std::make_pair("media", 3290 services->insert(std::make_pair("media",
3287 base::ASCIIToUTF16("Media Service"))); 3291 base::ASCIIToUTF16("Media Service")));
3288 #endif 3292 #endif
3293
3294 #if BUILDFLAG(ENABLE_PRINTING)
3295 services->insert(
3296 std::make_pair(printing::mojom::kServiceName,
3297 base::ASCIIToUTF16("PDF Compositor Service")));
3298 #endif
3289 } 3299 }
3290 3300
3291 std::unique_ptr<base::Value> 3301 std::unique_ptr<base::Value>
3292 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { 3302 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
3293 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 3303 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
3294 int id = -1; 3304 int id = -1;
3295 if (name == content::mojom::kBrowserServiceName) 3305 if (name == content::mojom::kBrowserServiceName)
3296 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; 3306 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY;
3297 else if (name == content::mojom::kGpuServiceName) 3307 else if (name == content::mojom::kGpuServiceName)
3298 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY; 3308 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY;
(...skipping 15 matching lines...) Expand all
3314 3324
3315 std::vector<content::ContentBrowserClient::ServiceManifestInfo> 3325 std::vector<content::ContentBrowserClient::ServiceManifestInfo>
3316 ChromeContentBrowserClient::GetExtraServiceManifests() { 3326 ChromeContentBrowserClient::GetExtraServiceManifests() {
3317 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ 3327 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({
3318 #if !defined(DISABLE_NACL) 3328 #if !defined(DISABLE_NACL)
3319 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, 3329 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST},
3320 #if defined(OS_WIN) 3330 #if defined(OS_WIN)
3321 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, 3331 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST},
3322 #endif // defined(OS_WIN) 3332 #endif // defined(OS_WIN)
3323 #endif // !defined(DISABLE_NACL) 3333 #endif // !defined(DISABLE_NACL)
3334 #if BUILDFLAG(ENABLE_PRINTING)
3335 {printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST},
Lei Zhang 2017/05/04 01:31:09 nit: The indentation on line 3331 looks off. It an
Wei Li 2017/05/04 18:18:28 I noticed this too. Our formatting script made thi
3336 #endif // BUILDFLAG(ENABLE_PRINTING)
Lei Zhang 2017/05/04 01:31:10 nit: No need for comment, since this isn't nested
Wei Li 2017/05/04 18:18:28 Done.
3324 }); 3337 });
3325 } 3338 }
3326 3339
3327 void ChromeContentBrowserClient::OpenURL( 3340 void ChromeContentBrowserClient::OpenURL(
3328 content::BrowserContext* browser_context, 3341 content::BrowserContext* browser_context,
3329 const content::OpenURLParams& params, 3342 const content::OpenURLParams& params,
3330 const base::Callback<void(content::WebContents*)>& callback) { 3343 const base::Callback<void(content::WebContents*)>& callback) {
3331 DCHECK_CURRENTLY_ON(BrowserThread::UI); 3344 DCHECK_CURRENTLY_ON(BrowserThread::UI);
3332 3345
3333 #if defined(OS_ANDROID) 3346 #if defined(OS_ANDROID)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3615 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3628 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3616 return variations::GetVariationParamValue( 3629 return variations::GetVariationParamValue(
3617 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3630 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3618 } 3631 }
3619 3632
3620 // static 3633 // static
3621 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3634 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3622 const storage::QuotaSettings* settings) { 3635 const storage::QuotaSettings* settings) {
3623 g_default_quota_settings = settings; 3636 g_default_quota_settings = settings;
3624 } 3637 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698