OLD | NEW |
---|---|
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("//headless/headless.gni") |
7 import("//build/util/process_version.gni") | 7 import("//build/util/process_version.gni") |
8 import("//mojo/public/tools/bindings/mojom.gni") | 8 import("//mojo/public/tools/bindings/mojom.gni") |
9 import("//printing/features/features.gni") | 9 import("//printing/features/features.gni") |
10 import("//testing/test.gni") | 10 import("//testing/test.gni") |
11 import("//tools/grit/grit_rule.gni") | 11 import("//tools/grit/grit_rule.gni") |
12 import("//tools/grit/repack.gni") | 12 import("//tools/grit/repack.gni") |
13 | 13 |
14 config("headless_implementation") { | 14 config("headless_implementation") { |
15 defines = [ "HEADLESS_IMPLEMENTATION" ] | 15 defines = [ "HEADLESS_IMPLEMENTATION" ] |
16 | 16 |
17 if (headless_use_embedded_resources) { | 17 if (headless_use_embedded_resources) { |
18 defines += [ "HEADLESS_USE_EMBEDDED_RESOURCES" ] | 18 defines += [ "HEADLESS_USE_EMBEDDED_RESOURCES" ] |
19 } | 19 } |
20 } | 20 } |
21 | 21 |
22 group("headless") { | 22 group("headless") { |
23 deps = [ | 23 deps = [ |
24 "//headless:headless_lib", | 24 "//headless:headless_lib", |
25 ] | 25 ] |
26 } | 26 } |
27 | 27 |
28 repack_locales("locale_pak") { | |
Eric Seckler
2017/04/20 09:15:28
I'm not very familiar with locales. Can you explai
jzfeng
2017/04/27 06:56:05
The locale pak is loaded by ResourceBundle::LoadLo
Eric Seckler
2017/04/27 08:57:00
I have two concerns about this:
a) Would this have
altimin
2017/04/27 15:16:34
Yes, current approach does not support embedded re
jzfeng
2017/05/02 07:50:55
Thanks for the help!
Managed to find a way to avoi
| |
29 input_locales = [ "en-US" ] | |
30 | |
31 if (!is_mac) { | |
32 output_locales = [ "en-US" ] | |
33 } else { | |
34 output_locales = [ "locale" ] | |
35 } | |
36 | |
37 source_patterns = [ | |
38 "$root_gen_dir/ui/strings/app_locale_settings_", | |
39 "$root_gen_dir/ui/strings/ui_strings_", | |
40 ] | |
41 | |
42 deps = [ | |
43 "//ui/strings", | |
44 ] | |
45 | |
46 output_dir = "$root_out_dir/headless_locales" | |
47 } | |
48 | |
28 repack("pak") { | 49 repack("pak") { |
29 sources = [ | 50 sources = [ |
30 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak" , | 51 "$root_gen_dir/blink/public/resources/blink_image_resources_100_percent.pak" , |
31 "$root_gen_dir/blink/public/resources/blink_resources.pak", | 52 "$root_gen_dir/blink/public/resources/blink_resources.pak", |
53 "$root_gen_dir/components/components_resources.pak", | |
32 "$root_gen_dir/components/strings/components_strings_en-US.pak", | 54 "$root_gen_dir/components/strings/components_strings_en-US.pak", |
33 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", | 55 "$root_gen_dir/content/app/resources/content_resources_100_percent.pak", |
34 "$root_gen_dir/content/app/strings/content_strings_en-US.pak", | 56 "$root_gen_dir/content/app/strings/content_strings_en-US.pak", |
35 "$root_gen_dir/content/browser/devtools/devtools_resources.pak", | 57 "$root_gen_dir/content/browser/devtools/devtools_resources.pak", |
36 "$root_gen_dir/content/browser/tracing/tracing_resources.pak", | 58 "$root_gen_dir/content/browser/tracing/tracing_resources.pak", |
37 "$root_gen_dir/content/content_resources.pak", | 59 "$root_gen_dir/content/content_resources.pak", |
38 "$root_gen_dir/headless/headless_lib_resources.pak", | 60 "$root_gen_dir/headless/headless_lib_resources.pak", |
39 "$root_gen_dir/net/net_resources.pak", | 61 "$root_gen_dir/net/net_resources.pak", |
40 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", | 62 "$root_gen_dir/ui/resources/ui_resources_100_percent.pak", |
41 "$root_gen_dir/ui/resources/webui_resources.pak", | 63 "$root_gen_dir/ui/resources/webui_resources.pak", |
42 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", | 64 "$root_gen_dir/ui/strings/app_locale_settings_en-US.pak", |
43 "$root_gen_dir/ui/strings/ui_strings_en-US.pak", | 65 "$root_gen_dir/ui/strings/ui_strings_en-US.pak", |
44 ] | 66 ] |
45 | 67 |
46 if (is_chrome_branded) { | 68 if (is_chrome_branded) { |
47 sources += [ "${root_gen_dir}/components/strings/components_google_chrome_st rings_en-US.pak" ] | 69 sources += [ "${root_gen_dir}/components/strings/components_google_chrome_st rings_en-US.pak" ] |
48 } else { | 70 } else { |
49 sources += [ "${root_gen_dir}/components/strings/components_chromium_strings _en-US.pak" ] | 71 sources += [ "${root_gen_dir}/components/strings/components_chromium_strings _en-US.pak" ] |
50 } | 72 } |
51 | 73 |
52 deps = [ | 74 deps = [ |
53 ":resources", | 75 ":resources", |
76 "//components/resources:components_resources", | |
54 "//components/strings", | 77 "//components/strings", |
55 "//content:resources", | 78 "//content:resources", |
56 "//content/app/resources", | 79 "//content/app/resources", |
57 "//content/app/strings", | 80 "//content/app/strings", |
58 "//content/browser/devtools:resources", | 81 "//content/browser/devtools:resources", |
59 "//content/browser/tracing:resources", | 82 "//content/browser/tracing:resources", |
60 "//net:net_resources", | 83 "//net:net_resources", |
61 "//third_party/WebKit/public:image_resources", | 84 "//third_party/WebKit/public:image_resources", |
62 "//third_party/WebKit/public:resources", | 85 "//third_party/WebKit/public:resources", |
63 "//ui/resources", | 86 "//ui/resources", |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
316 ] | 339 ] |
317 } | 340 } |
318 | 341 |
319 public_deps = [ | 342 public_deps = [ |
320 "//base", | 343 "//base", |
321 "//net", | 344 "//net", |
322 ] | 345 ] |
323 | 346 |
324 deps = [ | 347 deps = [ |
325 ":gen_devtools_client_api", | 348 ":gen_devtools_client_api", |
349 ":locale_pak", | |
326 ":tab_socket", | 350 ":tab_socket", |
327 ":version_header", | 351 ":version_header", |
328 "//components/crash/content/browser", | 352 "//components/crash/content/browser", |
329 "//components/security_state/content", | 353 "//components/security_state/content", |
330 "//components/security_state/core", | 354 "//components/security_state/core", |
331 "//content/public/app:both", | 355 "//content/public/app:both", |
332 "//content/public/browser", | 356 "//content/public/browser", |
333 "//content/public/child:child", | 357 "//content/public/child:child", |
334 "//content/public/common", | 358 "//content/public/common", |
335 "//content/public/common:service_names", | 359 "//content/public/common:service_names", |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 | 547 |
524 executable("headless_example") { | 548 executable("headless_example") { |
525 sources = [ | 549 sources = [ |
526 "app/headless_example.cc", | 550 "app/headless_example.cc", |
527 ] | 551 ] |
528 | 552 |
529 deps = [ | 553 deps = [ |
530 "//headless:headless_shell_lib", | 554 "//headless:headless_shell_lib", |
531 ] | 555 ] |
532 } | 556 } |
OLD | NEW |