summaryrefslogtreecommitdiff
path: root/chromium/chrome/utility/BUILD.gn
blob: 637a2336e396d92ef3dbe4a86421407e9a6f1a62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

import("//build/config/crypto.gni")
import("//build/config/features.gni")
import("//build/config/sysroot.gni")
import("//extensions/features/features.gni")
import("//printing/features/features.gni")

static_library("utility") {
  sources = [
    "chrome_content_utility_client.cc",
    "chrome_content_utility_client.h",
    "cloud_print/bitmap_image.cc",
    "cloud_print/bitmap_image.h",
    "cloud_print/pwg_encoder.cc",
    "cloud_print/pwg_encoder.h",
    "ipc_shell_handler_win.cc",
    "ipc_shell_handler_win.h",
    "printing_handler.cc",
    "printing_handler.h",
    "shell_handler_impl_win.cc",
    "shell_handler_impl_win.h",
    "utility_message_handler.h",
  ]

  defines = []
  configs += [
    "//build/config:precompiled_headers",
    "//build/config/compiler:wexit_time_destructors",
  ]

  public_deps = []
  deps = [
    "//base",
    "//chrome:resources",
    "//chrome:strings",
    "//chrome/common",
    "//chrome/common:mojo_bindings",
    "//components/safe_json/utility",
    "//components/search_engines",
    "//components/strings",
    "//components/url_formatter",
    "//content/public/child",
    "//content/public/common",
    "//content/public/utility",
    "//courgette:courgette_lib",
    "//extensions/features",
    "//ipc",
    "//media",
    "//net:net_with_v8",
    "//printing/features",
    "//services/image_decoder:lib",
    "//services/image_decoder/public/cpp",
    "//services/service_manager/public/cpp",
    "//skia",
    "//sql",
    "//third_party/libxml",
  ]

  if (!is_android) {
    sources += [
      "importer/bookmark_html_reader.cc",
      "importer/bookmark_html_reader.h",
      "importer/bookmarks_file_importer.cc",
      "importer/bookmarks_file_importer.h",
      "importer/edge_database_reader_win.cc",
      "importer/edge_database_reader_win.h",
      "importer/edge_importer_win.cc",
      "importer/edge_importer_win.h",
      "importer/external_process_importer_bridge.cc",
      "importer/external_process_importer_bridge.h",
      "importer/favicon_reencode.cc",
      "importer/favicon_reencode.h",
      "importer/firefox_importer.cc",
      "importer/firefox_importer.h",
      "importer/ie_importer_win.cc",
      "importer/ie_importer_win.h",
      "importer/importer.cc",
      "importer/importer.h",
      "importer/importer_creator.cc",
      "importer/importer_creator.h",
      "importer/nss_decryptor.cc",
      "importer/nss_decryptor.h",
      "importer/nss_decryptor_mac.h",
      "importer/nss_decryptor_mac.mm",
      "importer/nss_decryptor_win.cc",
      "importer/nss_decryptor_win.h",
      "importer/safari_importer.h",
      "importer/safari_importer.mm",
      "profile_import_handler.cc",
      "profile_import_handler.h",
    ]
    deps += [
      "//chrome/common:mojo_bindings",
      "//chrome/common/importer:interfaces",
      "//net:net_utility_services",
    ]
  }

  if (enable_extensions) {
    sources += [
      "extensions/extensions_handler.cc",
      "extensions/extensions_handler.h",
      "image_writer/disk_unmounter_mac.cc",
      "image_writer/disk_unmounter_mac.h",
      "image_writer/error_messages.cc",
      "image_writer/error_messages.h",
      "image_writer/image_writer.cc",
      "image_writer/image_writer.h",
      "image_writer/image_writer_handler.cc",
      "image_writer/image_writer_handler.h",
      "image_writer/image_writer_mac.cc",
      "image_writer/image_writer_win.cc",
      "media_galleries/ipc_data_source.cc",
      "media_galleries/ipc_data_source.h",
      "media_galleries/itunes_pref_parser_win.cc",
      "media_galleries/itunes_pref_parser_win.h",
      "media_galleries/media_metadata_parser.cc",
      "media_galleries/media_metadata_parser.h",
    ]
    deps += [
      "//chrome/common/extensions/api",
      "//extensions/utility",
    ]

    public_deps += [ "//chrome/common/extensions/api" ]

    # Prevent wininet from loading in the renderer. http://crbug.com/460679
    if (is_win) {
      ldflags = [ "/DELAYLOAD:wininet.dll" ]

      # Add ESE library for Edge Import support.
      libs = [ "esent.lib" ]
      ldflags += [ "/DELAYLOAD:esent.dll" ]
    }

    if (is_win || is_mac) {
      sources += [
        "media_galleries/iapps_xml_utils.cc",
        "media_galleries/iapps_xml_utils.h",
        "media_galleries/itunes_library_parser.cc",
        "media_galleries/itunes_library_parser.h",
        "media_galleries/picasa_album_table_reader.cc",
        "media_galleries/picasa_album_table_reader.h",
        "media_galleries/picasa_albums_indexer.cc",
        "media_galleries/picasa_albums_indexer.h",
        "media_galleries/pmp_column_reader.cc",
        "media_galleries/pmp_column_reader.h",
      ]
      deps += [ "//components/wifi" ]
    } else {
      sources += [ "image_writer/image_writer_stub.cc" ]
    }
  }

  if (use_nss_certs) {
    sources += [
      "importer/nss_decryptor_system_nss.cc",
      "importer/nss_decryptor_system_nss.h",
    ]
    deps += [
      "//crypto",
      "//crypto:platform",
    ]
  }

  if (enable_print_preview || (enable_basic_printing && is_win)) {
    deps += [ "//pdf" ]
  } else {
    sources -= [
      "printing_handler.cc",
      "printing_handler.h",
    ]
  }

  if (is_mac && safe_browsing_mode == 1) {
    deps += [ "//chrome/utility/safe_browsing/mac" ]
  }
}