Create an initial chrome://supervised-user-internals page
[chromium-blink-merge.git] / chrome / BUILD.gn
blobc71641b0bede306ac08743a2713f136f34e1904b
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 == 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       "//base/allocator",
272       "//chrome/browser/policy:path_parser",
273       "//content/public/app:child",
274     ]
276     if (is_win) {
277       # TODO(GYP) bug 512851: PGO on Windows.
278       # ['chrome_pgo_phase==1', {
279       #   'msvs_settings': {
280       #     'VCLinkerTool': {
281       #       'LinkTimeCodeGeneration': '2',
282       #     },
283       #   },
284       # }],
285       # ['chrome_pgo_phase==2', {
286       #   'msvs_settings': {
287       #     'VCLinkerTool': {
288       #       'LinkTimeCodeGeneration': '3',
289       #     },
290       #   },
291       # }],
292     }
293     if (enable_plugins) {
294       deps += [ "//pdf" ]
295     }
296   }
299 # GYP version: chromium_browser_dependencies variable in chrome.gyp
300 group("browser_dependencies") {
301   deps = [
302     "//chrome/browser",
303     "//chrome/common",
304     "//sync",
305   ]
306   if (!is_ios) {
307     deps += [ "//ppapi/host" ]
308   }
310   if (enable_basic_printing || enable_print_preview) {
311     deps += [ "//printing" ]
312     if (enable_print_preview) {
313       deps += [ "//chrome/service" ]
314     }
315   }
318 # GYP version: chromium_child_dependencies variable in chrome.gyp
319 group("child_dependencies") {
320   deps = [
321     "//chrome/common",
322     "//sync",
323   ]
324   if (!is_ios) {
325     deps += [
326       "//chrome/browser/devtools",
327       "//chrome/child",
328       "//chrome/plugin",
329       "//chrome/renderer",
330       "//chrome/utility",
331       "//content/public/child",
332       "//third_party/WebKit/public:blink_devtools_frontend_resources",
333     ]
334   }
335   if (cld_version == 2) {
336     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
337   }
339   if (enable_nacl) {
340     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
341   }
344 if (is_win) {
345   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
346   # Linux.
347   process_version("version_header") {
348     # TODO(brettW) this should have more reduced visibility, but chrome/browser
349     # currently depends on this.
350     #visibility = [ ":*" ]
352     # This one just uses the custom template and no separate sources.
353     sources = []
354     template_file = "version.h.in"
356     # TODO(brettw) this should move to $target_gen_dir/version.h and
357     # source files including it should reference it via "chrome/version.h"
358     output = "$root_gen_dir/version.h"
359   }
361   process_version("chrome_exe_version") {
362     sources = [
363       "app/chrome_exe.ver",
364     ]
365     output = "$target_gen_dir/chrome_exe_version.rc"
366   }
368   process_version("chrome_dll_version") {
369     sources = [
370       "app/chrome_dll.ver",
371     ]
372     output = "$target_gen_dir/chrome_dll_version.rc"
373   }
375   # This manifest matches what GYP produces. It may not even be necessary.
376   windows_manifest("chrome_dll_manifest") {
377     sources = [
378       as_invoker_manifest,
379       common_controls_manifest,
380     ]
381     type = "dll"
382   }
384   process_version("nacl64_exe_version") {
385     sources = [
386       "app/nacl64_exe.ver",
387     ]
388     output = "$target_gen_dir/nacl64_exe_version.rc"
389   }
391   process_version("other_version") {
392     sources = [
393       "app/other.ver",
394     ]
395     output = "$target_gen_dir/other_version.rc"
396   }
398   source_set("image_pre_reader") {
399     sources = [
400       "app/image_pre_reader_win.cc",
401       "app/image_pre_reader_win.h",
402     ]
403     deps = [
404       "//base",
405     ]
406   }
409 # GYP version: chrome/chrome_resources.gyp:chrome_resources
410 group("resources") {
411   deps = [
412     # Note: GYP lists some dependencies in addition to these actions. However,
413     # these are just dependencies for the actions themselves, which our actions
414     # list individually when needed.
415     "//chrome/browser:resources",
416     "//chrome/common:resources",
417     "//chrome/renderer:resources",
418   ]
420   if (enable_extensions) {
421     deps += [ "//chrome/common:extensions_api_resources" ]
422   }
425 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
426 group("extra_resources") {
427   deps = [
428     "//chrome/browser/resources:invalidations_resources",
429     "//chrome/browser/resources:memory_internals_resources",
430     "//chrome/browser/resources:net_internals_resources",
431     "//chrome/browser/resources:password_manager_internals_resources",
432     "//chrome/browser/resources:signin_internals_resources",
433     "//chrome/browser/resources:sync_internals_resources",
434     "//chrome/browser/resources:translate_internals_resources",
435   ]
436   if (!is_ios) {
437     deps += [
438       "//chrome/browser/resources:component_extension_resources",
439       "//chrome/browser/resources:options_resources",
440       "//chrome/browser/resources:settings_resources",
441     ]
442   }
444   if (is_chromeos) {
445     deps += [ "//chrome/browser/resources/chromeos/chromevox" ]
446   }
448   if (enable_extensions) {
449     deps += [
450       "//chrome/browser/resources:quota_internals_resources",
451       "//chrome/browser/resources:sync_file_system_internals_resources",
452     ]
453   }
456 if (is_chrome_branded) {
457   copy("default_apps") {
458     visibility = [ ":packed_resources" ]
459     sources = [
460       "browser/resources/default_apps/docs.crx",
461       "browser/resources/default_apps/drive.crx",
462       "browser/resources/default_apps/external_extensions.json",
463       "browser/resources/default_apps/gmail.crx",
464       "browser/resources/default_apps/search.crx",
465       "browser/resources/default_apps/youtube.crx",
466     ]
467     outputs = [
468       "$root_out_dir/default_apps/{{source_file_part}}",
469     ]
470   }
473 group("packed_resources") {
474   deps = [
475     ":repack_locales_pack",
476     ":repack_pseudo_locales_pack",
477     ":repack_chrome_100_percent",
478   ]
480   if (is_chrome_branded) {
481     deps += [ ":default_apps" ]
482   }
484   if (enable_hidpi) {
485     deps += [ ":repack_chrome_200_percent" ]
486   }
488   if (enable_topchrome_md) {
489     deps += [ ":repack_chrome_material_100_percent" ]
491     if (enable_hidpi) {
492       deps += [ ":repack_chrome_material_200_percent" ]
493     }
494   }
497 repack("packed_extra_resources") {
498   visibility = [ "./*" ]
499   sources = [
500     "$root_gen_dir/chrome/browser_resources.pak",
501     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
502     "$root_gen_dir/chrome/common_resources.pak",
503     "$root_gen_dir/chrome/invalidations_resources.pak",
504     "$root_gen_dir/chrome/memory_internals_resources.pak",
505     "$root_gen_dir/chrome/net_internals_resources.pak",
506     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
507     "$root_gen_dir/chrome/signin_internals_resources.pak",
508     "$root_gen_dir/chrome/sync_internals_resources.pak",
509     "$root_gen_dir/chrome/translate_internals_resources.pak",
510     "$root_gen_dir/components/components_resources.pak",
511     "$root_gen_dir/net/net_resources.pak",
512     "$root_gen_dir/ui/resources/webui_resources.pak",
513   ]
514   deps = [
515     "//chrome/browser:resources",
516     "//chrome/app/theme:chrome_unscaled_resources",
517     "//chrome/common:resources",
518     "//chrome/browser/resources:invalidations_resources",
519     "//chrome/browser/resources:memory_internals_resources",
520     "//chrome/browser/resources:net_internals_resources",
521     "//chrome/browser/resources:password_manager_internals_resources",
522     "//chrome/browser/resources:signin_internals_resources",
523     "//chrome/browser/resources:sync_internals_resources",
524     "//chrome/browser/resources:translate_internals_resources",
525     "//components/resources",
526     "//net:net_resources",
527     "//ui/resources",
528   ]
530   if (!is_ios && !is_android) {
531     # New paks should be added here by default.
532     sources += [
533       "$root_gen_dir/blink/devtools_resources.pak",
534       "$root_gen_dir/chrome/component_extension_resources.pak",
535       "$root_gen_dir/chrome/options_resources.pak",
536       "$root_gen_dir/chrome/quota_internals_resources.pak",
537       "$root_gen_dir/chrome/settings_resources.pak",
538       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
539       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
540     ]
541     deps += [
542       "//chrome/browser/devtools:webrtc_device_provider_resources",
543       "//chrome/browser/resources:component_extension_resources",
544       "//chrome/browser/resources:options_resources",
545       "//chrome/browser/resources:settings_resources",
546       "//chrome/browser/resources:quota_internals_resources",
547       "//chrome/browser/resources:sync_file_system_internals_resources",
548       "//content/browser/devtools:devtools_resources",
549     ]
550   }
551   if (!is_ios) {
552     sources += [
553       "$root_gen_dir/blink/public/resources/blink_resources.pak",
554       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
555       "$root_gen_dir/content/content_resources.pak",
556     ]
557     deps += [
558       "//content:resources",
559       "//content/browser/tracing:resources",
560       "//third_party/WebKit/public:resources",
561     ]
562   }
563   if (is_chromeos) {
564     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
565     deps += [ "//ui/file_manager:resources" ]
566   }
567   if (enable_extensions) {
568     sources += [
569       "$root_gen_dir/chrome/extensions_api_resources.pak",
570       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
571       "$root_gen_dir/extensions/extensions_resources.pak",
572     ]
573     deps += [
574       "//chrome/common:extensions_api_resources",
575       "//extensions:extensions_resources",
576     ]
577   }
579   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
580   # it them copies it. This skipes the copy step and writes it to the final
581   # location.
582   if (is_mac || is_ios) {
583     output = "$root_gen_dir/repack/resources.pak"
584   } else {
585     output = "$root_out_dir/resources.pak"
586   }
589 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
590 repack("browser_tests_pak") {
591   sources = [
592     "$root_gen_dir/chrome/options_test_resources.pak",
593     "$root_gen_dir/chrome/webui_test_resources.pak",
594   ]
595   output = "$root_out_dir/browser_tests.pak"
596   deps = [
597     "//chrome/browser/resources:options_test_resources",
598     "//chrome/test/data:webui_test_resources",
599   ]
602 # Collects per-locale grit files from many sources into global per-locale files.
603 chrome_repack_locales("repack_locales_pack") {
604   visibility = [ ":*" ]
606   input_locales = locales
608   if (is_mac) {
609     output_locales = locales_as_mac_outputs
610   } else {
611     output_locales = locales
612   }
615 chrome_repack_locales("repack_pseudo_locales_pack") {
616   visibility = [ ":*" ]
618   input_locales = [ "fake-bidi" ]
620   if (is_mac) {
621     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
622   } else {
623     output_locales = [ "fake-bidi" ]
624   }
627 # Generates a rule to repack a set of resources, substituting a given string
628 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
629 # the "gen" directory, and then introduces a copy rule to copy it to the root
630 # build directory.
632 # It's not clear why this two-step dance is necessary as opposed to just
633 # generating the file in the destination. However, this is what the GYP build
634 # does, and for maintenance purposes, this keeps the same files in the same
635 # place between the two builds when possible.
637 # Argument:
638 #   percent [required]
639 #      String to substitute for the percentage.
640 template("chrome_repack_percent") {
641   percent = invoker.percent
643   repack_name = "${target_name}_repack"
644   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
646   copy_name = target_name
648   repack(repack_name) {
649     visibility = [ ":$copy_name" ]
651     # All sources should also have deps for completeness.
652     sources = [
653       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
654       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
655       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
656       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
657     ]
659     deps = [
660       "//chrome/app/theme:theme_resources",
661       "//chrome/renderer:resources",
662       "//components/resources",
663       "//components/strings",
664       "//net:net_resources",
665       "//ui/resources",
666     ]
668     if (!is_ios) {
669       sources += [
670         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
671         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
672       ]
673       deps += [
674         "//content/app/resources",
675         "//third_party/WebKit/public:image_resources",
676       ]
677     }
678     if (use_ash) {
679       sources +=
680           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
681       deps += [ "//ash/resources" ]
682     }
683     if (toolkit_views) {
684       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
685       deps += [ "//ui/views/resources" ]
686     }
687     if (is_chromeos) {
688       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
689       deps += [ "//ui/chromeos/resources" ]
690     }
691     if (enable_extensions) {
692       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
693       deps += [ "//extensions:extensions_browser_resources" ]
694     }
696     output = repack_output_file
697   }
699   copy(copy_name) {
700     visibility = [ ":*" ]
701     deps = [
702       ":$repack_name",
703     ]
704     sources = [
705       repack_output_file,
706     ]
707     outputs = [
708       "$root_build_dir/chrome_${percent}_percent.pak",
709     ]
710   }
713 chrome_repack_percent("repack_chrome_100_percent") {
714   percent = "100"
717 if (enable_hidpi) {
718   chrome_repack_percent("repack_chrome_200_percent") {
719     percent = "200"
720   }
723 # Generates a rule to repack a set of material design resources for the browser
724 # top chrome, substituting a given string in for the percentage (e.g. "100",
725 # "200").
726 template("chrome_repack_material_percent") {
727   percent = invoker.percent
729   repack_name = "${target_name}_repack"
730   repack_output_file =
731       "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
733   copy_name = target_name
735   repack(repack_name) {
736     visibility = [ ":$copy_name" ]
738     # All sources should also have deps for completeness.
739     sources = [
740       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
741     ]
743     deps = [
744       "//chrome/app/theme:theme_resources",
745     ]
747     output = repack_output_file
748   }
750   copy(copy_name) {
751     visibility = [ ":*" ]
752     deps = [
753       ":$repack_name",
754     ]
755     sources = [
756       repack_output_file,
757     ]
758     outputs = [
759       "$root_build_dir/chrome_material_${percent}_percent.pak",
760     ]
761   }
764 if (enable_topchrome_md) {
765   chrome_repack_material_percent("repack_chrome_material_100_percent") {
766     percent = "100"
767   }
769   if (enable_hidpi) {
770     chrome_repack_material_percent("repack_chrome_material_200_percent") {
771       percent = "200"
772     }
773   }
776 # GYP version: chrome/chrome_resources.gyp:chrome_strings
777 group("strings") {
778   deps = [
779     "//chrome/app:chromium_strings",
780     "//chrome/app:generated_resources",
781     "//chrome/app:google_chrome_strings",
782     "//chrome/app/resources:locale_settings",
783   ]
786 if (is_android) {
787   # GYP: //chrome/chrome.gyp:content_setting_java
788   java_cpp_enum("content_setting_javagen") {
789     sources = [
790       "../components/content_settings/core/common/content_settings.h",
791     ]
792     outputs = [
793       "org/chromium/chrome/browser/ContentSetting.java",
794     ]
795   }
797   # GYP: //chrome/chrome.gyp:content_settings_type_java
798   java_cpp_enum("content_settings_type_javagen") {
799     sources = [
800       "../components/content_settings/core/common/content_settings_types.h",
801     ]
802     outputs = [
803       "org/chromium/chrome/browser/ContentSettingsType.java",
804     ]
805   }
807   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
808   java_cpp_enum("page_info_connection_type_javagen") {
809     sources = [
810       "browser/ui/android/website_settings_popup_android.h",
811     ]
812     outputs = [
813       "org/chromium/chrome/browser/PageInfoConnectionType.java",
814     ]
815   }
817   # GYP: //chrome/chrome_android.gypi:chrome_android_core
818   static_library("chrome_android_core") {
819     sources = [
820       "app/android/chrome_android_initializer.cc",
821       "app/android/chrome_android_initializer.h",
822       "app/android/chrome_jni_onload.cc",
823       "app/android/chrome_jni_onload.h",
824       "app/android/chrome_main_delegate_android.cc",
825       "app/android/chrome_main_delegate_android.h",
826       "app/chrome_main_delegate.cc",
827       "app/chrome_main_delegate.h",
828     ]
830     include_dirs = [ android_ndk_include_dir ]
832     libs = [
833       "android",
834       "jnigraphics",
835     ]
837     deps = [
838       "//chrome/browser",
839       "//chrome/browser/ui",
840       "//chrome/child",
841       "//chrome/plugin",
842       "//chrome/renderer",
843       "//chrome/utility",
844       "//components/enhanced_bookmarks",
845       "//content/public/app:both",
846     ]
847   }
850 if (is_linux) {
851   action("manpage") {
852     if (is_chrome_branded) {
853       name = "Google Chrome"
854       filename = "google-chrome"
855       confdir = "google-chrome"
856     } else {
857       name = "Chromium"
858       filename = "chromium-browser"
859       confdir = "chromium"
860     }
862     script = "//chrome/tools/build/linux/sed.py"
863     infile = "app/resources/manpage.1.in"
864     inputs = [
865       infile,
866     ]
868     outfile = "$root_out_dir/chrome.1"
869     outputs = [
870       outfile,
871     ]
873     args = [
874       rebase_path(infile, root_build_dir),
875       rebase_path(outfile, root_build_dir),
876       "-e s/@@NAME@@/$name/",
877       "-e s/@@FILENAME@@/$filename/",
878       "-e s/@@CONFDIR@@/$confdir/",
879     ]
880   }
882   action("linux_symbols") {
883     script = "//build/linux/dump_app_syms.py"
885     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
886     dump_syms_binary =
887         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
889     chrome_binary = "$root_out_dir/chrome"
890     if (current_cpu == "x86") {
891       # Use "ia32" instead of "x86" for GYP compat.
892       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
893     } else {
894       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
895     }
897     inputs = [
898       chrome_binary,
899       dump_syms_binary,
900     ]
901     outputs = [
902       symbol_file,
903     ]
905     args = [
906       "./" + rebase_path(dump_syms_binary, root_build_dir),
907       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
908       rebase_path(chrome_binary, root_build_dir),
909       rebase_path(symbol_file, root_build_dir),
910     ]
912     deps = [
913       ":chrome",
914       dump_syms_label,
915     ]
916   }