Compute can_use_lcd_text using property trees.
[chromium-blink-merge.git] / chrome / BUILD.gn
blob74039425cb43958c741c926c3aea86b4a5ccec27
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("//chrome/chrome_repack_locales.gni")
10 import("//chrome/version.gni")
12 if (is_android) {
13   import("//build/config/android/rules.gni")
16 if (!is_android) {
17   # TODO(GYP) for Windows need to the the reorder-imports step which probably
18   # means adding another target and renaming this to chrome_initial like in GYP.
19   executable("chrome") {
20     # Because the sources list varies so significantly per-platform, generally
21     # each platform lists its own files rather than relying on filtering or
22     # removing unused files.
23     sources = [
24       "app/chrome_exe_resource.h",
25     ]
26     defines = []
27     deps = []
28     data_deps = []
30     # TODO(GYP) mac_bundle_resources, xcode_settings
32     # TODO(GYP) order_profiling, order_text_section
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)
69         # '../win8/delegate_execute/delegate_execute.gyp:*', TODO(GYP)
70         # '../win8/metro_driver/metro_driver.gyp:metro_driver', TODO(GYP)
71         "//base",
72         "//breakpad:breakpad_handler",
73         "//breakpad:breakpad_sender",
74         "//chrome/browser:chrome_process_finder",
75         "//chrome/chrome_watcher",
76         "//chrome/chrome_watcher:client",
77         "//chrome/installer/util",
78         "//chrome_elf",
79         "//components/browser_watcher:browser_watcher_client",
80         "//components/crash/app",
81         "//content:startup_helper_win",
82         "//crypto",
83         "//sandbox",
84         "//ui/gfx",
85       ]
86       libs = [
87         "wintrust.lib",
88         "crypt32.lib",
89       ]
90       configs -= [ "//build/config/win:console" ]
91       configs += [ "//build/config/win:windowed" ]
92     } else if (use_aura) {
93       # Non-Windows aura entrypoint.
94       sources += [ "app/chrome_exe_main_aura.cc" ]
95     }
97     if (is_linux) {
98       sources += [
99         "app/chrome_dll_resource.h",
100         "app/chrome_main.cc",
101         "app/chrome_main_delegate.cc",
102         "app/chrome_main_delegate.h",
103       ]
105       deps += [
106         # On Linux, link the dependencies (libraries) that make up actual
107         # Chromium functionality directly into the executable.
108         ":browser_dependencies",
109         ":child_dependencies",
110         ":manpage",
111         "//base/allocator",
113         # Needed to use the master_preferences functions
114         "//chrome/installer/util",
115         "//content/public/app:both",
116       ]
118       # Needed for chrome_main.cc initialization of libraries.
119       configs += [ "//build/config/linux:pangocairo" ]
121       # GYP has this in a 'profiling==0 and linux_disable_pie==0' condition.
122       # but GN doesn't have either of these flags.
123       ldflags = [ "-pie" ]
125       if (use_x11) {
126         configs += [
127           "//build/config/linux:x11",
128           "//build/config/linux:xext",
129         ]
130       }
131     }
133     if (is_mac) {
134       sources += [ "app/chrome_exe_main_mac.cc" ]
135       # TODO(GYP) lots more stuff in the is_mac block.
136     } else {  # Non-Mac.
137       deps += [
138         ":packed_extra_resources",
139         ":packed_resources",
140         "//components/startup_metric_utils",
142         # Precompiled plugins that need to get copied to the output directory.
143         # On Mac, internal plugins go inside the framework, so these
144         # dependencies are on chrome.dll.
145         "//third_party/adobe/flash:flapper_binaries",
146         "//third_party/widevine/cdm:widevinecdmadapter",
147       ]
148     }
150     if (is_linux && enable_plugins) {
151       deps += [ "//pdf" ]
152     }
154     if (is_multi_dll_chrome) {
155       defines += [ "CHROME_MULTIPLE_DLL" ]
156       data_deps += [ ":chrome_child" ]
157     }
158   }
159 }  # !is_android
161 shared_library("main_dll") {
162   configs += [ "//build/config/compiler:wexit_time_destructors" ]
163   defines = []
165   deps = [
166     ":browser_dependencies",
167     "//base/allocator",
168   ]
169   if (is_win) {
170     output_name = "chrome"
172     sources = [
173       "//base/win/dllmain.cc",
174       "app/chrome_command_ids.h",
175       "app/chrome_dll.rc",
176       "app/chrome_dll_resource.h",
177       "app/chrome_main.cc",
178       "app/chrome_main_delegate.cc",
179       "app/chrome_main_delegate.h",
180       "app/close_handle_hook_win.cc",
181       "app/close_handle_hook_win.h",
182       "app/delay_load_hook_win.cc",
183       "app/delay_load_hook_win.h",
184     ]
186     deps += [
187       ":chrome_dll_version",
188       "//base/trace_event/etw_manifest:chrome_events_win",
189       "//chrome/app/theme:chrome_unscaled_resources",
190       "//chrome_elf",
191       "//content/app/resources",
192       "//crypto",
193       "//net:net_resources",
194       "//third_party/wtl",
195       "//ui/views",
196     ]
197     if (enable_configuration_policy) {
198       deps += [ "//components/policy" ]
199     }
200     if (current_cpu == "x86") {
201       # Add a dependency to custom import library for user32 delay imports only
202       # in x86 builds.
203       #deps += [ 'chrome_user32_delay_imports' ]  TODO(GYP)
204     }
206     # This is a large module that can't do incremental linking in some cases.
207     configs -= [ "//build/config/win:default_incremental_linking" ]
208     configs += [ "//build/config/win:default_large_module_incremental_linking" ]
210     # TODO(GYP) Lots of VCLinkerTool stuff on Windows.
212     # TODO(GYP) chrome_pgo_phase on Windows.
213   }
215   if (use_aura) {
216     deps += [ "//ui/compositor" ]
217   }
219   if (is_multi_dll_chrome) {
220     defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
221     deps += [ "//content/public/app:browser" ]
222   } else {
223     deps += [
224       ":child_dependencies",
225       "//content/public/app:both",
226     ]
227   }
229   if (cld_version == 0 || cld_version == 2) {
230     deps += [ "//third_party/cld_2" ]
231   }
233   if (is_mac) {
234     #['OS=="mac" and component!="shared_library"', {  TODO(GYP)
235     #  'includes': [ 'chrome_dll_bundle.gypi' ],
236     #}],
237     # TODO(GYP) Lots of other stuff in the OS=="mac" block.
238   }
240   if (enable_plugins && !is_multi_dll_chrome) {
241     deps += [ "//pdf" ]
242   }
245 if (is_multi_dll_chrome) {
246   shared_library("chrome_child") {
247     sources = [
248       "app/chrome_main.cc",
249       "app/chrome_main_delegate.cc",
250       "app/chrome_main_delegate.h",
251       "app/close_handle_hook_win.cc",
252       "app/close_handle_hook_win.h",
253     ]
255     configs += [ "//build/config/compiler:wexit_time_destructors" ]
256     defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
258     deps = [
259       ":child_dependencies",
260       ":chrome_dll_version",
261       "//chrome/browser/policy:path_parser",
262       "//content/public/app:child",
263     ]
265     if (is_win) {
266       deps += [ "//chrome_elf" ]
267       # TODO(GYP): PGO on Windows.
268       # ['chrome_pgo_phase==1', {
269       #   'msvs_settings': {
270       #     'VCLinkerTool': {
271       #       'LinkTimeCodeGeneration': '2',
272       #     },
273       #   },
274       # }],
275       # ['chrome_pgo_phase==2', {
276       #   'msvs_settings': {
277       #     'VCLinkerTool': {
278       #       'LinkTimeCodeGeneration': '3',
279       #     },
280       #   },
281       # }],
282     }
283     if (enable_plugins) {
284       deps += [ "//pdf" ]
285     }
286   }
289 # GYP version: chromium_browser_dependencies variable in chrome.gyp
290 group("browser_dependencies") {
291   deps = [
292     "//chrome/browser",
293     "//chrome/common",
294     "//sync",
295   ]
296   if (!is_ios) {
297     deps += [ "//ppapi/host" ]
298   }
300   if (enable_basic_printing || enable_print_preview) {
301     deps += [ "//printing" ]
302     if (enable_print_preview) {
303       deps += [ "//chrome/service" ]
304     }
305   }
308 # GYP version: chromium_child_dependencies variable in chrome.gyp
309 group("child_dependencies") {
310   deps = [
311     "//chrome/common",
312     "//sync",
313   ]
314   if (!is_ios) {
315     deps += [
316       "//chrome/browser/devtools",
317       "//chrome/child",
318       "//chrome/plugin",
319       "//chrome/renderer",
320       "//chrome/utility",
321       "//content/public/child",
322       "//third_party/WebKit/public:blink_devtools_frontend_resources",
323     ]
324   }
325   if (cld_version == 0 || cld_version == 2) {
326     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
327   }
329   if (enable_nacl) {
330     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
331   }
332   if (enable_remoting) {
333     deps += [ "//remoting/client/plugin" ]
334   }
337 if (is_win) {
338   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
339   # Linux.
340   process_version("version_header") {
341     # TODO(brettW) this should have more reduced visibility, but chrome/browser
342     # currently depends on this.
343     #visibility = [ ":*" ]
345     # This one just uses the custom template and no separate sources.
346     sources = []
347     template_file = "version.h.in"
349     # TODO(brettw) this should move to $target_gen_dir/version.h and
350     # source files including it should reference it via "chrome/version.h"
351     output = "$root_gen_dir/version.h"
352   }
354   process_version("chrome_exe_version") {
355     sources = [
356       "app/chrome_exe.ver",
357     ]
358     output = "$target_gen_dir/chrome_exe_version.rc"
359   }
361   process_version("chrome_dll_version") {
362     sources = [
363       "app/chrome_dll.ver",
364     ]
365     output = "$target_gen_dir/chrome_dll_version.rc"
366   }
368   process_version("nacl64_exe_version") {
369     sources = [
370       "app/nacl64_exe.ver",
371     ]
372     output = "$target_gen_dir/nacl64_exe_version.rc"
373   }
375   process_version("other_version") {
376     sources = [
377       "app/other.ver",
378     ]
379     output = "$target_gen_dir/other_version.rc"
380   }
382   source_set("image_pre_reader") {
383     sources = [
384       "app/image_pre_reader_win.cc",
385       "app/image_pre_reader_win.h",
386     ]
387     deps = [
388       "//base",
389     ]
390   }
393 # GYP version: chrome/chrome_resources.gyp:chrome_resources
394 group("resources") {
395   deps = [
396     # Note: GYP lists some dependencies in addition to these actions. However,
397     # these are just dependencies for the actions themselves, which our actions
398     # list individually when needed.
399     "//chrome/browser:resources",
400     "//chrome/common:resources",
401     "//chrome/renderer:resources",
402   ]
404   if (enable_extensions) {
405     deps += [ "//chrome/common:extensions_api_resources" ]
406   }
409 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
410 group("extra_resources") {
411   deps = [
412     "//chrome/browser/resources:invalidations_resources",
413     "//chrome/browser/resources:memory_internals_resources",
414     "//chrome/browser/resources:net_internals_resources",
415     "//chrome/browser/resources:password_manager_internals_resources",
416     "//chrome/browser/resources:signin_internals_resources",
417     "//chrome/browser/resources:sync_internals_resources",
418     "//chrome/browser/resources:translate_internals_resources",
419   ]
420   if (!is_ios) {
421     deps += [
422       "//chrome/browser/resources:component_extension_resources",
423       "//chrome/browser/resources:options_resources",
424       "//chrome/browser/resources:settings_resources",
425     ]
426   }
428   if (enable_chromevox_next) {
429     deps += [
430       #'browser/resources/chromeos/chromevox2/chromevox.gyp:chromevox2',  TODO(GYP)
431     ]
432   } else {
433     deps += [
434       #'browser/resources/chromeos/chromevox/chromevox.gyp:chromevox',  TODO(GYP)
435     ]
436   }
438   if (enable_extensions) {
439     deps += [
440       "//chrome/browser/resources:quota_internals_resources",
441       "//chrome/browser/resources:sync_file_system_internals_resources",
442     ]
443   }
446 if (is_chrome_branded) {
447   copy("default_apps") {
448     visibility = [ ":packed_resources" ]
449     sources = [
450       "browser/resources/default_apps/docs.crx",
451       "browser/resources/default_apps/drive.crx",
452       "browser/resources/default_apps/external_extensions.json",
453       "browser/resources/default_apps/gmail.crx",
454       "browser/resources/default_apps/search.crx",
455       "browser/resources/default_apps/youtube.crx",
456     ]
457     outputs = [
458       "$root_out_dir/default_apps/{{source_file_part}}",
459     ]
460   }
463 group("packed_resources") {
464   deps = [
465     ":repack_locales_pack",
466     ":repack_pseudo_locales_pack",
467     ":repack_chrome_100_percent",
468   ]
470   if (is_chrome_branded) {
471     deps += [ ":default_apps" ]
472   }
474   if (enable_hidpi) {
475     deps += [ ":repack_chrome_200_percent" ]
476   }
478   if (enable_topchrome_md) {
479     deps += [ ":repack_chrome_material_100_percent" ]
481     if (enable_hidpi) {
482       deps += [ ":repack_chrome_material_200_percent" ]
483     }
484   }
487 repack("packed_extra_resources") {
488   visibility = [ "./*" ]
489   sources = [
490     "$root_gen_dir/chrome/browser_resources.pak",
491     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
492     "$root_gen_dir/chrome/common_resources.pak",
493     "$root_gen_dir/chrome/invalidations_resources.pak",
494     "$root_gen_dir/chrome/memory_internals_resources.pak",
495     "$root_gen_dir/chrome/net_internals_resources.pak",
496     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
497     "$root_gen_dir/chrome/signin_internals_resources.pak",
498     "$root_gen_dir/chrome/sync_internals_resources.pak",
499     "$root_gen_dir/chrome/translate_internals_resources.pak",
500     "$root_gen_dir/components/components_resources.pak",
501     "$root_gen_dir/net/net_resources.pak",
502     "$root_gen_dir/ui/resources/webui_resources.pak",
503   ]
504   deps = [
505     "//chrome/browser:resources",
506     "//chrome/app/theme:chrome_unscaled_resources",
507     "//chrome/common:resources",
508     "//chrome/browser/resources:invalidations_resources",
509     "//chrome/browser/resources:memory_internals_resources",
510     "//chrome/browser/resources:net_internals_resources",
511     "//chrome/browser/resources:password_manager_internals_resources",
512     "//chrome/browser/resources:signin_internals_resources",
513     "//chrome/browser/resources:sync_internals_resources",
514     "//chrome/browser/resources:translate_internals_resources",
515     "//components/resources",
516     "//net:net_resources",
517     "//ui/resources",
518   ]
520   if (!is_ios && !is_android) {
521     # New paks should be added here by default.
522     sources += [
523       "$root_gen_dir/blink/devtools_resources.pak",
524       "$root_gen_dir/chrome/component_extension_resources.pak",
525       "$root_gen_dir/chrome/options_resources.pak",
526       "$root_gen_dir/chrome/quota_internals_resources.pak",
527       "$root_gen_dir/chrome/settings_resources.pak",
528       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
529       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
530     ]
531     deps += [
532       "//chrome/browser/devtools:webrtc_device_provider_resources",
533       "//chrome/browser/resources:component_extension_resources",
534       "//chrome/browser/resources:options_resources",
535       "//chrome/browser/resources:settings_resources",
536       "//chrome/browser/resources:quota_internals_resources",
537       "//chrome/browser/resources:sync_file_system_internals_resources",
538       "//content/browser/devtools:devtools_resources",
539     ]
540   }
541   if (!is_ios) {
542     sources += [
543       "$root_gen_dir/blink/public/resources/blink_resources.pak",
544       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
545       "$root_gen_dir/content/content_resources.pak",
546     ]
547     deps += [
548       "//content:resources",
549       "//content/browser/tracing:resources",
550       "//third_party/WebKit/public:resources",
551     ]
552   }
553   if (is_chromeos) {
554     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
555     deps += [ "//ui/file_manager:resources" ]
556   }
557   if (enable_extensions) {
558     sources += [
559       "$root_gen_dir/chrome/extensions_api_resources.pak",
560       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
561       "$root_gen_dir/extensions/extensions_resources.pak",
562     ]
563     deps += [
564       "//chrome/common:extensions_api_resources",
565       "//extensions:extensions_resources",
566     ]
567   }
569   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
570   # it them copies it. This skipes the copy step and writes it to the final
571   # location.
572   if (is_mac || is_ios) {
573     output = "$root_gen_dir/repack/resources.pak"
574   } else {
575     output = "$root_out_dir/resources.pak"
576   }
579 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
580 repack("browser_tests_pak") {
581   sources = [
582     "$root_gen_dir/chrome/options_test_resources.pak",
583   ]
584   output = "$root_out_dir/browser_tests.pak"
585   deps = [
586     "//chrome/browser/resources:options_test_resources",
587   ]
590 # Collects per-locale grit files from many sources into global per-locale files.
591 chrome_repack_locales("repack_locales_pack") {
592   visibility = [ ":*" ]
594   input_locales = locales
596   if (is_mac) {
597     output_locales = locales_as_mac_outputs
598   } else {
599     output_locales = locales
600   }
603 chrome_repack_locales("repack_pseudo_locales_pack") {
604   visibility = [ ":*" ]
606   input_locales = [ "fake-bidi" ]
608   if (is_mac) {
609     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
610   } else {
611     output_locales = [ "fake-bidi" ]
612   }
615 # Generates a rule to repack a set of resources, substituting a given string
616 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
617 # the "gen" directory, and then introduces a copy rule to copy it to the root
618 # build directory.
620 # It's not clear why this two-step dance is necessary as opposed to just
621 # generating the file in the destination. However, this is what the GYP build
622 # does, and for maintenance purposes, this keeps the same files in the same
623 # place between the two builds when possible.
625 # Argument:
626 #   percent [required]
627 #      String to substitute for the percentage.
628 template("chrome_repack_percent") {
629   percent = invoker.percent
631   repack_name = "${target_name}_repack"
632   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
634   copy_name = target_name
636   repack(repack_name) {
637     visibility = [ ":$copy_name" ]
639     # All sources should also have deps for completeness.
640     sources = [
641       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
642       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
643       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
644       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
645     ]
647     deps = [
648       "//chrome/app/theme:theme_resources",
649       "//chrome/renderer:resources",
650       "//components/resources",
651       "//components/strings",
652       "//net:net_resources",
653       "//ui/resources",
654     ]
656     if (!is_ios) {
657       sources += [
658         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
659         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
660       ]
661       deps += [
662         "//content/app/resources",
663         "//third_party/WebKit/public:image_resources",
664       ]
665     }
666     if (use_ash) {
667       sources +=
668           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
669       deps += [ "//ash/resources" ]
670     }
671     if (toolkit_views) {
672       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
673       deps += [ "//ui/views/resources" ]
674     }
675     if (is_chromeos) {
676       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
677       deps += [ "//ui/chromeos/resources" ]
678     }
679     if (enable_extensions) {
680       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
681       deps += [ "//extensions:extensions_browser_resources" ]
682     }
684     output = repack_output_file
685   }
687   copy(copy_name) {
688     visibility = [ ":*" ]
689     deps = [
690       ":$repack_name",
691     ]
692     sources = [
693       repack_output_file,
694     ]
695     outputs = [
696       "$root_build_dir/chrome_${percent}_percent.pak",
697     ]
698   }
701 chrome_repack_percent("repack_chrome_100_percent") {
702   percent = "100"
705 if (enable_hidpi) {
706   chrome_repack_percent("repack_chrome_200_percent") {
707     percent = "200"
708   }
711 # Generates a rule to repack a set of material design resources for the browser
712 # top chrome, substituting a given string in for the percentage (e.g. "100",
713 # "200").
714 template("chrome_repack_material_percent") {
715   percent = invoker.percent
717   repack_name = "${target_name}_repack"
718   repack_output_file = "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
720   copy_name = target_name
722   repack(repack_name) {
723     visibility = [ ":$copy_name" ]
725     # All sources should also have deps for completeness.
726     sources = [
727       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
728     ]
730     deps = [
731       "//chrome/app/theme:theme_resources",
732     ]
734     output = repack_output_file
735   }
737   copy(copy_name) {
738     visibility = [ ":*" ]
739     deps = [
740       ":$repack_name",
741     ]
742     sources = [
743       repack_output_file,
744     ]
745     outputs = [
746       "$root_build_dir/chrome_material_${percent}_percent.pak",
747     ]
748   }
751 if (enable_topchrome_md) {
752   chrome_repack_material_percent("repack_chrome_material_100_percent") {
753     percent = "100"
754   }
756   if (enable_hidpi) {
757     chrome_repack_material_percent("repack_chrome_material_200_percent") {
758       percent = "200"
759     }
760   }
763 # GYP version: chrome/chrome_resources.gyp:chrome_strings
764 group("strings") {
765   deps = [
766     "//chrome/app:chromium_strings",
767     "//chrome/app:generated_resources",
768     "//chrome/app:google_chrome_strings",
769     "//chrome/app/resources:locale_settings",
770   ]
773 if (is_android) {
774   # GYP: //chrome/chrome.gyp:content_setting_java
775   java_cpp_enum("content_setting_javagen") {
776     sources = [
777       "../components/content_settings/core/common/content_settings.h",
778     ]
779     outputs = [
780       "org/chromium/chrome/browser/ContentSetting.java",
781     ]
782   }
784   # GYP: //chrome/chrome.gyp:content_settings_type_java
785   java_cpp_enum("content_settings_type_javagen") {
786     sources = [
787       "../components/content_settings/core/common/content_settings_types.h",
788     ]
789     outputs = [
790       "org/chromium/chrome/browser/ContentSettingsType.java",
791     ]
792   }
794   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
795   java_cpp_enum("page_info_connection_type_javagen") {
796     sources = [
797       "browser/ui/android/website_settings_popup_android.h",
798     ]
799     outputs = [
800       "org/chromium/chrome/browser/PageInfoConnectionType.java",
801     ]
802   }
804   # GYP: //chrome/chrome_android.gypi:chrome_android_core
805   static_library("chrome_android_core") {
806     sources = [
807       "app/android/chrome_android_initializer.cc",
808       "app/android/chrome_android_initializer.h",
809       "app/android/chrome_jni_onload.cc",
810       "app/android/chrome_jni_onload.h",
811       "app/android/chrome_main_delegate_android.cc",
812       "app/android/chrome_main_delegate_android.h",
813       "app/chrome_main_delegate.cc",
814       "app/chrome_main_delegate.h",
815     ]
817     include_dirs = [ android_ndk_include_dir ]
819     libs = [
820       "android",
821       "jnigraphics",
822     ]
824     deps = [
825       "//chrome/browser",
826       "//chrome/browser/ui",
827       "//chrome/child",
828       "//chrome/plugin",
829       "//chrome/renderer",
830       "//chrome/utility",
831       "//components/enhanced_bookmarks",
832       "//content/public/app:both",
833     ]
834   }
837 if (is_linux) {
838   action("manpage") {
839     if (is_chrome_branded) {
840       name = "Google Chrome"
841       filename = "google-chrome"
842       confdir = "google-chrome"
843     } else {
844       name = "Chromium"
845       filename = "chromium-browser"
846       confdir = "chromium"
847     }
849     script = "//chrome/tools/build/linux/sed.py"
850     infile = "app/resources/manpage.1.in"
851     inputs = [
852       infile,
853     ]
855     outfile = "$root_out_dir/chrome.1"
856     outputs = [
857       outfile,
858     ]
860     args = [
861       rebase_path(infile, root_build_dir),
862       rebase_path(outfile, root_build_dir),
863       "-e s/@@NAME@@/$name/",
864       "-e s/@@FILENAME@@/$filename/",
865       "-e s/@@CONFDIR@@/$confdir/",
866     ]
867   }
869   action("linux_symbols") {
870     script = "//build/linux/dump_app_syms.py"
872     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
873     dump_syms_binary =
874         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
876     chrome_binary = "$root_out_dir/chrome"
877     if (current_cpu == "x86") {
878       # Use "ia32" instead of "x86" for GYP compat.
879       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
880     } else {
881       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
882     }
884     inputs = [
885       chrome_binary,
886       dump_syms_binary,
887     ]
888     outputs = [
889       symbol_file,
890     ]
892     args = [
893       "./" + rebase_path(dump_syms_binary, root_build_dir),
894       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
895       rebase_path(chrome_binary, root_build_dir),
896       rebase_path(symbol_file, root_build_dir),
897     ]
899     deps = [
900       ":chrome",
901       dump_syms_label,
902     ]
903   }