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/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 Loading... |
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 return false; | 314 return false; |
309 | 315 |
310 for (const auto& handler : handlers_) { | 316 for (const auto& handler : handlers_) { |
311 if (handler->OnMessageReceived(message)) | 317 if (handler->OnMessageReceived(message)) |
312 return true; | 318 return true; |
313 } | 319 } |
314 | 320 |
315 return false; | 321 return false; |
316 } | 322 } |
317 | 323 |
| 324 void ChromeContentUtilityClient::RegisterServices( |
| 325 ChromeContentUtilityClient::StaticServiceMap* services) { |
| 326 #if BUILDFLAG(ENABLE_PRINTING) |
| 327 content::ServiceInfo pdf_compositor_info; |
| 328 pdf_compositor_info.factory = |
| 329 base::Bind(&printing::CreatePdfCompositorService, GetUserAgent()); |
| 330 services->insert( |
| 331 std::make_pair(printing::mojom::kServiceName, pdf_compositor_info)); |
| 332 #endif |
| 333 } |
| 334 |
318 // static | 335 // static |
319 void ChromeContentUtilityClient::PreSandboxStartup() { | 336 void ChromeContentUtilityClient::PreSandboxStartup() { |
320 #if BUILDFLAG(ENABLE_EXTENSIONS) | 337 #if BUILDFLAG(ENABLE_EXTENSIONS) |
321 extensions::ExtensionsHandler::PreSandboxStartup(); | 338 extensions::ExtensionsHandler::PreSandboxStartup(); |
322 #endif | 339 #endif |
323 } | 340 } |
OLD | NEW |