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

Side by Side Diff: chrome/utility/chrome_content_utility_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
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | components/printing/service/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/utility/chrome_content_utility_client.h" 5 #include "chrome/utility/chrome_content_utility_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 #if BUILDFLAG(ENABLE_EXTENSIONS) 50 #if BUILDFLAG(ENABLE_EXTENSIONS)
51 #include "chrome/utility/extensions/extensions_handler.h" 51 #include "chrome/utility/extensions/extensions_handler.h"
52 #endif 52 #endif
53 53
54 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \ 54 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
55 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 55 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
56 #include "chrome/utility/printing_handler.h" 56 #include "chrome/utility/printing_handler.h"
57 #endif 57 #endif
58 58
59 #if BUILDFLAG(ENABLE_PRINTING)
60 #include "chrome/common/chrome_content_client.h"
61 #include "components/printing/service/public/cpp/pdf_compositor_service_factory. h"
62 #include "components/printing/service/public/interfaces/pdf_compositor.mojom.h" // nogncheck
63 #endif
64
59 #if defined(FULL_SAFE_BROWSING) 65 #if defined(FULL_SAFE_BROWSING)
60 #include "chrome/common/safe_archive_analyzer.mojom.h" 66 #include "chrome/common/safe_archive_analyzer.mojom.h"
61 #include "chrome/common/safe_browsing/zip_analyzer.h" 67 #include "chrome/common/safe_browsing/zip_analyzer.h"
62 #include "chrome/common/safe_browsing/zip_analyzer_results.h" 68 #include "chrome/common/safe_browsing/zip_analyzer_results.h"
63 #if defined(OS_MACOSX) 69 #if defined(OS_MACOSX)
64 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h" 70 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h"
65 #endif 71 #endif
66 #endif 72 #endif
67 73
68 namespace { 74 namespace {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 return false; 319 return false;
314 320
315 for (const auto& handler : handlers_) { 321 for (const auto& handler : handlers_) {
316 if (handler->OnMessageReceived(message)) 322 if (handler->OnMessageReceived(message))
317 return true; 323 return true;
318 } 324 }
319 325
320 return false; 326 return false;
321 } 327 }
322 328
329 void ChromeContentUtilityClient::RegisterServices(
330 ChromeContentUtilityClient::StaticServiceMap* services) {
331 #if BUILDFLAG(ENABLE_PRINTING)
332 content::ServiceInfo pdf_compositor_info;
333 pdf_compositor_info.factory =
334 base::Bind(&printing::CreatePdfCompositorService, GetUserAgent());
335 services->emplace(printing::mojom::kServiceName, pdf_compositor_info);
336 #endif
337 }
338
323 // static 339 // static
324 void ChromeContentUtilityClient::PreSandboxStartup() { 340 void ChromeContentUtilityClient::PreSandboxStartup() {
325 #if BUILDFLAG(ENABLE_EXTENSIONS) 341 #if BUILDFLAG(ENABLE_EXTENSIONS)
326 extensions::ExtensionsHandler::PreSandboxStartup(); 342 extensions::ExtensionsHandler::PreSandboxStartup();
327 #endif 343 #endif
328 } 344 }
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.h ('k') | components/printing/service/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698