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

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

Issue 2832633002: Add PDF compositor service (Closed)
Patch Set: remove a header 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 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 2884 matching lines...) Expand 10 before | Expand all | Expand 10 after
3275 } 3279 }
3276 #endif // OS_CHROMEOS 3280 #endif // OS_CHROMEOS
3277 } 3281 }
3278 3282
3279 void ChromeContentBrowserClient::RegisterOutOfProcessServices( 3283 void ChromeContentBrowserClient::RegisterOutOfProcessServices(
3280 OutOfProcessServiceMap* services) { 3284 OutOfProcessServiceMap* services) {
3281 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS) 3285 #if defined(ENABLE_MOJO_MEDIA_IN_UTILITY_PROCESS)
3282 services->insert(std::make_pair("media", 3286 services->insert(std::make_pair("media",
3283 base::ASCIIToUTF16("Media Service"))); 3287 base::ASCIIToUTF16("Media Service")));
3284 #endif 3288 #endif
3289
3290 #if BUILDFLAG(ENABLE_PRINTING)
3291 services->insert(
3292 std::make_pair(printing::mojom::kServiceName,
3293 base::ASCIIToUTF16("PDF Compositor Service")));
3294 #endif
3285 } 3295 }
3286 3296
3287 std::unique_ptr<base::Value> 3297 std::unique_ptr<base::Value>
3288 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { 3298 ChromeContentBrowserClient::GetServiceManifestOverlay(base::StringPiece name) {
3289 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 3299 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
3290 int id = -1; 3300 int id = -1;
3291 if (name == content::mojom::kBrowserServiceName) 3301 if (name == content::mojom::kBrowserServiceName)
3292 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY; 3302 id = IDR_CHROME_CONTENT_BROWSER_MANIFEST_OVERLAY;
3293 else if (name == content::mojom::kGpuServiceName) 3303 else if (name == content::mojom::kGpuServiceName)
3294 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY; 3304 id = IDR_CHROME_CONTENT_GPU_MANIFEST_OVERLAY;
(...skipping 15 matching lines...) Expand all
3310 3320
3311 std::vector<content::ContentBrowserClient::ServiceManifestInfo> 3321 std::vector<content::ContentBrowserClient::ServiceManifestInfo>
3312 ChromeContentBrowserClient::GetExtraServiceManifests() { 3322 ChromeContentBrowserClient::GetExtraServiceManifests() {
3313 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({ 3323 return std::vector<content::ContentBrowserClient::ServiceManifestInfo>({
3314 #if !defined(DISABLE_NACL) 3324 #if !defined(DISABLE_NACL)
3315 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST}, 3325 {nacl::kNaClLoaderServiceName, IDR_NACL_LOADER_MANIFEST},
3316 #if defined(OS_WIN) 3326 #if defined(OS_WIN)
3317 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST}, 3327 {nacl::kNaClBrokerServiceName, IDR_NACL_BROKER_MANIFEST},
3318 #endif // defined(OS_WIN) 3328 #endif // defined(OS_WIN)
3319 #endif // !defined(DISABLE_NACL) 3329 #endif // !defined(DISABLE_NACL)
3330 #if BUILDFLAG(ENABLE_PRINTING)
3331 {printing::mojom::kServiceName, IDR_PDF_COMPOSITOR_MANIFEST},
3332 #endif
3320 }); 3333 });
3321 } 3334 }
3322 3335
3323 void ChromeContentBrowserClient::OpenURL( 3336 void ChromeContentBrowserClient::OpenURL(
3324 content::BrowserContext* browser_context, 3337 content::BrowserContext* browser_context,
3325 const content::OpenURLParams& params, 3338 const content::OpenURLParams& params,
3326 const base::Callback<void(content::WebContents*)>& callback) { 3339 const base::Callback<void(content::WebContents*)>& callback) {
3327 DCHECK_CURRENTLY_ON(BrowserThread::UI); 3340 DCHECK_CURRENTLY_ON(BrowserThread::UI);
3328 3341
3329 #if defined(OS_ANDROID) 3342 #if defined(OS_ANDROID)
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3611 RedirectNonUINonIOBrowserThreadsToTaskScheduler() { 3624 RedirectNonUINonIOBrowserThreadsToTaskScheduler() {
3612 return variations::GetVariationParamValue( 3625 return variations::GetVariationParamValue(
3613 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true"; 3626 "BrowserScheduler", "RedirectNonUINonIOBrowserThreads") == "true";
3614 } 3627 }
3615 3628
3616 // static 3629 // static
3617 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting( 3630 void ChromeContentBrowserClient::SetDefaultQuotaSettingsForTesting(
3618 const storage::QuotaSettings* settings) { 3631 const storage::QuotaSettings* settings) {
3619 g_default_quota_settings = settings; 3632 g_default_quota_settings = settings;
3620 } 3633 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698