Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / BUILD.gn
blob1553620cc295ae333349652c2117ea56420dbb45
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         "//content:startup_helper_win",
83         "//crypto",
84         "//sandbox",
85         "//ui/gfx",
86       ]
87       data_deps = [ "//chrome/app/version_assembly:version_assembly_manifest" ]
89       libs = [
90         "wintrust.lib",
91         "crypt32.lib",
92       ]
93       configs -= [ "//build/config/win:console" ]
94       configs += [ "//build/config/win:windowed" ]
95     } else if (use_aura) {
96       # Non-Windows aura entrypoint.
97       sources += [ "app/chrome_exe_main_aura.cc" ]
98     }
100     if (is_linux) {
101       sources += [
102         "app/chrome_dll_resource.h",
103         "app/chrome_main.cc",
104         "app/chrome_main_delegate.cc",
105         "app/chrome_main_delegate.h",
106       ]
108       deps += [
109         # On Linux, link the dependencies (libraries) that make up actual
110         # Chromium functionality directly into the executable.
111         ":browser_dependencies",
112         ":child_dependencies",
113         ":manpage",
114         "//base/allocator",
116         # Needed to use the master_preferences functions
117         "//chrome/installer/util",
118         "//content/public/app:both",
119       ]
121       # Needed for chrome_main.cc initialization of libraries.
122       configs += [ "//build/config/linux:pangocairo" ]
124       # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition.
125       # but GN doesn't have either of these flags.
126       ldflags = [ "-pie" ]
128       if (use_x11) {
129         configs += [
130           "//build/config/linux:x11",
131           "//build/config/linux:xext",
132         ]
133       }
134     }
136     if (is_mac) {
137       sources += [ "app/chrome_exe_main_mac.cc" ]
138       # TODO(GYP) lots more stuff in the is_mac block.
139     } else {  # Non-Mac.
140       deps += [
141         ":packed_extra_resources",
142         ":packed_resources",
143         "//components/startup_metric_utils",
145         # Precompiled plugins that need to get copied to the output directory.
146         # On Mac, internal plugins go inside the framework, so these
147         # dependencies are on chrome.dll.
148         "//third_party/adobe/flash:flapper_binaries",
149         "//third_party/widevine/cdm:widevinecdmadapter",
150       ]
151     }
153     if (is_linux && enable_plugins) {
154       deps += [ "//pdf" ]
155     }
157     if (is_multi_dll_chrome) {
158       defines += [ "CHROME_MULTIPLE_DLL" ]
159       data_deps += [ ":chrome_child" ]
160     }
161   }
162 }  # !is_android
164 shared_library("main_dll") {
165   configs += [ "//build/config/compiler:wexit_time_destructors" ]
166   defines = []
168   deps = [
169     ":browser_dependencies",
170     "//base/allocator",
171   ]
172   if (is_win) {
173     output_name = "chrome"
175     sources = [
176       "//base/win/dllmain.cc",
177       "app/chrome_command_ids.h",
178       "app/chrome_dll.rc",
179       "app/chrome_dll_resource.h",
180       "app/chrome_main.cc",
181       "app/chrome_main_delegate.cc",
182       "app/chrome_main_delegate.h",
183       "app/close_handle_hook_win.cc",
184       "app/close_handle_hook_win.h",
185       "app/delay_load_hook_win.cc",
186       "app/delay_load_hook_win.h",
187     ]
189     deps += [
190       ":chrome_dll_manifest",
191       ":chrome_dll_version",
192       "//base/trace_event/etw_manifest:chrome_events_win",
193       "//chrome/app/theme:chrome_unscaled_resources",
194       "//chrome_elf",
195       "//content/app/resources",
196       "//crypto",
197       "//net:net_resources",
198       "//third_party/wtl",
199       "//ui/views",
200     ]
201     if (enable_configuration_policy) {
202       deps += [ "//components/policy" ]
203     }
204     if (current_cpu == "x86") {
205       # TODO(GYP) bug 512861: Lots of VCLinkerTool stuff on Windows.
206       #deps += [ 'chrome_user32_delay_imports' ]  TODO(GYP)
207     }
209     # This is a large module that can't do incremental linking in some cases.
210     configs -= [ "//build/config/win:default_incremental_linking" ]
211     configs += [ "//build/config/win:default_large_module_incremental_linking" ]
213     # TODO(GYP) bug 512851: PGO.
214   }
216   if (use_aura) {
217     deps += [ "//ui/compositor" ]
218   }
220   if (is_multi_dll_chrome) {
221     defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
222     deps += [ "//content/public/app:browser" ]
223   } else {
224     deps += [
225       ":child_dependencies",
226       "//content/public/app:both",
227     ]
228   }
230   if (cld_version == 0 || cld_version == 2) {
231     deps += [ "//third_party/cld_2" ]
232   }
234   if (is_mac) {
235     #['OS=="mac" and component!="shared_library"', {  TODO(GYP)
236     #  'includes': [ 'chrome_dll_bundle.gypi' ],
237     #}],
238     # TODO(GYP) Lots of other stuff in the OS=="mac" block.
239   }
241   if (enable_plugins && !is_multi_dll_chrome) {
242     deps += [ "//pdf" ]
243   }
246 if (is_multi_dll_chrome) {
247   # This manifest matches what GYP produces. It may not even be necessary.
248   windows_manifest("chrome_child_manifest") {
249     sources = [
250       as_invoker_manifest,
251     ]
252     type = "dll"
253   }
255   shared_library("chrome_child") {
256     sources = [
257       "app/chrome_main.cc",
258       "app/chrome_main_delegate.cc",
259       "app/chrome_main_delegate.h",
260       "app/close_handle_hook_win.cc",
261       "app/close_handle_hook_win.h",
262     ]
264     configs += [ "//build/config/compiler:wexit_time_destructors" ]
265     defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
267     deps = [
268       ":child_dependencies",
269       ":chrome_child_manifest",
270       ":chrome_dll_version",
271       "//chrome/browser/policy:path_parser",
272       "//content/public/app:child",
273     ]
275     if (is_win) {
276       # TODO(GYP) bug 512851: PGO on Windows.
277       # ['chrome_pgo_phase==1', {
278       #   'msvs_settings': {
279       #     'VCLinkerTool': {
280       #       'LinkTimeCodeGeneration': '2',
281       #     },
282       #   },
283       # }],
284       # ['chrome_pgo_phase==2', {
285       #   'msvs_settings': {
286       #     'VCLinkerTool': {
287       #       'LinkTimeCodeGeneration': '3',
288       #     },
289       #   },
290       # }],
291     }
292     if (enable_plugins) {
293       deps += [ "//pdf" ]
294     }
295   }
298 # GYP version: chromium_browser_dependencies variable in chrome.gyp
299 group("browser_dependencies") {
300   deps = [
301     "//chrome/browser",
302     "//chrome/common",
303     "//sync",
304   ]
305   if (!is_ios) {
306     deps += [ "//ppapi/host" ]
307   }
309   if (enable_basic_printing || enable_print_preview) {
310     deps += [ "//printing" ]
311     if (enable_print_preview) {
312       deps += [ "//chrome/service" ]
313     }
314   }
317 # GYP version: chromium_child_dependencies variable in chrome.gyp
318 group("child_dependencies") {
319   deps = [
320     "//chrome/common",
321     "//sync",
322   ]
323   if (!is_ios) {
324     deps += [
325       "//chrome/browser/devtools",
326       "//chrome/child",
327       "//chrome/plugin",
328       "//chrome/renderer",
329       "//chrome/utility",
330       "//content/public/child",
331       "//third_party/WebKit/public:blink_devtools_frontend_resources",
332     ]
333   }
334   if (cld_version == 0 || cld_version == 2) {
335     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
336   }
338   if (enable_nacl) {
339     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
340   }
341   if (enable_remoting) {
342     deps += [ "//remoting/client/plugin" ]
343   }
346 if (is_win) {
347   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
348   # Linux.
349   process_version("version_header") {
350     # TODO(brettW) this should have more reduced visibility, but chrome/browser
351     # currently depends on this.
352     #visibility = [ ":*" ]
354     # This one just uses the custom template and no separate sources.
355     sources = []
356     template_file = "version.h.in"
358     # TODO(brettw) this should move to $target_gen_dir/version.h and
359     # source files including it should reference it via "chrome/version.h"
360     output = "$root_gen_dir/version.h"
361   }
363   process_version("chrome_exe_version") {
364     sources = [
365       "app/chrome_exe.ver",
366     ]
367     output = "$target_gen_dir/chrome_exe_version.rc"
368   }
370   process_version("chrome_dll_version") {
371     sources = [
372       "app/chrome_dll.ver",
373     ]
374     output = "$target_gen_dir/chrome_dll_version.rc"
375   }
377   # This manifest matches what GYP produces. It may not even be necessary.
378   windows_manifest("chrome_dll_manifest") {
379     sources = [
380       as_invoker_manifest,
381       common_controls_manifest,
382     ]
383     type = "dll"
384   }
386   process_version("nacl64_exe_version") {
387     sources = [
388       "app/nacl64_exe.ver",
389     ]
390     output = "$target_gen_dir/nacl64_exe_version.rc"
391   }
393   process_version("other_version") {
394     sources = [
395       "app/other.ver",
396     ]
397     output = "$target_gen_dir/other_version.rc"
398   }
400   source_set("image_pre_reader") {
401     sources = [
402       "app/image_pre_reader_win.cc",
403       "app/image_pre_reader_win.h",
404     ]
405     deps = [
406       "//base",
407     ]
408   }
411 # GYP version: chrome/chrome_resources.gyp:chrome_resources
412 group("resources") {
413   deps = [
414     # Note: GYP lists some dependencies in addition to these actions. However,
415     # these are just dependencies for the actions themselves, which our actions
416     # list individually when needed.
417     "//chrome/browser:resources",
418     "//chrome/common:resources",
419     "//chrome/renderer:resources",
420   ]
422   if (enable_extensions) {
423     deps += [ "//chrome/common:extensions_api_resources" ]
424   }
427 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
428 group("extra_resources") {
429   deps = [
430     "//chrome/browser/resources:invalidations_resources",
431     "//chrome/browser/resources:memory_internals_resources",
432     "//chrome/browser/resources:net_internals_resources",
433     "//chrome/browser/resources:password_manager_internals_resources",
434     "//chrome/browser/resources:signin_internals_resources",
435     "//chrome/browser/resources:sync_internals_resources",
436     "//chrome/browser/resources:translate_internals_resources",
437   ]
438   if (!is_ios) {
439     deps += [
440       "//chrome/browser/resources:component_extension_resources",
441       "//chrome/browser/resources:options_resources",
442       "//chrome/browser/resources:settings_resources",
443     ]
444   }
446   if (is_chromeos) {
447     deps += [ "//chrome/browser/resources/chromeos/chromevox" ]
448   }
450   if (enable_extensions) {
451     deps += [
452       "//chrome/browser/resources:quota_internals_resources",
453       "//chrome/browser/resources:sync_file_system_internals_resources",
454     ]
455   }
458 if (is_chrome_branded) {
459   copy("default_apps") {
460     visibility = [ ":packed_resources" ]
461     sources = [
462       "browser/resources/default_apps/docs.crx",
463       "browser/resources/default_apps/drive.crx",
464       "browser/resources/default_apps/external_extensions.json",
465       "browser/resources/default_apps/gmail.crx",
466       "browser/resources/default_apps/search.crx",
467       "browser/resources/default_apps/youtube.crx",
468     ]
469     outputs = [
470       "$root_out_dir/default_apps/{{source_file_part}}",
471     ]
472   }
475 group("packed_resources") {
476   deps = [
477     ":repack_locales_pack",
478     ":repack_pseudo_locales_pack",
479     ":repack_chrome_100_percent",
480   ]
482   if (is_chrome_branded) {
483     deps += [ ":default_apps" ]
484   }
486   if (enable_hidpi) {
487     deps += [ ":repack_chrome_200_percent" ]
488   }
490   if (enable_topchrome_md) {
491     deps += [ ":repack_chrome_material_100_percent" ]
493     if (enable_hidpi) {
494       deps += [ ":repack_chrome_material_200_percent" ]
495     }
496   }
499 repack("packed_extra_resources") {
500   visibility = [ "./*" ]
501   sources = [
502     "$root_gen_dir/chrome/browser_resources.pak",
503     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
504     "$root_gen_dir/chrome/common_resources.pak",
505     "$root_gen_dir/chrome/invalidations_resources.pak",
506     "$root_gen_dir/chrome/memory_internals_resources.pak",
507     "$root_gen_dir/chrome/net_internals_resources.pak",
508     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
509     "$root_gen_dir/chrome/signin_internals_resources.pak",
510     "$root_gen_dir/chrome/sync_internals_resources.pak",
511     "$root_gen_dir/chrome/translate_internals_resources.pak",
512     "$root_gen_dir/components/components_resources.pak",
513     "$root_gen_dir/net/net_resources.pak",
514     "$root_gen_dir/ui/resources/webui_resources.pak",
515   ]
516   deps = [
517     "//chrome/browser:resources",
518     "//chrome/app/theme:chrome_unscaled_resources",
519     "//chrome/common:resources",
520     "//chrome/browser/resources:invalidations_resources",
521     "//chrome/browser/resources:memory_internals_resources",
522     "//chrome/browser/resources:net_internals_resources",
523     "//chrome/browser/resources:password_manager_internals_resources",
524     "//chrome/browser/resources:signin_internals_resources",
525     "//chrome/browser/resources:sync_internals_resources",
526     "//chrome/browser/resources:translate_internals_resources",
527     "//components/resources",
528     "//net:net_resources",
529     "//ui/resources",
530   ]
532   if (!is_ios && !is_android) {
533     # New paks should be added here by default.
534     sources += [
535       "$root_gen_dir/blink/devtools_resources.pak",
536       "$root_gen_dir/chrome/component_extension_resources.pak",
537       "$root_gen_dir/chrome/options_resources.pak",
538       "$root_gen_dir/chrome/quota_internals_resources.pak",
539       "$root_gen_dir/chrome/settings_resources.pak",
540       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
541       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
542     ]
543     deps += [
544       "//chrome/browser/devtools:webrtc_device_provider_resources",
545       "//chrome/browser/resources:component_extension_resources",
546       "//chrome/browser/resources:options_resources",
547       "//chrome/browser/resources:settings_resources",
548       "//chrome/browser/resources:quota_internals_resources",
549       "//chrome/browser/resources:sync_file_system_internals_resources",
550       "//content/browser/devtools:devtools_resources",
551     ]
552   }
553   if (!is_ios) {
554     sources += [
555       "$root_gen_dir/blink/public/resources/blink_resources.pak",
556       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
557       "$root_gen_dir/content/content_resources.pak",
558     ]
559     deps += [
560       "//content:resources",
561       "//content/browser/tracing:resources",
562       "//third_party/WebKit/public:resources",
563     ]
564   }
565   if (is_chromeos) {
566     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
567     deps += [ "//ui/file_manager:resources" ]
568   }
569   if (enable_extensions) {
570     sources += [
571       "$root_gen_dir/chrome/extensions_api_resources.pak",
572       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
573       "$root_gen_dir/extensions/extensions_resources.pak",
574     ]
575     deps += [
576       "//chrome/common:extensions_api_resources",
577       "//extensions:extensions_resources",
578     ]
579   }
581   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
582   # it them copies it. This skipes the copy step and writes it to the final
583   # location.
584   if (is_mac || is_ios) {
585     output = "$root_gen_dir/repack/resources.pak"
586   } else {
587     output = "$root_out_dir/resources.pak"
588   }
591 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
592 repack("browser_tests_pak") {
593   sources = [
594     "$root_gen_dir/chrome/options_test_resources.pak",
595     "$root_gen_dir/chrome/webui_test_resources.pak",
596   ]
597   output = "$root_out_dir/browser_tests.pak"
598   deps = [
599     "//chrome/browser/resources:options_test_resources",
600     "//chrome/test/data:webui_test_resources",
601   ]
604 # Collects per-locale grit files from many sources into global per-locale files.
605 chrome_repack_locales("repack_locales_pack") {
606   visibility = [ ":*" ]
608   input_locales = locales
610   if (is_mac) {
611     output_locales = locales_as_mac_outputs
612   } else {
613     output_locales = locales
614   }
617 chrome_repack_locales("repack_pseudo_locales_pack") {
618   visibility = [ ":*" ]
620   input_locales = [ "fake-bidi" ]
622   if (is_mac) {
623     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
624   } else {
625     output_locales = [ "fake-bidi" ]
626   }
629 # Generates a rule to repack a set of resources, substituting a given string
630 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
631 # the "gen" directory, and then introduces a copy rule to copy it to the root
632 # build directory.
634 # It's not clear why this two-step dance is necessary as opposed to just
635 # generating the file in the destination. However, this is what the GYP build
636 # does, and for maintenance purposes, this keeps the same files in the same
637 # place between the two builds when possible.
639 # Argument:
640 #   percent [required]
641 #      String to substitute for the percentage.
642 template("chrome_repack_percent") {
643   percent = invoker.percent
645   repack_name = "${target_name}_repack"
646   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
648   copy_name = target_name
650   repack(repack_name) {
651     visibility = [ ":$copy_name" ]
653     # All sources should also have deps for completeness.
654     sources = [
655       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
656       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
657       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
658       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
659     ]
661     deps = [
662       "//chrome/app/theme:theme_resources",
663       "//chrome/renderer:resources",
664       "//components/resources",
665       "//components/strings",
666       "//net:net_resources",
667       "//ui/resources",
668     ]
670     if (!is_ios) {
671       sources += [
672         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
673         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
674       ]
675       deps += [
676         "//content/app/resources",
677         "//third_party/WebKit/public:image_resources",
678       ]
679     }
680     if (use_ash) {
681       sources +=
682           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
683       deps += [ "//ash/resources" ]
684     }
685     if (toolkit_views) {
686       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
687       deps += [ "//ui/views/resources" ]
688     }
689     if (is_chromeos) {
690       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
691       deps += [ "//ui/chromeos/resources" ]
692     }
693     if (enable_extensions) {
694       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
695       deps += [ "//extensions:extensions_browser_resources" ]
696     }
698     output = repack_output_file
699   }
701   copy(copy_name) {
702     visibility = [ ":*" ]
703     deps = [
704       ":$repack_name",
705     ]
706     sources = [
707       repack_output_file,
708     ]
709     outputs = [
710       "$root_build_dir/chrome_${percent}_percent.pak",
711     ]
712   }
715 chrome_repack_percent("repack_chrome_100_percent") {
716   percent = "100"
719 if (enable_hidpi) {
720   chrome_repack_percent("repack_chrome_200_percent") {
721     percent = "200"
722   }
725 # Generates a rule to repack a set of material design resources for the browser
726 # top chrome, substituting a given string in for the percentage (e.g. "100",
727 # "200").
728 template("chrome_repack_material_percent") {
729   percent = invoker.percent
731   repack_name = "${target_name}_repack"
732   repack_output_file =
733       "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
735   copy_name = target_name
737   repack(repack_name) {
738     visibility = [ ":$copy_name" ]
740     # All sources should also have deps for completeness.
741     sources = [
742       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
743     ]
745     deps = [
746       "//chrome/app/theme:theme_resources",
747     ]
749     output = repack_output_file
750   }
752   copy(copy_name) {
753     visibility = [ ":*" ]
754     deps = [
755       ":$repack_name",
756     ]
757     sources = [
758       repack_output_file,
759     ]
760     outputs = [
761       "$root_build_dir/chrome_material_${percent}_percent.pak",
762     ]
763   }
766 if (enable_topchrome_md) {
767   chrome_repack_material_percent("repack_chrome_material_100_percent") {
768     percent = "100"
769   }
771   if (enable_hidpi) {
772     chrome_repack_material_percent("repack_chrome_material_200_percent") {
773       percent = "200"
774     }
775   }
778 # GYP version: chrome/chrome_resources.gyp:chrome_strings
779 group("strings") {
780   deps = [
781     "//chrome/app:chromium_strings",
782     "//chrome/app:generated_resources",
783     "//chrome/app:google_chrome_strings",
784     "//chrome/app/resources:locale_settings",
785   ]
788 if (is_android) {
789   # GYP: //chrome/chrome.gyp:content_setting_java
790   java_cpp_enum("content_setting_javagen") {
791     sources = [
792       "../components/content_settings/core/common/content_settings.h",
793     ]
794     outputs = [
795       "org/chromium/chrome/browser/ContentSetting.java",
796     ]
797   }
799   # GYP: //chrome/chrome.gyp:content_settings_type_java
800   java_cpp_enum("content_settings_type_javagen") {
801     sources = [
802       "../components/content_settings/core/common/content_settings_types.h",
803     ]
804     outputs = [
805       "org/chromium/chrome/browser/ContentSettingsType.java",
806     ]
807   }
809   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
810   java_cpp_enum("page_info_connection_type_javagen") {
811     sources = [
812       "browser/ui/android/website_settings_popup_android.h",
813     ]
814     outputs = [
815       "org/chromium/chrome/browser/PageInfoConnectionType.java",
816     ]
817   }
819   # GYP: //chrome/chrome_android.gypi:chrome_android_core
820   static_library("chrome_android_core") {
821     sources = [
822       "app/android/chrome_android_initializer.cc",
823       "app/android/chrome_android_initializer.h",
824       "app/android/chrome_jni_onload.cc",
825       "app/android/chrome_jni_onload.h",
826       "app/android/chrome_main_delegate_android.cc",
827       "app/android/chrome_main_delegate_android.h",
828       "app/chrome_main_delegate.cc",
829       "app/chrome_main_delegate.h",
830     ]
832     include_dirs = [ android_ndk_include_dir ]
834     libs = [
835       "android",
836       "jnigraphics",
837     ]
839     deps = [
840       "//chrome/browser",
841       "//chrome/browser/ui",
842       "//chrome/child",
843       "//chrome/plugin",
844       "//chrome/renderer",
845       "//chrome/utility",
846       "//components/enhanced_bookmarks",
847       "//content/public/app:both",
848     ]
849   }
852 if (is_linux) {
853   action("manpage") {
854     if (is_chrome_branded) {
855       name = "Google Chrome"
856       filename = "google-chrome"
857       confdir = "google-chrome"
858     } else {
859       name = "Chromium"
860       filename = "chromium-browser"
861       confdir = "chromium"
862     }
864     script = "//chrome/tools/build/linux/sed.py"
865     infile = "app/resources/manpage.1.in"
866     inputs = [
867       infile,
868     ]
870     outfile = "$root_out_dir/chrome.1"
871     outputs = [
872       outfile,
873     ]
875     args = [
876       rebase_path(infile, root_build_dir),
877       rebase_path(outfile, root_build_dir),
878       "-e s/@@NAME@@/$name/",
879       "-e s/@@FILENAME@@/$filename/",
880       "-e s/@@CONFDIR@@/$confdir/",
881     ]
882   }
884   action("linux_symbols") {
885     script = "//build/linux/dump_app_syms.py"
887     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
888     dump_syms_binary =
889         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
891     chrome_binary = "$root_out_dir/chrome"
892     if (current_cpu == "x86") {
893       # Use "ia32" instead of "x86" for GYP compat.
894       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
895     } else {
896       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
897     }
899     inputs = [
900       chrome_binary,
901       dump_syms_binary,
902     ]
903     outputs = [
904       symbol_file,
905     ]
907     args = [
908       "./" + rebase_path(dump_syms_binary, root_build_dir),
909       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
910       rebase_path(chrome_binary, root_build_dir),
911       rebase_path(symbol_file, root_build_dir),
912     ]
914     deps = [
915       ":chrome",
916       dump_syms_label,
917     ]
918   }