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

Side by Side Diff: chrome/utility/chrome_content_utility_client.cc

Issue 2458833005: Move printing defines to buildflag system. (Closed)
Patch Set: Merge Created 4 years, 1 month 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/BUILD.gn ('k') | chrome/utility/printing_handler.h » ('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 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/common/chrome_utility_messages.h" 15 #include "chrome/common/chrome_utility_messages.h"
16 #include "chrome/common/safe_browsing/zip_analyzer.h" 16 #include "chrome/common/safe_browsing/zip_analyzer.h"
17 #include "chrome/common/safe_browsing/zip_analyzer_results.h" 17 #include "chrome/common/safe_browsing/zip_analyzer_results.h"
18 #include "chrome/utility/chrome_content_utility_ipc_whitelist.h" 18 #include "chrome/utility/chrome_content_utility_ipc_whitelist.h"
19 #include "chrome/utility/image_decoder_impl.h" 19 #include "chrome/utility/image_decoder_impl.h"
20 #include "chrome/utility/utility_message_handler.h" 20 #include "chrome/utility/utility_message_handler.h"
21 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h" 21 #include "components/safe_json/utility/safe_json_parser_mojo_impl.h"
22 #include "content/public/child/image_decoder_utils.h" 22 #include "content/public/child/image_decoder_utils.h"
23 #include "content/public/common/content_switches.h" 23 #include "content/public/common/content_switches.h"
24 #include "content/public/utility/utility_thread.h" 24 #include "content/public/utility/utility_thread.h"
25 #include "courgette/courgette.h" 25 #include "courgette/courgette.h"
26 #include "courgette/third_party/bsdiff/bsdiff.h" 26 #include "courgette/third_party/bsdiff/bsdiff.h"
27 #include "ipc/ipc_channel.h" 27 #include "ipc/ipc_channel.h"
28 #include "mojo/public/cpp/bindings/strong_binding.h" 28 #include "mojo/public/cpp/bindings/strong_binding.h"
29 #include "printing/features/features.h"
29 #include "services/service_manager/public/cpp/interface_registry.h" 30 #include "services/service_manager/public/cpp/interface_registry.h"
30 #include "third_party/zlib/google/zip.h" 31 #include "third_party/zlib/google/zip.h"
31 #include "ui/gfx/geometry/size.h" 32 #include "ui/gfx/geometry/size.h"
32 33
33 #if !defined(OS_ANDROID) 34 #if !defined(OS_ANDROID)
34 #include "chrome/common/resource_usage_reporter.mojom.h" 35 #include "chrome/common/resource_usage_reporter.mojom.h"
35 #include "chrome/utility/profile_import_handler.h" 36 #include "chrome/utility/profile_import_handler.h"
36 #include "mojo/public/cpp/bindings/strong_binding.h" 37 #include "mojo/public/cpp/bindings/strong_binding.h"
37 #include "net/proxy/mojo_proxy_resolver_factory_impl.h" 38 #include "net/proxy/mojo_proxy_resolver_factory_impl.h"
38 #include "net/proxy/proxy_resolver_v8.h" 39 #include "net/proxy/proxy_resolver_v8.h"
39 #endif 40 #endif
40 41
41 #if defined(OS_WIN) 42 #if defined(OS_WIN)
42 #include "chrome/utility/ipc_shell_handler_win.h" 43 #include "chrome/utility/ipc_shell_handler_win.h"
43 #include "chrome/utility/shell_handler_impl_win.h" 44 #include "chrome/utility/shell_handler_impl_win.h"
44 #endif 45 #endif
45 46
46 #if defined(ENABLE_EXTENSIONS) 47 #if defined(ENABLE_EXTENSIONS)
47 #include "chrome/utility/extensions/extensions_handler.h" 48 #include "chrome/utility/extensions/extensions_handler.h"
48 #include "chrome/utility/image_writer/image_writer_handler.h" 49 #include "chrome/utility/image_writer/image_writer_handler.h"
49 #endif 50 #endif
50 51
51 #if defined(ENABLE_PRINT_PREVIEW) || \ 52 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
52 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 53 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
53 #include "chrome/utility/printing_handler.h" 54 #include "chrome/utility/printing_handler.h"
54 #endif 55 #endif
55 56
56 #if defined(OS_MACOSX) && defined(FULL_SAFE_BROWSING) 57 #if defined(OS_MACOSX) && defined(FULL_SAFE_BROWSING)
57 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h" 58 #include "chrome/utility/safe_browsing/mac/dmg_analyzer.h"
58 #endif 59 #endif
59 60
60 namespace { 61 namespace {
61 62
62 bool Send(IPC::Message* message) { 63 bool Send(IPC::Message* message) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 : filter_messages_(false) { 112 : filter_messages_(false) {
112 #if !defined(OS_ANDROID) 113 #if !defined(OS_ANDROID)
113 handlers_.push_back(new ProfileImportHandler()); 114 handlers_.push_back(new ProfileImportHandler());
114 #endif 115 #endif
115 116
116 #if defined(ENABLE_EXTENSIONS) 117 #if defined(ENABLE_EXTENSIONS)
117 handlers_.push_back(new extensions::ExtensionsHandler(this)); 118 handlers_.push_back(new extensions::ExtensionsHandler(this));
118 handlers_.push_back(new image_writer::ImageWriterHandler()); 119 handlers_.push_back(new image_writer::ImageWriterHandler());
119 #endif 120 #endif
120 121
121 #if defined(ENABLE_PRINT_PREVIEW) || \ 122 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) || \
122 (defined(ENABLE_BASIC_PRINTING) && defined(OS_WIN)) 123 (BUILDFLAG(ENABLE_BASIC_PRINTING) && defined(OS_WIN))
123 handlers_.push_back(new printing::PrintingHandler()); 124 handlers_.push_back(new printing::PrintingHandler());
124 #endif 125 #endif
125 126
126 #if defined(OS_WIN) 127 #if defined(OS_WIN)
127 handlers_.push_back(new IPCShellHandler()); 128 handlers_.push_back(new IPCShellHandler());
128 #endif 129 #endif
129 } 130 }
130 131
131 ChromeContentUtilityClient::~ChromeContentUtilityClient() { 132 ChromeContentUtilityClient::~ChromeContentUtilityClient() {
132 } 133 }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 safe_browsing::zip_analyzer::Results results; 308 safe_browsing::zip_analyzer::Results results;
308 safe_browsing::dmg::AnalyzeDMGFile( 309 safe_browsing::dmg::AnalyzeDMGFile(
309 IPC::PlatformFileForTransitToFile(dmg_file), &results); 310 IPC::PlatformFileForTransitToFile(dmg_file), &results);
310 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished( 311 Send(new ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished(
311 results)); 312 results));
312 ReleaseProcessIfNeeded(); 313 ReleaseProcessIfNeeded();
313 } 314 }
314 #endif // defined(OS_MACOSX) 315 #endif // defined(OS_MACOSX)
315 316
316 #endif // defined(FULL_SAFE_BROWSING) 317 #endif // defined(FULL_SAFE_BROWSING)
OLDNEW
« no previous file with comments | « chrome/utility/BUILD.gn ('k') | chrome/utility/printing_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698