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

Side by Side Diff: headless/BUILD.gn

Issue 1969313005: [headless] Embed pak file into binary. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updated years in copyright Created 3 years, 10 months 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 | « build/args/headless.gn ('k') | headless/headless.gni » ('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 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import("//build/config/chrome_build.gni") 5 import("//build/config/chrome_build.gni")
6 import("//headless/headless.gni")
6 import("//mojo/public/tools/bindings/mojom.gni") 7 import("//mojo/public/tools/bindings/mojom.gni")
7 import("//testing/test.gni") 8 import("//testing/test.gni")
8 import("//tools/grit/grit_rule.gni") 9 import("//tools/grit/grit_rule.gni")
9 import("//tools/grit/repack.gni") 10 import("//tools/grit/repack.gni")
10 11
11 config("headless_implementation") { 12 config("headless_implementation") {
12 defines = [ "HEADLESS_IMPLEMENTATION" ] 13 defines = [ "HEADLESS_IMPLEMENTATION" ]
14
15 if (headless_use_embedded_resources) {
16 defines += [ "HEADLESS_USE_EMBEDDED_RESOURCES" ]
17 }
13 } 18 }
14 19
15 group("headless") { 20 group("headless") {
16 deps = [ 21 deps = [
17 "//headless:headless_lib", 22 "//headless:headless_lib",
18 ] 23 ]
19 } 24 }
20 25
21 repack("pak") { 26 repack("pak") {
22 sources = [ 27 sources = [
(...skipping 30 matching lines...) Expand all
53 "//net:net_resources", 58 "//net:net_resources",
54 "//third_party/WebKit/public:image_resources", 59 "//third_party/WebKit/public:image_resources",
55 "//third_party/WebKit/public:resources", 60 "//third_party/WebKit/public:resources",
56 "//ui/resources", 61 "//ui/resources",
57 "//ui/strings", 62 "//ui/strings",
58 ] 63 ]
59 64
60 output = "$root_out_dir/headless_lib.pak" 65 output = "$root_out_dir/headless_lib.pak"
61 } 66 }
62 67
68 action("embed_resources") {
69 # TODO(altimin): Consider zipping file here, it can reduce size up to 80%.
70 script = "//headless/lib/embed_data.py"
71
72 inputs = [
73 "$root_out_dir/headless_lib.pak",
74 ]
75
76 outputs = [
77 "$root_gen_dir/headless/embedded_resource_pak.cc",
78 "$root_gen_dir/headless/embedded_resource_pak.h",
79 ]
80
81 args = [
82 "--data_file",
83 rebase_path("$root_out_dir/headless_lib.pak"),
84 "--gendir",
85 rebase_path("$root_gen_dir"),
86 "--header_file",
87 "headless/embedded_resource_pak.h",
88 "--source_file",
89 "headless/embedded_resource_pak.cc",
90 "--namespace",
91 "headless",
92 "--variable_name",
93 "kHeadlessResourcePak",
94 ]
95
96 deps = [
97 ":pak",
98 ]
99 }
100
63 grit("resources") { 101 grit("resources") {
64 source = "lib/resources/headless_lib_resources.grd" 102 source = "lib/resources/headless_lib_resources.grd"
65 outputs = [ 103 outputs = [
66 "grit/headless_lib_resources.h", 104 "grit/headless_lib_resources.h",
67 "$root_gen_dir/headless/headless_lib_resources.pak", 105 "$root_gen_dir/headless/headless_lib_resources.pak",
68 ] 106 ]
69 } 107 }
70 108
71 devtools_domains = [ 109 devtools_domains = [
72 "accessibility", 110 "accessibility",
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 "public/util/testing/generic_url_request_mocks.h", 259 "public/util/testing/generic_url_request_mocks.h",
222 "public/util/url_fetcher.cc", 260 "public/util/url_fetcher.cc",
223 "public/util/url_fetcher.h", 261 "public/util/url_fetcher.h",
224 "public/util/url_request_dispatcher.h", 262 "public/util/url_request_dispatcher.h",
225 "public/util/user_agent.cc", 263 "public/util/user_agent.cc",
226 "public/util/user_agent.h", 264 "public/util/user_agent.h",
227 ] 265 ]
228 266
229 deps = [ 267 deps = [
230 ":gen_devtools_client_api", 268 ":gen_devtools_client_api",
231 ":pak",
232 "//base", 269 "//base",
233 "//components/security_state/content", 270 "//components/security_state/content",
234 "//components/security_state/core", 271 "//components/security_state/core",
235 "//content/public/app:both", 272 "//content/public/app:both",
236 "//content/public/browser", 273 "//content/public/browser",
237 "//content/public/common", 274 "//content/public/common",
238 "//content/public/common:service_names", 275 "//content/public/common:service_names",
239 "//net", 276 "//net",
240 "//services/service_manager/public/cpp", 277 "//services/service_manager/public/cpp",
241 "//third_party/mesa:osmesa", 278 "//third_party/mesa:osmesa",
242 "//ui/aura", 279 "//ui/aura",
243 "//ui/base", 280 "//ui/base",
244 "//ui/compositor", 281 "//ui/compositor",
245 "//ui/display", 282 "//ui/display",
246 "//ui/events/devices", 283 "//ui/events/devices",
247 "//url", 284 "//url",
248 ] 285 ]
249 286
287 if (headless_use_embedded_resources) {
288 deps += [ ":embed_resources" ]
289 sources += [
290 "$root_gen_dir/headless/embedded_resource_pak.cc",
291 "$root_gen_dir/headless/embedded_resource_pak.h",
292 ]
293 } else {
294 deps += [ ":pak" ]
295 }
296
250 if (use_ozone) { 297 if (use_ozone) {
251 deps += [ "//ui/ozone" ] 298 deps += [ "//ui/ozone" ]
252 } 299 }
253 300
254 configs += [ ":headless_implementation" ] 301 configs += [ ":headless_implementation" ]
255 } 302 }
256 303
257 group("headless_tests") { 304 group("headless_tests") {
258 testonly = true 305 testonly = true
259 306
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 419
373 executable("headless_shell") { 420 executable("headless_shell") {
374 sources = [ 421 sources = [
375 "app/headless_shell_main.cc", 422 "app/headless_shell_main.cc",
376 ] 423 ]
377 424
378 deps = [ 425 deps = [
379 "//headless:headless_shell_lib", 426 "//headless:headless_shell_lib",
380 ] 427 ]
381 } 428 }
OLDNEW
« no previous file with comments | « build/args/headless.gn ('k') | headless/headless.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698