1 # Copyright (c) 2013 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.
5 import("//crypto/ssl/flags.gni")
6 import("//tools/grit/grit_rule.gni")
10 "app/breakpad_field_trial_win.cc",
11 "app/breakpad_field_trial_win.h",
12 "app/breakpad_win.cc",
14 "app/chrome_dll_resource.h",
15 "app/chrome_exe_main_aura.cc",
16 "app/chrome_exe_main_gtk.cc",
17 "app/chrome_exe_main_mac.cc",
18 "app/chrome_exe_main_win.cc",
19 "app/chrome_exe_resource.h",
21 "app/chrome_main_delegate.cc",
22 "app/chrome_main_delegate.h",
25 "app/hard_error_handler_win.cc",
26 "app/hard_error_handler_win.h",
27 "app/metro_driver_win.cc",
28 "app/metro_driver_win.h",
29 "../content/app/startup_helper_win.cc",
34 # TODO(brettw) this is wrong, it should be picked up from deps.
35 "//build/config/linux:gtk",
36 "//build/config/linux:x11",
41 # TODO(brettw) this is right on linux? Everything is linked into the
42 # exe, but wrong on Windows, where chrome_exe and chrome_dll are separate.
52 # TODO(brettw) this isn't right for all platforms.
54 sources -= "app/chrome_exe_main_aura.cc"
65 static_library("browser") {
70 if (toolkit_uses_gtk) {
76 "//build/config/linux:x11",
81 "//third_party/expat",
85 static_library("common") {
88 if (use_nss && is_linux) {
89 # common/net uses NSS.
90 # TODO(brettw) have a better way to express this without having to do
91 # "if (use_nss)" everywhere.
92 configs += "//third_party/nss:nss_linux_config"
98 # TODO(brettw) move to browser/devtools/BUILD.gn
99 source_set("debugger") {
101 "browser/devtools/adb/android_rsa.cc",
102 "browser/devtools/adb/android_rsa.h",
103 "browser/devtools/adb/android_usb_device.cc",
104 "browser/devtools/adb/android_usb_device.h",
105 "browser/devtools/adb/android_usb_socket.cc",
106 "browser/devtools/adb/android_usb_socket.h",
107 "browser/devtools/adb_client_socket.cc",
108 "browser/devtools/adb_client_socket.h",
109 "browser/devtools/adb_web_socket.cc",
110 "browser/devtools/adb_web_socket.h",
111 "browser/devtools/browser_list_tabcontents_provider.cc",
112 "browser/devtools/browser_list_tabcontents_provider.h",
113 "browser/devtools/devtools_adb_bridge.cc",
114 "browser/devtools/devtools_adb_bridge.h",
115 "browser/devtools/devtools_embedder_message_dispatcher.cc",
116 "browser/devtools/devtools_embedder_message_dispatcher.h",
117 "browser/devtools/devtools_file_helper.cc",
118 "browser/devtools/devtools_file_helper.h",
119 "browser/devtools/devtools_file_system_indexer.cc",
120 "browser/devtools/devtools_file_system_indexer.h",
121 "browser/devtools/devtools_protocol.cc",
122 "browser/devtools/devtools_protocol.h",
123 "browser/devtools/devtools_toggle_action.h",
124 "browser/devtools/devtools_window.cc",
125 "browser/devtools/devtools_window.h",
126 "browser/devtools/port_forwarding_controller.cc",
127 "browser/devtools/port_forwarding_controller.h",
128 "browser/devtools/remote_debugging_server.cc",
129 "browser/devtools/remote_debugging_server.h",
133 # ":chrome_extra_resources",
134 # ":chrome_resources",
136 # ":theme_resources",
141 "//third_party/icu:icui18n",
142 "//third_party/icu:icuuc",
143 "//third_party/leveldatabase",
144 "//third_party/libusb",
149 "browser/devtools/adb/android_rsa.cc",
150 "browser/devtools/browser_list_tabcontents_provider.cc",
151 "browser/devtools/devtools_file_system_indexer.cc",
152 "browser/devtools/devtools_window.cc",
153 "browser/devtools/remote_debugging_server.cc",
155 deps -= "//third_party/libusb"
158 # TODO implement debug_devtools
159 # if (debug_devtools) {
160 # defines = [ "DEBUG_DEVTOOLS=1" ]
162 # TODO(brettw) this may be required on Windows:
164 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
165 # 'msvs_disabled_warnings': [ 4267, ]
170 source_set("plugin") {
174 source_set("renderer") {
178 source_set("utility") {
183 # Credits ----------------------------------------------------------------------
185 about_credits_file = "$root_gen_dir/about_credits.html"
186 build_relative_about_credits_file =
187 rebase_path(about_credits_file, ".", root_build_dir)
189 custom("about_credits") {
190 script = "//tools/licenses.py"
191 outputs = [ about_credits_file ]
193 # This script is impossible to write proper input dependencies for because it
194 # basically greps the source tree for third_party directories. If a directory
195 # is added or removed, it will change the result, but there is no way to
196 # express this as a build dependency. We approximate this by depending on
197 # the last change file to force an update whenever the code is updated.
198 source_prereqs = [ "//build/util/LASTCHANGE" ]
202 args = [ "credits", build_relative_about_credits_file ]
205 # Resources --------------------------------------------------------------------
207 #group("chrome_resources") {
209 # ":browser_resources",
210 # ":common_resources",
211 # ":renderer_resources",
214 #grit("browser_resources") {
215 # source = "browser/browser_resources.grd"
216 # grit_flags = [ "-E", "about_credits_file=$build_relative_about_credits_file" ]
217 # deps = [ ":about_credits" ]
219 #grit("common_resources") {
220 # source = "common/common_resources.grd"
222 #grit("renderer_resources") {
223 # source = "renderer/resources/renderer_resources.grd"
226 #group("chrome_strings") {
228 # ":locale_settings",
229 # ":chromium_strings",
230 # ":generated_resources",
231 # ":google_chrome_strings",
234 #grit("locale_settings") {
235 # source = "app/resources/locale_settings.grd"
237 #grit("chromium_strings") {
238 # source = "app/chromium_strings.grd"
240 #grit("generated_resources") {
241 # source = "app/generated_resources.grd"
243 #grit("google_chrome_strings") {
244 # source = "app/google_chrome_strings.grd"
247 #group("chrome_extra_resources") {
249 # ":memory_internals_resources",
250 # ":net_internals_resources",
251 # ":signin_internals_resources",
252 # ":sync_internals_resources",
253 # ":translate_internals_resources",
258 # ":component_extension_resources",
259 # ":devtools_discovery_page_resources",
260 # ":options_resources",
261 # ":quota_internals_resources",
262 # ":sync_file_system_internals_resources",
266 #grit("component_extension_resources") {
267 # source = "browser/resources/component_extension_resources.grd"
269 #grit("devtools_discovery_page_resources") {
270 # source = "browser/devtools/frontend/devtools_discovery_page_resources.grd"
272 #grit("memory_internals_resources") {
273 # source = "browser/resources/memory_internals_resources.grd"
275 #grit("quota_internals_resources") {
276 # source = "browser/resources/quota_internals_resources.grd"
278 #grit("net_internals_resources") {
279 # source = "browser/resources/net_internals_resources.grd"
281 #grit("options_resources") {
282 # source = "browser/resources/options_resources.grd"
284 #grit("signin_internals_resources") {
285 # source = "browser/resources/signin_internals_resources.grd"
287 #grit("sync_file_system_internals_resources") {
288 # source = "browser/resources/sync_file_system_internals_resources.grd"
290 #grit("sync_internals_resources") {
291 # source = "browser/resources/sync_internals_resources.grd"
293 #grit("translate_internals_resources") {
294 # source = "browser/resources/translate_internals_resources.grd"
297 #group("theme_resources") {
299 # ":theme_resources_gen",
300 # #"//ui:ui_resources",
304 ## TODO(brettw) rename "app_theme_resources" or something when we don't support
305 ## GYP any more. This name is required to match the GYP build.
306 #grit("theme_resources_gen") {
307 # source = "app/theme/theme_resources.grd"