Roll src/third_party/WebKit 37b70da:e3be828 (svn 200645:200646)
[chromium-blink-merge.git] / chrome / BUILD.gn
blob046b68779a1fa8206e0601f52e9e86f7c57060b1
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       # These files are used by the installer so we need a public dep.
141       public_deps = [
142         ":packed_extra_resources",
143         ":packed_resources",
144       ]
145       deps += [
146         "//components/startup_metric_utils",
148         # Precompiled plugins that need to get copied to the output directory.
149         # On Mac, internal plugins go inside the framework, so these
150         # dependencies are on chrome.dll.
151         "//third_party/adobe/flash:flapper_binaries",
152         "//third_party/widevine/cdm:widevinecdmadapter",
153       ]
154     }
156     if (is_linux && enable_plugins) {
157       deps += [ "//pdf" ]
158     }
160     if (is_multi_dll_chrome) {
161       defines += [ "CHROME_MULTIPLE_DLL" ]
162       data_deps += [ ":chrome_child" ]
163     }
164   }
165 }  # !is_android
167 shared_library("main_dll") {
168   configs += [ "//build/config/compiler:wexit_time_destructors" ]
169   defines = []
171   deps = [
172     ":browser_dependencies",
173     "//base/allocator",
174   ]
175   if (is_win) {
176     output_name = "chrome"
178     sources = [
179       "//base/win/dllmain.cc",
180       "app/chrome_command_ids.h",
181       "app/chrome_dll.rc",
182       "app/chrome_dll_resource.h",
183       "app/chrome_main.cc",
184       "app/chrome_main_delegate.cc",
185       "app/chrome_main_delegate.h",
186       "app/close_handle_hook_win.cc",
187       "app/close_handle_hook_win.h",
188       "app/delay_load_hook_win.cc",
189       "app/delay_load_hook_win.h",
190     ]
192     deps += [
193       ":chrome_dll_manifest",
194       ":chrome_dll_version",
195       "//base/trace_event/etw_manifest:chrome_events_win",
196       "//chrome/app/theme:chrome_unscaled_resources",
197       "//chrome_elf",
198       "//content/app/resources",
199       "//crypto",
200       "//net:net_resources",
201       "//third_party/wtl",
202       "//ui/views",
203     ]
204     if (enable_configuration_policy) {
205       deps += [ "//components/policy" ]
206     }
207     if (current_cpu == "x86") {
208       # TODO(GYP) bug 512861: Lots of VCLinkerTool stuff on Windows.
209       #deps += [ 'chrome_user32_delay_imports' ]  TODO(GYP)
210     }
212     # This is a large module that can't do incremental linking in some cases.
213     configs -= [ "//build/config/win:default_incremental_linking" ]
214     configs += [ "//build/config/win:default_large_module_incremental_linking" ]
216     # TODO(GYP) bug 512851: PGO.
217   }
219   if (use_aura) {
220     deps += [ "//ui/compositor" ]
221   }
223   if (is_multi_dll_chrome) {
224     defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
225     deps += [ "//content/public/app:browser" ]
226   } else {
227     deps += [
228       ":child_dependencies",
229       "//content/public/app:both",
230     ]
231   }
233   if (cld_version == 2) {
234     deps += [ "//third_party/cld_2" ]
235   }
237   if (is_mac) {
238     #['OS=="mac" and component!="shared_library"', {  TODO(GYP)
239     #  'includes': [ 'chrome_dll_bundle.gypi' ],
240     #}],
241     # TODO(GYP) Lots of other stuff in the OS=="mac" block.
242   }
244   if (enable_plugins && !is_multi_dll_chrome) {
245     deps += [ "//pdf" ]
246   }
249 if (is_multi_dll_chrome) {
250   # This manifest matches what GYP produces. It may not even be necessary.
251   windows_manifest("chrome_child_manifest") {
252     sources = [
253       as_invoker_manifest,
254     ]
255     type = "dll"
256   }
258   shared_library("chrome_child") {
259     sources = [
260       "app/chrome_main.cc",
261       "app/chrome_main_delegate.cc",
262       "app/chrome_main_delegate.h",
263       "app/close_handle_hook_win.cc",
264       "app/close_handle_hook_win.h",
265     ]
267     configs += [ "//build/config/compiler:wexit_time_destructors" ]
268     defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
270     deps = [
271       ":child_dependencies",
272       ":chrome_child_manifest",
273       ":chrome_dll_version",
274       "//base/allocator",
275       "//chrome/browser/policy:path_parser",
276       "//content/public/app:child",
277     ]
279     if (is_win) {
280       # TODO(GYP) bug 512851: PGO on Windows.
281       # ['chrome_pgo_phase==1', {
282       #   'msvs_settings': {
283       #     'VCLinkerTool': {
284       #       'LinkTimeCodeGeneration': '2',
285       #     },
286       #   },
287       # }],
288       # ['chrome_pgo_phase==2', {
289       #   'msvs_settings': {
290       #     'VCLinkerTool': {
291       #       'LinkTimeCodeGeneration': '3',
292       #     },
293       #   },
294       # }],
295     }
296     if (enable_plugins) {
297       deps += [ "//pdf" ]
298     }
299   }
302 # GYP version: chromium_browser_dependencies variable in chrome.gyp
303 group("browser_dependencies") {
304   deps = [
305     "//chrome/browser",
306     "//chrome/common",
307     "//sync",
308   ]
309   if (!is_ios) {
310     deps += [ "//ppapi/host" ]
311   }
313   if (enable_basic_printing || enable_print_preview) {
314     deps += [ "//printing" ]
315     if (enable_print_preview) {
316       deps += [ "//chrome/service" ]
317     }
318   }
321 # GYP version: chromium_child_dependencies variable in chrome.gyp
322 group("child_dependencies") {
323   deps = [
324     "//chrome/common",
325     "//sync",
326   ]
327   if (!is_ios) {
328     deps += [
329       "//chrome/browser/devtools",
330       "//chrome/child",
331       "//chrome/plugin",
332       "//chrome/renderer",
333       "//chrome/utility",
334       "//content/public/child",
335       "//third_party/WebKit/public:blink_devtools_frontend_resources",
336     ]
337   }
338   if (cld_version == 2) {
339     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
340   }
342   if (enable_nacl) {
343     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
344   }
347 if (is_win) {
348   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
349   # Linux.
350   process_version("version_header") {
351     # TODO(brettW) this should have more reduced visibility, but chrome/browser
352     # currently depends on this.
353     #visibility = [ ":*" ]
355     # This one just uses the custom template and no separate sources.
356     sources = []
357     template_file = "version.h.in"
359     # TODO(brettw) this should move to $target_gen_dir/version.h and
360     # source files including it should reference it via "chrome/version.h"
361     output = "$root_gen_dir/version.h"
362   }
364   process_version("chrome_exe_version") {
365     sources = [
366       "app/chrome_exe.ver",
367     ]
368     output = "$target_gen_dir/chrome_exe_version.rc"
369   }
371   process_version("chrome_dll_version") {
372     sources = [
373       "app/chrome_dll.ver",
374     ]
375     output = "$target_gen_dir/chrome_dll_version.rc"
376   }
378   # This manifest matches what GYP produces. It may not even be necessary.
379   windows_manifest("chrome_dll_manifest") {
380     sources = [
381       as_invoker_manifest,
382       common_controls_manifest,
383     ]
384     type = "dll"
385   }
387   process_version("nacl64_exe_version") {
388     sources = [
389       "app/nacl64_exe.ver",
390     ]
391     output = "$target_gen_dir/nacl64_exe_version.rc"
392   }
394   process_version("other_version") {
395     sources = [
396       "app/other.ver",
397     ]
398     output = "$target_gen_dir/other_version.rc"
399   }
401   source_set("image_pre_reader") {
402     sources = [
403       "app/image_pre_reader_win.cc",
404       "app/image_pre_reader_win.h",
405     ]
406     deps = [
407       "//base",
408     ]
409   }
412 # GYP version: chrome/chrome_resources.gyp:chrome_resources
413 group("resources") {
414   deps = [
415     # Note: GYP lists some dependencies in addition to these actions. However,
416     # these are just dependencies for the actions themselves, which our actions
417     # list individually when needed.
418     "//chrome/browser:resources",
419     "//chrome/common:resources",
420     "//chrome/renderer:resources",
421   ]
423   if (enable_extensions) {
424     deps += [ "//chrome/common:extensions_api_resources" ]
425   }
428 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
429 group("extra_resources") {
430   deps = [
431     "//chrome/browser/resources:invalidations_resources",
432     "//chrome/browser/resources:memory_internals_resources",
433     "//chrome/browser/resources:net_internals_resources",
434     "//chrome/browser/resources:password_manager_internals_resources",
435     "//chrome/browser/resources:signin_internals_resources",
436     "//chrome/browser/resources:sync_internals_resources",
437     "//chrome/browser/resources:translate_internals_resources",
438   ]
439   if (!is_ios) {
440     deps += [
441       "//chrome/browser/resources:component_extension_resources",
442       "//chrome/browser/resources:options_resources",
443       "//chrome/browser/resources:settings_resources",
444     ]
445   }
447   if (is_chromeos) {
448     deps += [ "//chrome/browser/resources/chromeos/chromevox" ]
449   }
451   if (enable_extensions) {
452     deps += [
453       "//chrome/browser/resources:quota_internals_resources",
454       "//chrome/browser/resources:sync_file_system_internals_resources",
455     ]
456   }
459 if (is_chrome_branded) {
460   copy("default_apps") {
461     visibility = [ ":packed_resources" ]
462     sources = [
463       "browser/resources/default_apps/docs.crx",
464       "browser/resources/default_apps/drive.crx",
465       "browser/resources/default_apps/external_extensions.json",
466       "browser/resources/default_apps/gmail.crx",
467       "browser/resources/default_apps/search.crx",
468       "browser/resources/default_apps/youtube.crx",
469     ]
470     outputs = [
471       "$root_out_dir/default_apps/{{source_file_part}}",
472     ]
473   }
476 group("packed_resources") {
477   deps = [
478     ":repack_locales_pack",
479     ":repack_pseudo_locales_pack",
480     ":repack_chrome_100_percent",
481   ]
483   if (is_chrome_branded) {
484     deps += [ ":default_apps" ]
485   }
487   if (enable_hidpi) {
488     deps += [ ":repack_chrome_200_percent" ]
489   }
491   if (enable_topchrome_md) {
492     deps += [ ":repack_chrome_material_100_percent" ]
494     if (enable_hidpi) {
495       deps += [ ":repack_chrome_material_200_percent" ]
496     }
497   }
500 repack("packed_extra_resources") {
501   visibility = [ "./*" ]
502   sources = [
503     "$root_gen_dir/chrome/browser_resources.pak",
504     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
505     "$root_gen_dir/chrome/common_resources.pak",
506     "$root_gen_dir/chrome/invalidations_resources.pak",
507     "$root_gen_dir/chrome/memory_internals_resources.pak",
508     "$root_gen_dir/chrome/net_internals_resources.pak",
509     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
510     "$root_gen_dir/chrome/signin_internals_resources.pak",
511     "$root_gen_dir/chrome/sync_internals_resources.pak",
512     "$root_gen_dir/chrome/translate_internals_resources.pak",
513     "$root_gen_dir/components/components_resources.pak",
514     "$root_gen_dir/net/net_resources.pak",
515     "$root_gen_dir/ui/resources/webui_resources.pak",
516   ]
517   deps = [
518     "//chrome/browser:resources",
519     "//chrome/app/theme:chrome_unscaled_resources",
520     "//chrome/common:resources",
521     "//chrome/browser/resources:invalidations_resources",
522     "//chrome/browser/resources:memory_internals_resources",
523     "//chrome/browser/resources:net_internals_resources",
524     "//chrome/browser/resources:password_manager_internals_resources",
525     "//chrome/browser/resources:signin_internals_resources",
526     "//chrome/browser/resources:sync_internals_resources",
527     "//chrome/browser/resources:translate_internals_resources",
528     "//components/resources",
529     "//net:net_resources",
530     "//ui/resources",
531   ]
533   if (!is_ios && !is_android) {
534     # New paks should be added here by default.
535     sources += [
536       "$root_gen_dir/blink/devtools_resources.pak",
537       "$root_gen_dir/chrome/component_extension_resources.pak",
538       "$root_gen_dir/chrome/options_resources.pak",
539       "$root_gen_dir/chrome/quota_internals_resources.pak",
540       "$root_gen_dir/chrome/settings_resources.pak",
541       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
542       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
543     ]
544     deps += [
545       "//chrome/browser/devtools:webrtc_device_provider_resources",
546       "//chrome/browser/resources:component_extension_resources",
547       "//chrome/browser/resources:options_resources",
548       "//chrome/browser/resources:settings_resources",
549       "//chrome/browser/resources:quota_internals_resources",
550       "//chrome/browser/resources:sync_file_system_internals_resources",
551       "//content/browser/devtools:devtools_resources",
552     ]
553   }
554   if (!is_ios) {
555     sources += [
556       "$root_gen_dir/blink/public/resources/blink_resources.pak",
557       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
558       "$root_gen_dir/content/content_resources.pak",
559     ]
560     deps += [
561       "//content:resources",
562       "//content/browser/tracing:resources",
563       "//third_party/WebKit/public:resources",
564     ]
565   }
566   if (is_chromeos) {
567     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
568     deps += [ "//ui/file_manager:resources" ]
569   }
570   if (enable_extensions) {
571     sources += [
572       "$root_gen_dir/chrome/extensions_api_resources.pak",
573       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
574       "$root_gen_dir/extensions/extensions_resources.pak",
575     ]
576     deps += [
577       "//chrome/common:extensions_api_resources",
578       "//extensions:extensions_resources",
579     ]
580   }
582   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
583   # it them copies it. This skipes the copy step and writes it to the final
584   # location.
585   if (is_mac || is_ios) {
586     output = "$root_gen_dir/repack/resources.pak"
587   } else {
588     output = "$root_out_dir/resources.pak"
589   }
592 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
593 repack("browser_tests_pak") {
594   sources = [
595     "$root_gen_dir/chrome/options_test_resources.pak",
596     "$root_gen_dir/chrome/webui_test_resources.pak",
597   ]
598   output = "$root_out_dir/browser_tests.pak"
599   deps = [
600     "//chrome/browser/resources:options_test_resources",
601     "//chrome/test/data:webui_test_resources",
602   ]
605 # Collects per-locale grit files from many sources into global per-locale files.
606 chrome_repack_locales("repack_locales_pack") {
607   visibility = [ ":*" ]
609   input_locales = locales
611   if (is_mac) {
612     output_locales = locales_as_mac_outputs
613   } else {
614     output_locales = locales
615   }
618 chrome_repack_locales("repack_pseudo_locales_pack") {
619   visibility = [ ":*" ]
621   input_locales = [ "fake-bidi" ]
623   if (is_mac) {
624     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
625   } else {
626     output_locales = [ "fake-bidi" ]
627   }
630 # Generates a rule to repack a set of resources, substituting a given string
631 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
632 # the "gen" directory, and then introduces a copy rule to copy it to the root
633 # build directory.
635 # It's not clear why this two-step dance is necessary as opposed to just
636 # generating the file in the destination. However, this is what the GYP build
637 # does, and for maintenance purposes, this keeps the same files in the same
638 # place between the two builds when possible.
640 # Argument:
641 #   percent [required]
642 #      String to substitute for the percentage.
643 template("chrome_repack_percent") {
644   percent = invoker.percent
646   repack_name = "${target_name}_repack"
647   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
649   copy_name = target_name
651   repack(repack_name) {
652     visibility = [ ":$copy_name" ]
654     # All sources should also have deps for completeness.
655     sources = [
656       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
657       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
658       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
659       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
660     ]
662     deps = [
663       "//chrome/app/theme:theme_resources",
664       "//chrome/renderer:resources",
665       "//components/resources",
666       "//components/strings",
667       "//net:net_resources",
668       "//ui/resources",
669     ]
671     if (!is_ios) {
672       sources += [
673         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
674         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
675       ]
676       deps += [
677         "//content/app/resources",
678         "//third_party/WebKit/public:image_resources",
679       ]
680     }
681     if (use_ash) {
682       sources +=
683           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
684       deps += [ "//ash/resources" ]
685     }
686     if (toolkit_views) {
687       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
688       deps += [ "//ui/views/resources" ]
689     }
690     if (is_chromeos) {
691       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
692       deps += [ "//ui/chromeos/resources" ]
693     }
694     if (enable_extensions) {
695       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
696       deps += [ "//extensions:extensions_browser_resources" ]
697     }
699     output = repack_output_file
700   }
702   copy(copy_name) {
703     visibility = [ ":*" ]
704     deps = [
705       ":$repack_name",
706     ]
707     sources = [
708       repack_output_file,
709     ]
710     outputs = [
711       "$root_build_dir/chrome_${percent}_percent.pak",
712     ]
713   }
716 chrome_repack_percent("repack_chrome_100_percent") {
717   percent = "100"
720 if (enable_hidpi) {
721   chrome_repack_percent("repack_chrome_200_percent") {
722     percent = "200"
723   }
726 # Generates a rule to repack a set of material design resources for the browser
727 # top chrome, substituting a given string in for the percentage (e.g. "100",
728 # "200").
729 template("chrome_repack_material_percent") {
730   percent = invoker.percent
732   repack_name = "${target_name}_repack"
733   repack_output_file =
734       "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
736   copy_name = target_name
738   repack(repack_name) {
739     visibility = [ ":$copy_name" ]
741     # All sources should also have deps for completeness.
742     sources = [
743       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
744     ]
746     deps = [
747       "//chrome/app/theme:theme_resources",
748     ]
750     output = repack_output_file
751   }
753   copy(copy_name) {
754     visibility = [ ":*" ]
755     deps = [
756       ":$repack_name",
757     ]
758     sources = [
759       repack_output_file,
760     ]
761     outputs = [
762       "$root_build_dir/chrome_material_${percent}_percent.pak",
763     ]
764   }
767 if (enable_topchrome_md) {
768   chrome_repack_material_percent("repack_chrome_material_100_percent") {
769     percent = "100"
770   }
772   if (enable_hidpi) {
773     chrome_repack_material_percent("repack_chrome_material_200_percent") {
774       percent = "200"
775     }
776   }
779 # GYP version: chrome/chrome_resources.gyp:chrome_strings
780 group("strings") {
781   deps = [
782     "//chrome/app:chromium_strings",
783     "//chrome/app:generated_resources",
784     "//chrome/app:google_chrome_strings",
785     "//chrome/app/resources:locale_settings",
786   ]
789 if (is_android) {
790   # GYP: //chrome/chrome.gyp:content_setting_java
791   java_cpp_enum("content_setting_javagen") {
792     sources = [
793       "../components/content_settings/core/common/content_settings.h",
794     ]
795     outputs = [
796       "org/chromium/chrome/browser/ContentSetting.java",
797     ]
798   }
800   # GYP: //chrome/chrome.gyp:content_settings_type_java
801   java_cpp_enum("content_settings_type_javagen") {
802     sources = [
803       "../components/content_settings/core/common/content_settings_types.h",
804     ]
805     outputs = [
806       "org/chromium/chrome/browser/ContentSettingsType.java",
807     ]
808   }
810   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
811   java_cpp_enum("page_info_connection_type_javagen") {
812     sources = [
813       "browser/ui/android/website_settings_popup_android.h",
814     ]
815     outputs = [
816       "org/chromium/chrome/browser/PageInfoConnectionType.java",
817     ]
818   }
820   # GYP: //chrome/chrome_android.gypi:chrome_android_core
821   static_library("chrome_android_core") {
822     sources = [
823       "app/android/chrome_android_initializer.cc",
824       "app/android/chrome_android_initializer.h",
825       "app/android/chrome_jni_onload.cc",
826       "app/android/chrome_jni_onload.h",
827       "app/android/chrome_main_delegate_android.cc",
828       "app/android/chrome_main_delegate_android.h",
829       "app/chrome_main_delegate.cc",
830       "app/chrome_main_delegate.h",
831     ]
833     include_dirs = [ android_ndk_include_dir ]
835     libs = [
836       "android",
837       "jnigraphics",
838     ]
840     deps = [
841       "//chrome/browser",
842       "//chrome/browser/ui",
843       "//chrome/child",
844       "//chrome/plugin",
845       "//chrome/renderer",
846       "//chrome/utility",
847       "//components/enhanced_bookmarks",
848       "//content/public/app:both",
849     ]
850   }
853 if (is_linux) {
854   action("manpage") {
855     if (is_chrome_branded) {
856       name = "Google Chrome"
857       filename = "google-chrome"
858       confdir = "google-chrome"
859     } else {
860       name = "Chromium"
861       filename = "chromium-browser"
862       confdir = "chromium"
863     }
865     script = "//chrome/tools/build/linux/sed.py"
866     infile = "app/resources/manpage.1.in"
867     inputs = [
868       infile,
869     ]
871     outfile = "$root_out_dir/chrome.1"
872     outputs = [
873       outfile,
874     ]
876     args = [
877       rebase_path(infile, root_build_dir),
878       rebase_path(outfile, root_build_dir),
879       "-e s/@@NAME@@/$name/",
880       "-e s/@@FILENAME@@/$filename/",
881       "-e s/@@CONFDIR@@/$confdir/",
882     ]
883   }
885   action("linux_symbols") {
886     script = "//build/linux/dump_app_syms.py"
888     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
889     dump_syms_binary =
890         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
892     chrome_binary = "$root_out_dir/chrome"
893     if (current_cpu == "x86") {
894       # Use "ia32" instead of "x86" for GYP compat.
895       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
896     } else {
897       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
898     }
900     inputs = [
901       chrome_binary,
902       dump_syms_binary,
903     ]
904     outputs = [
905       symbol_file,
906     ]
908     args = [
909       "./" + rebase_path(dump_syms_binary, root_build_dir),
910       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
911       rebase_path(chrome_binary, root_build_dir),
912       rebase_path(symbol_file, root_build_dir),
913     ]
915     deps = [
916       ":chrome",
917       dump_syms_label,
918     ]
919   }