[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 1 | # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| 5 | import("//build/config/crypto.gni") |
| 6 | import("//build/config/features.gni") |
brettw | 5ff9819 | 2015-10-22 06:36:15 | [diff] [blame] | 7 | import("//build/config/sysroot.gni") |
brettw | 00899e6 | 2016-11-12 02:10:17 | [diff] [blame] | 8 | import("//extensions/features/features.gni") |
Brett Wilson | 65f951c | 2016-11-03 22:06:12 | [diff] [blame] | 9 | import("//printing/features/features.gni") |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 10 | |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 11 | static_library("utility") { |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 12 | sources = [ |
| 13 | "chrome_content_utility_client.cc", |
| 14 | "chrome_content_utility_client.h", |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 15 | "cloud_print/bitmap_image.cc", |
| 16 | "cloud_print/bitmap_image.h", |
| 17 | "cloud_print/pwg_encoder.cc", |
| 18 | "cloud_print/pwg_encoder.h", |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 19 | "ipc_shell_handler_win.cc", |
| 20 | "ipc_shell_handler_win.h", |
| 21 | "printing_handler.cc", |
| 22 | "printing_handler.h", |
| 23 | "shell_handler_impl_win.cc", |
| 24 | "shell_handler_impl_win.h", |
| 25 | "utility_message_handler.h", |
| 26 | ] |
| 27 | |
[email protected] | 1e8205e8 | 2014-07-08 10:54:24 | [diff] [blame] | 28 | defines = [] |
rsesek | 99679aa | 2016-06-28 21:24:17 | [diff] [blame] | 29 | configs += [ |
| 30 | "//build/config:precompiled_headers", |
| 31 | "//build/config/compiler:wexit_time_destructors", |
| 32 | ] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 33 | |
Brett Wilson | e5389527 | 2014-09-23 23:41:46 | [diff] [blame] | 34 | public_deps = [] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 35 | deps = [ |
| 36 | "//base", |
agrieve | d7a71c88 | 2015-11-20 19:53:28 | [diff] [blame] | 37 | "//chrome:resources", |
| 38 | "//chrome:strings", |
| 39 | "//chrome/common", |
amistry | 6f72f04 | 2016-04-05 20:42:07 | [diff] [blame] | 40 | "//chrome/common:mojo_bindings", |
rouslan | bb7522e | 2017-03-28 17:06:19 | [diff] [blame^] | 41 | "//components/payments/content/utility", |
amistry | ab6f6ae | 2016-05-11 06:44:18 | [diff] [blame] | 42 | "//components/safe_json/utility", |
ghose.tapu | 4183aa2 | 2015-01-16 04:21:48 | [diff] [blame] | 43 | "//components/search_engines", |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 44 | "//components/strings", |
rsleevi | 24f64dc2 | 2015-08-07 21:39:21 | [diff] [blame] | 45 | "//components/url_formatter", |
tfarina | 02f77a4 | 2015-12-17 22:38:23 | [diff] [blame] | 46 | "//content/public/child", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 47 | "//content/public/common", |
| 48 | "//content/public/utility", |
tfarina | 02f77a4 | 2015-12-17 22:38:23 | [diff] [blame] | 49 | "//courgette:courgette_lib", |
brettw | 00899e6 | 2016-11-12 02:10:17 | [diff] [blame] | 50 | "//extensions/features", |
rockot | a628d0b | 2017-02-09 08:40:15 | [diff] [blame] | 51 | "//ipc", |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 52 | "//media", |
tfarina | 02f77a4 | 2015-12-17 22:38:23 | [diff] [blame] | 53 | "//net:net_with_v8", |
Brett Wilson | 65f951c | 2016-11-03 22:06:12 | [diff] [blame] | 54 | "//printing/features", |
rockot | 734fb66 | 2016-10-15 16:41:30 | [diff] [blame] | 55 | "//services/service_manager/public/cpp", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 56 | "//skia", |
tfarina | 02f77a4 | 2015-12-17 22:38:23 | [diff] [blame] | 57 | "//sql", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 58 | "//third_party/libxml", |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 59 | ] |
| 60 | |
rsesek | 65d3135 | 2015-06-08 22:53:44 | [diff] [blame] | 61 | if (!is_android) { |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 62 | sources += [ |
| 63 | "importer/bookmark_html_reader.cc", |
| 64 | "importer/bookmark_html_reader.h", |
| 65 | "importer/bookmarks_file_importer.cc", |
| 66 | "importer/bookmarks_file_importer.h", |
| 67 | "importer/edge_database_reader_win.cc", |
| 68 | "importer/edge_database_reader_win.h", |
| 69 | "importer/edge_importer_win.cc", |
| 70 | "importer/edge_importer_win.h", |
| 71 | "importer/external_process_importer_bridge.cc", |
| 72 | "importer/external_process_importer_bridge.h", |
| 73 | "importer/favicon_reencode.cc", |
| 74 | "importer/favicon_reencode.h", |
| 75 | "importer/firefox_importer.cc", |
| 76 | "importer/firefox_importer.h", |
| 77 | "importer/ie_importer_win.cc", |
| 78 | "importer/ie_importer_win.h", |
| 79 | "importer/importer.cc", |
| 80 | "importer/importer.h", |
| 81 | "importer/importer_creator.cc", |
| 82 | "importer/importer_creator.h", |
| 83 | "importer/nss_decryptor.cc", |
| 84 | "importer/nss_decryptor.h", |
| 85 | "importer/nss_decryptor_mac.h", |
| 86 | "importer/nss_decryptor_mac.mm", |
| 87 | "importer/nss_decryptor_win.cc", |
| 88 | "importer/nss_decryptor_win.h", |
| 89 | "importer/safari_importer.h", |
| 90 | "importer/safari_importer.mm", |
| 91 | "profile_import_handler.cc", |
| 92 | "profile_import_handler.h", |
| 93 | ] |
amistry | faa231a4 | 2015-05-20 01:49:12 | [diff] [blame] | 94 | deps += [ |
| 95 | "//chrome/common:mojo_bindings", |
tibell | 1d83f16 | 2016-12-01 01:30:04 | [diff] [blame] | 96 | "//chrome/common/importer:interfaces", |
amistry | faa231a4 | 2015-05-20 01:49:12 | [diff] [blame] | 97 | "//net:net_utility_services", |
rockot | e043703 | 2017-03-25 02:49:00 | [diff] [blame] | 98 | "//services/data_decoder:lib", |
amistry | faa231a4 | 2015-05-20 01:49:12 | [diff] [blame] | 99 | ] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 100 | } |
| 101 | |
Brett Wilson | 64275214 | 2014-08-26 19:05:21 | [diff] [blame] | 102 | if (enable_extensions) { |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 103 | sources += [ |
| 104 | "extensions/extensions_handler.cc", |
| 105 | "extensions/extensions_handler.h", |
| 106 | "image_writer/disk_unmounter_mac.cc", |
| 107 | "image_writer/disk_unmounter_mac.h", |
| 108 | "image_writer/error_messages.cc", |
| 109 | "image_writer/error_messages.h", |
| 110 | "image_writer/image_writer.cc", |
| 111 | "image_writer/image_writer.h", |
| 112 | "image_writer/image_writer_handler.cc", |
| 113 | "image_writer/image_writer_handler.h", |
| 114 | "image_writer/image_writer_mac.cc", |
| 115 | "image_writer/image_writer_win.cc", |
| 116 | "media_galleries/ipc_data_source.cc", |
| 117 | "media_galleries/ipc_data_source.h", |
| 118 | "media_galleries/itunes_pref_parser_win.cc", |
| 119 | "media_galleries/itunes_pref_parser_win.h", |
| 120 | "media_galleries/media_metadata_parser.cc", |
| 121 | "media_galleries/media_metadata_parser.h", |
| 122 | ] |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 123 | deps += [ |
| 124 | "//chrome/common/extensions/api", |
rockot | 3813023 | 2014-11-06 18:50:01 | [diff] [blame] | 125 | "//extensions/utility", |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 126 | ] |
| 127 | |
scottmg | a266f95 | 2014-12-03 20:47:10 | [diff] [blame] | 128 | public_deps += [ "//chrome/common/extensions/api" ] |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 129 | |
jschuh | 05b47b88 | 2015-02-25 21:40:57 | [diff] [blame] | 130 | # Prevent wininet from loading in the renderer. http://crbug.com/460679 |
| 131 | if (is_win) { |
| 132 | ldflags = [ "/DELAYLOAD:wininet.dll" ] |
forshaw | 57e648081 | 2015-12-03 14:08:12 | [diff] [blame] | 133 | |
| 134 | # Add ESE library for Edge Import support. |
| 135 | libs = [ "esent.lib" ] |
| 136 | ldflags += [ "/DELAYLOAD:esent.dll" ] |
jschuh | 05b47b88 | 2015-02-25 21:40:57 | [diff] [blame] | 137 | } |
| 138 | |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 139 | if (is_win || is_mac) { |
brettw | e070330 | 2016-08-30 21:40:46 | [diff] [blame] | 140 | sources += [ |
| 141 | "media_galleries/iapps_xml_utils.cc", |
| 142 | "media_galleries/iapps_xml_utils.h", |
| 143 | "media_galleries/itunes_library_parser.cc", |
| 144 | "media_galleries/itunes_library_parser.h", |
| 145 | "media_galleries/picasa_album_table_reader.cc", |
| 146 | "media_galleries/picasa_album_table_reader.h", |
| 147 | "media_galleries/picasa_albums_indexer.cc", |
| 148 | "media_galleries/picasa_albums_indexer.h", |
| 149 | "media_galleries/pmp_column_reader.cc", |
| 150 | "media_galleries/pmp_column_reader.h", |
| 151 | ] |
[email protected] | 0e256aa | 2014-07-24 23:10:53 | [diff] [blame] | 152 | deps += [ "//components/wifi" ] |
[email protected] | ddc6a12 | 2014-06-27 04:52:32 | [diff] [blame] | 153 | } else { |
| 154 | sources += [ "image_writer/image_writer_stub.cc" ] |
| 155 | } |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 156 | } |
| 157 | |
davidben | 2bcbc6b | 2015-04-22 02:36:41 | [diff] [blame] | 158 | if (use_nss_certs) { |
| 159 | sources += [ |
| 160 | "importer/nss_decryptor_system_nss.cc", |
| 161 | "importer/nss_decryptor_system_nss.h", |
| 162 | ] |
| 163 | deps += [ |
| 164 | "//crypto", |
| 165 | "//crypto:platform", |
| 166 | ] |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 167 | } |
| 168 | |
weili | 5addafe | 2016-05-24 02:46:23 | [diff] [blame] | 169 | if (enable_print_preview || (enable_basic_printing && is_win)) { |
| 170 | deps += [ "//pdf" ] |
| 171 | } else { |
[email protected] | 3b816b9 | 2014-06-23 22:28:15 | [diff] [blame] | 172 | sources -= [ |
| 173 | "printing_handler.cc", |
| 174 | "printing_handler.h", |
| 175 | ] |
| 176 | } |
| 177 | |
rsesek | a8abcd3 | 2016-09-12 23:00:04 | [diff] [blame] | 178 | if (is_mac && safe_browsing_mode == 1) { |
| 179 | deps += [ "//chrome/utility/safe_browsing/mac" ] |
Robert Sesek | 8e3b34f | 2016-05-17 20:25:17 | [diff] [blame] | 180 | } |
zhaobin | 687cddcf | 2017-03-27 22:16:11 | [diff] [blame] | 181 | |
| 182 | if (enable_media_router) { |
| 183 | sources += [ |
| 184 | "media_router/dial_device_description_parser_impl.cc", |
| 185 | "media_router/dial_device_description_parser_impl.h", |
| 186 | ] |
| 187 | } |
Robert Sesek | 8e3b34f | 2016-05-17 20:25:17 | [diff] [blame] | 188 | } |