Update a test to use PushSubscription.getKey()
[chromium-blink-merge.git] / chrome / BUILD.gn
blob09f0bc0536a06c602b5719a6e9bdd45ac2a18f97
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.
5 import("//build/config/chrome_build.gni")
6 import("//build/config/features.gni")
7 import("//build/config/locales.gni")
8 import("//build/config/ui.gni")
9 import("//build/config/win/manifest.gni")
10 import("//chrome/chrome_repack_locales.gni")
11 import("//chrome/version.gni")
13 if (is_android) {
14   import("//build/config/android/rules.gni")
17 if (!is_android) {
18   # TODO(GYP) bug 512599: for Windows need to the the reorder-imports step
19   # which probably means adding another target and renaming this to
20   # chrome_initial like in GYP.
21   executable("chrome") {
22     # Because the sources list varies so significantly per-platform, generally
23     # each platform lists its own files rather than relying on filtering or
24     # removing unused files.
25     sources = [
26       "app/chrome_exe_resource.h",
27     ]
28     defines = []
29     deps = []
30     data_deps = []
32     # TODO(GYP) mac_bundle_resources, xcode_settings
34     if (is_win) {
35       sources += [
36         "//content/public/common/content_switches.cc",
37         "//content/public/common/content_switches.h",
38         "app/chrome_crash_reporter_client.cc",
39         "app/chrome_crash_reporter_client.h",
40         "app/chrome_exe.rc",
41         "app/chrome_exe_load_config_win.cc",
42         "app/chrome_exe_main_win.cc",
43         "app/chrome_watcher_client_win.cc",
44         "app/chrome_watcher_client_win.h",
45         "app/chrome_watcher_command_line_win.cc",
46         "app/chrome_watcher_command_line_win.h",
47         "app/client_util.cc",
48         "app/client_util.h",
49         "app/kasko_client.cc",
50         "app/kasko_client.h",
51         "app/signature_validator_win.cc",
52         "app/signature_validator_win.h",
53         "common/crash_keys.cc",
54         "common/crash_keys.h",
55       ]
57       if (is_component_build) {
58         # This is necessary to make content_switches compile without DLL
59         # linkage errors in a component build.
60         defines += [ "COMPILE_CONTENT_STATICALLY" ]
61       }
63       deps += [
64         ":chrome_exe_version",
65         ":image_pre_reader",
66         ":main_dll",
68         # 'chrome_nacl_win64" TODO(GYP) bug 512869
69         # '../win8/delegate_execute/delegate_execute.gyp:*', TODO(GYP) bug 512867
70         # '../win8/metro_driver/metro_driver.gyp:metro_driver', TODO(GYP) bug 512864
71         "//base",
72         "//breakpad:breakpad_handler",
73         "//breakpad:breakpad_sender",
74         "//chrome/app/version_assembly:chrome_exe_manifest",
75         "//chrome/browser:chrome_process_finder",
76         "//chrome/chrome_watcher",
77         "//chrome/chrome_watcher:client",
78         "//chrome/installer/util",
79         "//chrome_elf",
80         "//components/browser_watcher:browser_watcher_client",
81         "//components/crash/app",
82         "//components/crash_keys",
83         "//content:startup_helper_win",
84         "//crypto",
85         "//sandbox",
86         "//ui/gfx",
87       ]
88       data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ]
90       libs = [
91         "wintrust.lib",
92         "crypt32.lib",
93       ]
94       configs -= [ "//build/config/win:console" ]
95       configs += [ "//build/config/win:windowed" ]
96     } else if (use_aura) {
97       # Non-Windows aura entrypoint.
98       sources += [ "app/chrome_exe_main_aura.cc" ]
99     }
101     if (is_linux) {
102       sources += [
103         "app/chrome_dll_resource.h",
104         "app/chrome_main.cc",
105         "app/chrome_main_delegate.cc",
106         "app/chrome_main_delegate.h",
107       ]
109       deps += [
110         # On Linux, link the dependencies (libraries) that make up actual
111         # Chromium functionality directly into the executable.
112         ":browser_dependencies",
113         ":child_dependencies",
114         ":manpage",
115         "//base/allocator",
117         # Needed to use the master_preferences functions
118         "//chrome/installer/util",
119         "//content/public/app:both",
120       ]
122       # Needed for chrome_main.cc initialization of libraries.
123       configs += [ "//build/config/linux:pangocairo" ]
125       # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition.
126       # but GN doesn't have either of these flags.
127       ldflags = [ "-pie" ]
129       if (use_x11) {
130         configs += [
131           "//build/config/linux:x11",
132           "//build/config/linux:xext",
133         ]
134       }
135     }
137     if (is_mac) {
138       sources += [ "app/chrome_exe_main_mac.cc" ]
139       # TODO(GYP) lots more stuff in the is_mac block.
140     } else {  # Non-Mac.
141       # These files are used by the installer so we need a public dep.
142       public_deps = [
143         ":packed_extra_resources",
144         ":packed_resources",
145       ]
146       deps += [
147         "//components/startup_metric_utils",
149         # Precompiled plugins that need to get copied to the output directory.
150         # On Mac, internal plugins go inside the framework, so these
151         # dependencies are on chrome.dll.
152         "//third_party/adobe/flash:flapper_binaries",
153         "//third_party/widevine/cdm:widevinecdmadapter",
154       ]
155     }
157     if (is_linux && enable_plugins) {
158       deps += [ "//pdf" ]
159     }
161     if (is_multi_dll_chrome) {
162       defines += [ "CHROME_MULTIPLE_DLL" ]
163       data_deps += [ ":chrome_child" ]
164     }
165   }
166 }  # !is_android
168 shared_library("main_dll") {
169   configs += [ "//build/config/compiler:wexit_time_destructors" ]
170   defines = []
172   deps = [
173     ":browser_dependencies",
174     "//base/allocator",
175   ]
176   if (is_win) {
177     output_name = "chrome"
179     sources = [
180       "//base/win/dllmain.cc",
181       "app/chrome_command_ids.h",
182       "app/chrome_dll.rc",
183       "app/chrome_dll_resource.h",
184       "app/chrome_main.cc",
185       "app/chrome_main_delegate.cc",
186       "app/chrome_main_delegate.h",
187       "app/close_handle_hook_win.cc",
188       "app/close_handle_hook_win.h",
189       "app/delay_load_hook_win.cc",
190       "app/delay_load_hook_win.h",
191     ]
193     deps += [
194       ":chrome_dll_manifest",
195       ":chrome_dll_version",
196       "//base/trace_event/etw_manifest:chrome_events_win",
197       "//chrome/app/theme:chrome_unscaled_resources",
198       "//chrome_elf",
199       "//content/app/resources",
200       "//crypto",
201       "//net:net_resources",
202       "//third_party/wtl",
203       "//ui/views",
204     ]
205     if (enable_configuration_policy) {
206       deps += [ "//components/policy" ]
207     }
208     if (current_cpu == "x86") {
209       # TODO(GYP) bug 512861: Lots of VCLinkerTool stuff on Windows.
210       #deps += [ 'chrome_user32_delay_imports' ]  TODO(GYP)
211     }
213     # This is a large module that can't do incremental linking in some cases.
214     configs -= [ "//build/config/win:default_incremental_linking" ]
215     configs += [ "//build/config/win:default_large_module_incremental_linking" ]
217     # TODO(GYP) bug 512851: PGO.
218   }
220   if (use_aura) {
221     deps += [ "//ui/compositor" ]
222   }
224   if (is_multi_dll_chrome) {
225     defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
226     deps += [ "//content/public/app:browser" ]
227   } else {
228     deps += [
229       ":child_dependencies",
230       "//content/public/app:both",
231     ]
232   }
234   if (cld_version == 2) {
235     deps += [ "//third_party/cld_2" ]
236   }
238   if (is_mac) {
239     #['OS=="mac" and component!="shared_library"', {  TODO(GYP)
240     #  'includes': [ 'chrome_dll_bundle.gypi' ],
241     #}],
242     # TODO(GYP) Lots of other stuff in the OS=="mac" block.
243   }
245   if (enable_plugins && !is_multi_dll_chrome) {
246     deps += [ "//pdf" ]
247   }
250 if (is_multi_dll_chrome) {
251   # This manifest matches what GYP produces. It may not even be necessary.
252   windows_manifest("chrome_child_manifest") {
253     sources = [
254       as_invoker_manifest,
255     ]
256     type = "dll"
257   }
259   shared_library("chrome_child") {
260     sources = [
261       "app/chrome_main.cc",
262       "app/chrome_main_delegate.cc",
263       "app/chrome_main_delegate.h",
264       "app/close_handle_hook_win.cc",
265       "app/close_handle_hook_win.h",
266     ]
268     configs += [ "//build/config/compiler:wexit_time_destructors" ]
269     defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
271     deps = [
272       ":child_dependencies",
273       ":chrome_child_manifest",
274       ":chrome_dll_version",
275       "//base/allocator",
276       "//chrome/browser/policy:path_parser",
277       "//content/public/app:child",
278     ]
280     if (is_win) {
281       # TODO(GYP) bug 512851: PGO on Windows.
282       # ['chrome_pgo_phase==1', {
283       #   'msvs_settings': {
284       #     'VCLinkerTool': {
285       #       'LinkTimeCodeGeneration': '2',
286       #     },
287       #   },
288       # }],
289       # ['chrome_pgo_phase==2', {
290       #   'msvs_settings': {
291       #     'VCLinkerTool': {
292       #       'LinkTimeCodeGeneration': '3',
293       #     },
294       #   },
295       # }],
296     }
297     if (enable_plugins) {
298       deps += [ "//pdf" ]
299     }
300   }
303 # GYP version: chromium_browser_dependencies variable in chrome.gyp
304 group("browser_dependencies") {
305   deps = [
306     "//chrome/browser",
307     "//chrome/common",
308     "//sync",
309   ]
310   if (!is_ios) {
311     deps += [ "//ppapi/host" ]
312   }
314   if (enable_basic_printing || enable_print_preview) {
315     deps += [ "//printing" ]
316     if (enable_print_preview) {
317       deps += [ "//chrome/service" ]
318     }
319   }
322 # GYP version: chromium_child_dependencies variable in chrome.gyp
323 group("child_dependencies") {
324   deps = [
325     "//chrome/common",
326     "//sync",
327   ]
328   if (!is_ios) {
329     deps += [
330       "//chrome/browser/devtools",
331       "//chrome/child",
332       "//chrome/plugin",
333       "//chrome/renderer",
334       "//chrome/utility",
335       "//content/public/child",
336       "//third_party/WebKit/public:blink_devtools_frontend_resources",
337     ]
338   }
339   if (cld_version == 2) {
340     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
341   }
343   if (enable_nacl) {
344     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
345   }
348 if (is_win) {
349   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
350   # Linux.
351   process_version("version_header") {
352     # TODO(brettW) this should have more reduced visibility, but chrome/browser
353     # currently depends on this.
354     #visibility = [ ":*" ]
356     # This one just uses the custom template and no separate sources.
357     sources = []
358     template_file = "version.h.in"
360     # TODO(brettw) this should move to $target_gen_dir/version.h and
361     # source files including it should reference it via "chrome/version.h"
362     output = "$root_gen_dir/version.h"
363   }
365   process_version("chrome_exe_version") {
366     sources = [
367       "app/chrome_exe.ver",
368     ]
369     output = "$target_gen_dir/chrome_exe_version.rc"
370   }
372   process_version("chrome_dll_version") {
373     sources = [
374       "app/chrome_dll.ver",
375     ]
376     output = "$target_gen_dir/chrome_dll_version.rc"
377   }
379   # This manifest matches what GYP produces. It may not even be necessary.
380   windows_manifest("chrome_dll_manifest") {
381     sources = [
382       as_invoker_manifest,
383       common_controls_manifest,
384     ]
385     type = "dll"
386   }
388   process_version("nacl64_exe_version") {
389     sources = [
390       "app/nacl64_exe.ver",
391     ]
392     output = "$target_gen_dir/nacl64_exe_version.rc"
393   }
395   process_version("other_version") {
396     sources = [
397       "app/other.ver",
398     ]
399     output = "$target_gen_dir/other_version.rc"
400   }
402   source_set("image_pre_reader") {
403     sources = [
404       "app/image_pre_reader_win.cc",
405       "app/image_pre_reader_win.h",
406     ]
407     deps = [
408       "//base",
409     ]
410   }
413 # GYP version: chrome/chrome_resources.gyp:chrome_resources
414 group("resources") {
415   deps = [
416     # Note: GYP lists some dependencies in addition to these actions. However,
417     # these are just dependencies for the actions themselves, which our actions
418     # list individually when needed.
419     "//chrome/browser:resources",
420     "//chrome/common:resources",
421     "//chrome/renderer:resources",
422   ]
424   if (enable_extensions) {
425     deps += [ "//chrome/common:extensions_api_resources" ]
426   }
429 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
430 group("extra_resources") {
431   deps = [
432     "//chrome/browser/resources:invalidations_resources",
433     "//chrome/browser/resources:memory_internals_resources",
434     "//chrome/browser/resources:net_internals_resources",
435     "//chrome/browser/resources:password_manager_internals_resources",
436     "//chrome/browser/resources:signin_internals_resources",
437     "//chrome/browser/resources:sync_internals_resources",
438     "//chrome/browser/resources:translate_internals_resources",
439   ]
440   if (!is_ios) {
441     deps += [
442       "//chrome/browser/resources:component_extension_resources",
443       "//chrome/browser/resources:options_resources",
444       "//chrome/browser/resources:settings_resources",
445     ]
446   }
448   if (is_chromeos) {
449     deps += [ "//chrome/browser/resources/chromeos/chromevox" ]
450   }
452   if (enable_extensions) {
453     deps += [
454       "//chrome/browser/resources:quota_internals_resources",
455       "//chrome/browser/resources:sync_file_system_internals_resources",
456     ]
457   }
460 if (is_chrome_branded) {
461   copy("default_apps") {
462     visibility = [ ":packed_resources" ]
463     sources = [
464       "browser/resources/default_apps/docs.crx",
465       "browser/resources/default_apps/drive.crx",
466       "browser/resources/default_apps/external_extensions.json",
467       "browser/resources/default_apps/gmail.crx",
468       "browser/resources/default_apps/search.crx",
469       "browser/resources/default_apps/youtube.crx",
470     ]
471     outputs = [
472       "$root_out_dir/default_apps/{{source_file_part}}",
473     ]
474   }
477 group("packed_resources") {
478   deps = [
479     ":repack_locales_pack",
480     ":repack_pseudo_locales_pack",
481     ":repack_chrome_100_percent",
482   ]
484   if (is_chrome_branded) {
485     deps += [ ":default_apps" ]
486   }
488   if (enable_hidpi) {
489     deps += [ ":repack_chrome_200_percent" ]
490   }
492   if (enable_topchrome_md) {
493     deps += [ ":repack_chrome_material_100_percent" ]
495     if (enable_hidpi) {
496       deps += [ ":repack_chrome_material_200_percent" ]
497     }
498   }
501 repack("packed_extra_resources") {
502   visibility = [ "./*" ]
503   sources = [
504     "$root_gen_dir/chrome/browser_resources.pak",
505     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
506     "$root_gen_dir/chrome/common_resources.pak",
507     "$root_gen_dir/chrome/invalidations_resources.pak",
508     "$root_gen_dir/chrome/memory_internals_resources.pak",
509     "$root_gen_dir/chrome/net_internals_resources.pak",
510     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
511     "$root_gen_dir/chrome/signin_internals_resources.pak",
512     "$root_gen_dir/chrome/sync_internals_resources.pak",
513     "$root_gen_dir/chrome/translate_internals_resources.pak",
514     "$root_gen_dir/components/components_resources.pak",
515     "$root_gen_dir/net/net_resources.pak",
516     "$root_gen_dir/ui/resources/webui_resources.pak",
517   ]
518   deps = [
519     "//chrome/browser:resources",
520     "//chrome/app/theme:chrome_unscaled_resources",
521     "//chrome/common:resources",
522     "//chrome/browser/resources:invalidations_resources",
523     "//chrome/browser/resources:memory_internals_resources",
524     "//chrome/browser/resources:net_internals_resources",
525     "//chrome/browser/resources:password_manager_internals_resources",
526     "//chrome/browser/resources:signin_internals_resources",
527     "//chrome/browser/resources:sync_internals_resources",
528     "//chrome/browser/resources:translate_internals_resources",
529     "//components/resources",
530     "//net:net_resources",
531     "//ui/resources",
532   ]
534   if (!is_ios && !is_android) {
535     # New paks should be added here by default.
536     sources += [
537       "$root_gen_dir/blink/devtools_resources.pak",
538       "$root_gen_dir/chrome/component_extension_resources.pak",
539       "$root_gen_dir/chrome/options_resources.pak",
540       "$root_gen_dir/chrome/quota_internals_resources.pak",
541       "$root_gen_dir/chrome/settings_resources.pak",
542       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
543       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
544     ]
545     deps += [
546       "//chrome/browser/devtools:webrtc_device_provider_resources",
547       "//chrome/browser/resources:component_extension_resources",
548       "//chrome/browser/resources:options_resources",
549       "//chrome/browser/resources:settings_resources",
550       "//chrome/browser/resources:quota_internals_resources",
551       "//chrome/browser/resources:sync_file_system_internals_resources",
552       "//content/browser/devtools:devtools_resources",
553     ]
554   }
555   if (!is_ios) {
556     sources += [
557       "$root_gen_dir/blink/public/resources/blink_resources.pak",
558       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
559       "$root_gen_dir/content/content_resources.pak",
560     ]
561     deps += [
562       "//content:resources",
563       "//content/browser/tracing:resources",
564       "//third_party/WebKit/public:resources",
565     ]
566   }
567   if (is_chromeos) {
568     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
569     deps += [ "//ui/file_manager:resources" ]
570   }
571   if (enable_extensions) {
572     sources += [
573       "$root_gen_dir/chrome/extensions_api_resources.pak",
574       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
575       "$root_gen_dir/extensions/extensions_resources.pak",
576     ]
577     deps += [
578       "//chrome/common:extensions_api_resources",
579       "//extensions:extensions_resources",
580     ]
581   }
583   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
584   # it them copies it. This skipes the copy step and writes it to the final
585   # location.
586   if (is_mac || is_ios) {
587     output = "$root_gen_dir/repack/resources.pak"
588   } else {
589     output = "$root_out_dir/resources.pak"
590   }
593 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
594 repack("browser_tests_pak") {
595   sources = [
596     "$root_gen_dir/chrome/options_test_resources.pak",
597     "$root_gen_dir/chrome/webui_test_resources.pak",
598   ]
599   output = "$root_out_dir/browser_tests.pak"
600   deps = [
601     "//chrome/browser/resources:options_test_resources",
602     "//chrome/test/data:webui_test_resources",
603   ]
606 # Collects per-locale grit files from many sources into global per-locale files.
607 chrome_repack_locales("repack_locales_pack") {
608   visibility = [ ":*" ]
610   input_locales = locales
612   if (is_mac) {
613     output_locales = locales_as_mac_outputs
614   } else {
615     output_locales = locales
616   }
619 chrome_repack_locales("repack_pseudo_locales_pack") {
620   visibility = [ ":*" ]
622   input_locales = [ "fake-bidi" ]
624   if (is_mac) {
625     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
626   } else {
627     output_locales = [ "fake-bidi" ]
628   }
631 # Generates a rule to repack a set of resources, substituting a given string
632 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
633 # the "gen" directory, and then introduces a copy rule to copy it to the root
634 # build directory.
636 # It's not clear why this two-step dance is necessary as opposed to just
637 # generating the file in the destination. However, this is what the GYP build
638 # does, and for maintenance purposes, this keeps the same files in the same
639 # place between the two builds when possible.
641 # Argument:
642 #   percent [required]
643 #      String to substitute for the percentage.
644 template("chrome_repack_percent") {
645   percent = invoker.percent
647   repack_name = "${target_name}_repack"
648   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
650   copy_name = target_name
652   repack(repack_name) {
653     visibility = [ ":$copy_name" ]
655     # All sources should also have deps for completeness.
656     sources = [
657       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
658       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
659       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
660       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
661     ]
663     deps = [
664       "//chrome/app/theme:theme_resources",
665       "//chrome/renderer:resources",
666       "//components/resources",
667       "//components/strings",
668       "//net:net_resources",
669       "//ui/resources",
670     ]
672     if (!is_ios) {
673       sources += [
674         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
675         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
676       ]
677       deps += [
678         "//content/app/resources",
679         "//third_party/WebKit/public:image_resources",
680       ]
681     }
682     if (use_ash) {
683       sources +=
684           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
685       deps += [ "//ash/resources" ]
686     }
687     if (toolkit_views) {
688       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
689       deps += [ "//ui/views/resources" ]
690     }
691     if (is_chromeos) {
692       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
693       deps += [ "//ui/chromeos/resources" ]
694     }
695     if (enable_extensions) {
696       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
697       deps += [ "//extensions:extensions_browser_resources" ]
698     }
699     if (enable_app_list) {
700       sources += [ "$root_gen_dir/ui/app_list/resources/app_list_resources_${percent}_percent.pak" ]
701       deps += [ "//ui/app_list/resources" ]
702     }
704     output = repack_output_file
705   }
707   copy(copy_name) {
708     visibility = [ ":*" ]
709     deps = [
710       ":$repack_name",
711     ]
712     sources = [
713       repack_output_file,
714     ]
715     outputs = [
716       "$root_build_dir/chrome_${percent}_percent.pak",
717     ]
718   }
721 chrome_repack_percent("repack_chrome_100_percent") {
722   percent = "100"
725 if (enable_hidpi) {
726   chrome_repack_percent("repack_chrome_200_percent") {
727     percent = "200"
728   }
731 # Generates a rule to repack a set of material design resources for the browser
732 # top chrome, substituting a given string in for the percentage (e.g. "100",
733 # "200").
734 template("chrome_repack_material_percent") {
735   percent = invoker.percent
737   repack_name = "${target_name}_repack"
738   repack_output_file =
739       "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
741   copy_name = target_name
743   repack(repack_name) {
744     visibility = [ ":$copy_name" ]
746     # All sources should also have deps for completeness.
747     sources = [
748       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
749       "$root_gen_dir/components/components_resources_material_${percent}_percent.pak",
750     ]
752     deps = [
753       "//chrome/app/theme:theme_resources",
754       "//components/resources",
755     ]
757     output = repack_output_file
758   }
760   copy(copy_name) {
761     visibility = [ ":*" ]
762     deps = [
763       ":$repack_name",
764     ]
765     sources = [
766       repack_output_file,
767     ]
768     outputs = [
769       "$root_build_dir/chrome_material_${percent}_percent.pak",
770     ]
771   }
774 if (enable_topchrome_md) {
775   chrome_repack_material_percent("repack_chrome_material_100_percent") {
776     percent = "100"
777   }
779   if (enable_hidpi) {
780     chrome_repack_material_percent("repack_chrome_material_200_percent") {
781       percent = "200"
782     }
783   }
786 # GYP version: chrome/chrome_resources.gyp:chrome_strings
787 group("strings") {
788   deps = [
789     "//chrome/app:chromium_strings",
790     "//chrome/app:generated_resources",
791     "//chrome/app:google_chrome_strings",
792     "//chrome/app/resources:locale_settings",
793   ]
796 if (is_android) {
797   # GYP: //chrome/chrome.gyp:content_setting_java
798   java_cpp_enum("content_setting_javagen") {
799     sources = [
800       "../components/content_settings/core/common/content_settings.h",
801     ]
802     outputs = [
803       "org/chromium/chrome/browser/ContentSetting.java",
804     ]
805   }
807   # GYP: //chrome/chrome.gyp:content_settings_type_java
808   java_cpp_enum("content_settings_type_javagen") {
809     sources = [
810       "../components/content_settings/core/common/content_settings_types.h",
811     ]
812     outputs = [
813       "org/chromium/chrome/browser/ContentSettingsType.java",
814     ]
815   }
817   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
818   java_cpp_enum("page_info_connection_type_javagen") {
819     sources = [
820       "browser/ui/android/website_settings_popup_android.h",
821     ]
822     outputs = [
823       "org/chromium/chrome/browser/PageInfoConnectionType.java",
824     ]
825   }
827   # GYP: //chrome/chrome_android.gypi:chrome_android_core
828   static_library("chrome_android_core") {
829     sources = [
830       "app/android/chrome_android_initializer.cc",
831       "app/android/chrome_android_initializer.h",
832       "app/android/chrome_jni_onload.cc",
833       "app/android/chrome_jni_onload.h",
834       "app/android/chrome_main_delegate_android.cc",
835       "app/android/chrome_main_delegate_android.h",
836       "app/chrome_main_delegate.cc",
837       "app/chrome_main_delegate.h",
838     ]
840     include_dirs = [ android_ndk_include_dir ]
842     libs = [
843       "android",
844       "jnigraphics",
845     ]
847     deps = [
848       "//chrome/browser",
849       "//chrome/browser/ui",
850       "//chrome/child",
851       "//chrome/plugin",
852       "//chrome/renderer",
853       "//chrome/utility",
854       "//components/enhanced_bookmarks",
855       "//content/public/app:both",
856     ]
857   }
860 if (is_linux) {
861   action("manpage") {
862     if (is_chrome_branded) {
863       name = "Google Chrome"
864       filename = "google-chrome"
865       confdir = "google-chrome"
866     } else {
867       name = "Chromium"
868       filename = "chromium-browser"
869       confdir = "chromium"
870     }
872     script = "//chrome/tools/build/linux/sed.py"
873     infile = "app/resources/manpage.1.in"
874     inputs = [
875       infile,
876     ]
878     outfile = "$root_out_dir/chrome.1"
879     outputs = [
880       outfile,
881     ]
883     args = [
884       rebase_path(infile, root_build_dir),
885       rebase_path(outfile, root_build_dir),
886       "-e s/@@NAME@@/$name/",
887       "-e s/@@FILENAME@@/$filename/",
888       "-e s/@@CONFDIR@@/$confdir/",
889     ]
890   }
892   action("linux_symbols") {
893     script = "//build/linux/dump_app_syms.py"
895     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
896     dump_syms_binary =
897         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
899     chrome_binary = "$root_out_dir/chrome"
900     if (current_cpu == "x86") {
901       # Use "ia32" instead of "x86" for GYP compat.
902       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
903     } else {
904       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
905     }
907     inputs = [
908       chrome_binary,
909       dump_syms_binary,
910     ]
911     outputs = [
912       symbol_file,
913     ]
915     args = [
916       "./" + rebase_path(dump_syms_binary, root_build_dir),
917       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
918       rebase_path(chrome_binary, root_build_dir),
919       rebase_path(symbol_file, root_build_dir),
920     ]
922     deps = [
923       ":chrome",
924       dump_syms_label,
925     ]
926   }