Update V8 to version 4.6.24.
[chromium-blink-merge.git] / chrome / BUILD.gn
blob7188266d76bc72f8a63f4c24102fa2346606ee27
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/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_version",
191       "//base/trace_event/etw_manifest:chrome_events_win",
192       "//chrome/app/theme:chrome_unscaled_resources",
193       "//chrome_elf",
194       "//content/app/resources",
195       "//crypto",
196       "//net:net_resources",
197       "//third_party/wtl",
198       "//ui/views",
199     ]
200     if (enable_configuration_policy) {
201       deps += [ "//components/policy" ]
202     }
203     if (current_cpu == "x86") {
204       # Add a dependency to custom import library for user32 delay imports only
205       # in x86 builds.
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) Lots of VCLinkerTool stuff on Windows.
215     # TODO(GYP) chrome_pgo_phase on Windows.
216   }
218   if (use_aura) {
219     deps += [ "//ui/compositor" ]
220   }
222   if (is_multi_dll_chrome) {
223     defines += [ "CHROME_MULTIPLE_DLL_BROWSER" ]
224     deps += [ "//content/public/app:browser" ]
225   } else {
226     deps += [
227       ":child_dependencies",
228       "//content/public/app:both",
229     ]
230   }
232   if (cld_version == 0 || cld_version == 2) {
233     deps += [ "//third_party/cld_2" ]
234   }
236   if (is_mac) {
237     #['OS=="mac" and component!="shared_library"', {  TODO(GYP)
238     #  'includes': [ 'chrome_dll_bundle.gypi' ],
239     #}],
240     # TODO(GYP) Lots of other stuff in the OS=="mac" block.
241   }
243   if (enable_plugins && !is_multi_dll_chrome) {
244     deps += [ "//pdf" ]
245   }
248 if (is_multi_dll_chrome) {
249   shared_library("chrome_child") {
250     sources = [
251       "app/chrome_main.cc",
252       "app/chrome_main_delegate.cc",
253       "app/chrome_main_delegate.h",
254       "app/close_handle_hook_win.cc",
255       "app/close_handle_hook_win.h",
256     ]
258     configs += [ "//build/config/compiler:wexit_time_destructors" ]
259     defines = [ "CHROME_MULTIPLE_DLL_CHILD" ]
261     deps = [
262       ":child_dependencies",
263       ":chrome_dll_version",
264       "//chrome/browser/policy:path_parser",
265       "//content/public/app:child",
266     ]
268     if (is_win) {
269       # TODO(GYP): PGO on Windows.
270       # ['chrome_pgo_phase==1', {
271       #   'msvs_settings': {
272       #     'VCLinkerTool': {
273       #       'LinkTimeCodeGeneration': '2',
274       #     },
275       #   },
276       # }],
277       # ['chrome_pgo_phase==2', {
278       #   'msvs_settings': {
279       #     'VCLinkerTool': {
280       #       'LinkTimeCodeGeneration': '3',
281       #     },
282       #   },
283       # }],
284     }
285     if (enable_plugins) {
286       deps += [ "//pdf" ]
287     }
288   }
291 # GYP version: chromium_browser_dependencies variable in chrome.gyp
292 group("browser_dependencies") {
293   deps = [
294     "//chrome/browser",
295     "//chrome/common",
296     "//sync",
297   ]
298   if (!is_ios) {
299     deps += [ "//ppapi/host" ]
300   }
302   if (enable_basic_printing || enable_print_preview) {
303     deps += [ "//printing" ]
304     if (enable_print_preview) {
305       deps += [ "//chrome/service" ]
306     }
307   }
310 # GYP version: chromium_child_dependencies variable in chrome.gyp
311 group("child_dependencies") {
312   deps = [
313     "//chrome/common",
314     "//sync",
315   ]
316   if (!is_ios) {
317     deps += [
318       "//chrome/browser/devtools",
319       "//chrome/child",
320       "//chrome/plugin",
321       "//chrome/renderer",
322       "//chrome/utility",
323       "//content/public/child",
324       "//third_party/WebKit/public:blink_devtools_frontend_resources",
325     ]
326   }
327   if (cld_version == 0 || cld_version == 2) {
328     deps += [ "//third_party/cld_2:cld2_platform_impl" ]
329   }
331   if (enable_nacl) {
332     deps += [ "//components/nacl/renderer/plugin:nacl_trusted_plugin" ]
333   }
334   if (enable_remoting) {
335     deps += [ "//remoting/client/plugin" ]
336   }
339 if (is_win) {
340   # TODO(brettw) this duplicates "//chrome/common:version" which applies to
341   # Linux.
342   process_version("version_header") {
343     # TODO(brettW) this should have more reduced visibility, but chrome/browser
344     # currently depends on this.
345     #visibility = [ ":*" ]
347     # This one just uses the custom template and no separate sources.
348     sources = []
349     template_file = "version.h.in"
351     # TODO(brettw) this should move to $target_gen_dir/version.h and
352     # source files including it should reference it via "chrome/version.h"
353     output = "$root_gen_dir/version.h"
354   }
356   process_version("chrome_exe_version") {
357     sources = [
358       "app/chrome_exe.ver",
359     ]
360     output = "$target_gen_dir/chrome_exe_version.rc"
361   }
363   process_version("chrome_dll_version") {
364     sources = [
365       "app/chrome_dll.ver",
366     ]
367     output = "$target_gen_dir/chrome_dll_version.rc"
368   }
370   process_version("nacl64_exe_version") {
371     sources = [
372       "app/nacl64_exe.ver",
373     ]
374     output = "$target_gen_dir/nacl64_exe_version.rc"
375   }
377   process_version("other_version") {
378     sources = [
379       "app/other.ver",
380     ]
381     output = "$target_gen_dir/other_version.rc"
382   }
384   source_set("image_pre_reader") {
385     sources = [
386       "app/image_pre_reader_win.cc",
387       "app/image_pre_reader_win.h",
388     ]
389     deps = [
390       "//base",
391     ]
392   }
395 # GYP version: chrome/chrome_resources.gyp:chrome_resources
396 group("resources") {
397   deps = [
398     # Note: GYP lists some dependencies in addition to these actions. However,
399     # these are just dependencies for the actions themselves, which our actions
400     # list individually when needed.
401     "//chrome/browser:resources",
402     "//chrome/common:resources",
403     "//chrome/renderer:resources",
404   ]
406   if (enable_extensions) {
407     deps += [ "//chrome/common:extensions_api_resources" ]
408   }
411 # GYP version: chrome/chrome_resources.gyp:chrome_extra_resources
412 group("extra_resources") {
413   deps = [
414     "//chrome/browser/resources:invalidations_resources",
415     "//chrome/browser/resources:memory_internals_resources",
416     "//chrome/browser/resources:net_internals_resources",
417     "//chrome/browser/resources:password_manager_internals_resources",
418     "//chrome/browser/resources:signin_internals_resources",
419     "//chrome/browser/resources:sync_internals_resources",
420     "//chrome/browser/resources:translate_internals_resources",
421   ]
422   if (!is_ios) {
423     deps += [
424       "//chrome/browser/resources:component_extension_resources",
425       "//chrome/browser/resources:options_resources",
426       "//chrome/browser/resources:settings_resources",
427     ]
428   }
430   if (is_chromeos) {
431     deps += [ "//chrome/browser/resources/chromeos/chromevox" ]
432   }
434   if (enable_extensions) {
435     deps += [
436       "//chrome/browser/resources:quota_internals_resources",
437       "//chrome/browser/resources:sync_file_system_internals_resources",
438     ]
439   }
442 if (is_chrome_branded) {
443   copy("default_apps") {
444     visibility = [ ":packed_resources" ]
445     sources = [
446       "browser/resources/default_apps/docs.crx",
447       "browser/resources/default_apps/drive.crx",
448       "browser/resources/default_apps/external_extensions.json",
449       "browser/resources/default_apps/gmail.crx",
450       "browser/resources/default_apps/search.crx",
451       "browser/resources/default_apps/youtube.crx",
452     ]
453     outputs = [
454       "$root_out_dir/default_apps/{{source_file_part}}",
455     ]
456   }
459 group("packed_resources") {
460   deps = [
461     ":repack_locales_pack",
462     ":repack_pseudo_locales_pack",
463     ":repack_chrome_100_percent",
464   ]
466   if (is_chrome_branded) {
467     deps += [ ":default_apps" ]
468   }
470   if (enable_hidpi) {
471     deps += [ ":repack_chrome_200_percent" ]
472   }
474   if (enable_topchrome_md) {
475     deps += [ ":repack_chrome_material_100_percent" ]
477     if (enable_hidpi) {
478       deps += [ ":repack_chrome_material_200_percent" ]
479     }
480   }
483 repack("packed_extra_resources") {
484   visibility = [ "./*" ]
485   sources = [
486     "$root_gen_dir/chrome/browser_resources.pak",
487     "$root_gen_dir/chrome/chrome_unscaled_resources.pak",
488     "$root_gen_dir/chrome/common_resources.pak",
489     "$root_gen_dir/chrome/invalidations_resources.pak",
490     "$root_gen_dir/chrome/memory_internals_resources.pak",
491     "$root_gen_dir/chrome/net_internals_resources.pak",
492     "$root_gen_dir/chrome/password_manager_internals_resources.pak",
493     "$root_gen_dir/chrome/signin_internals_resources.pak",
494     "$root_gen_dir/chrome/sync_internals_resources.pak",
495     "$root_gen_dir/chrome/translate_internals_resources.pak",
496     "$root_gen_dir/components/components_resources.pak",
497     "$root_gen_dir/net/net_resources.pak",
498     "$root_gen_dir/ui/resources/webui_resources.pak",
499   ]
500   deps = [
501     "//chrome/browser:resources",
502     "//chrome/app/theme:chrome_unscaled_resources",
503     "//chrome/common:resources",
504     "//chrome/browser/resources:invalidations_resources",
505     "//chrome/browser/resources:memory_internals_resources",
506     "//chrome/browser/resources:net_internals_resources",
507     "//chrome/browser/resources:password_manager_internals_resources",
508     "//chrome/browser/resources:signin_internals_resources",
509     "//chrome/browser/resources:sync_internals_resources",
510     "//chrome/browser/resources:translate_internals_resources",
511     "//components/resources",
512     "//net:net_resources",
513     "//ui/resources",
514   ]
516   if (!is_ios && !is_android) {
517     # New paks should be added here by default.
518     sources += [
519       "$root_gen_dir/blink/devtools_resources.pak",
520       "$root_gen_dir/chrome/component_extension_resources.pak",
521       "$root_gen_dir/chrome/options_resources.pak",
522       "$root_gen_dir/chrome/quota_internals_resources.pak",
523       "$root_gen_dir/chrome/settings_resources.pak",
524       "$root_gen_dir/chrome/sync_file_system_internals_resources.pak",
525       "$root_gen_dir/chrome/webrtc_device_provider_resources.pak",
526     ]
527     deps += [
528       "//chrome/browser/devtools:webrtc_device_provider_resources",
529       "//chrome/browser/resources:component_extension_resources",
530       "//chrome/browser/resources:options_resources",
531       "//chrome/browser/resources:settings_resources",
532       "//chrome/browser/resources:quota_internals_resources",
533       "//chrome/browser/resources:sync_file_system_internals_resources",
534       "//content/browser/devtools:devtools_resources",
535     ]
536   }
537   if (!is_ios) {
538     sources += [
539       "$root_gen_dir/blink/public/resources/blink_resources.pak",
540       "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
541       "$root_gen_dir/content/content_resources.pak",
542     ]
543     deps += [
544       "//content:resources",
545       "//content/browser/tracing:resources",
546       "//third_party/WebKit/public:resources",
547     ]
548   }
549   if (is_chromeos) {
550     sources += [ "$root_gen_dir/ui/file_manager/file_manager_resources.pak" ]
551     deps += [ "//ui/file_manager:resources" ]
552   }
553   if (enable_extensions) {
554     sources += [
555       "$root_gen_dir/chrome/extensions_api_resources.pak",
556       "$root_gen_dir/extensions/extensions_renderer_resources.pak",
557       "$root_gen_dir/extensions/extensions_resources.pak",
558     ]
559     deps += [
560       "//chrome/common:extensions_api_resources",
561       "//extensions:extensions_resources",
562     ]
563   }
565   # GYP outputs the file in the gen/repack directory. On non-Mac/iOS platforms
566   # it them copies it. This skipes the copy step and writes it to the final
567   # location.
568   if (is_mac || is_ios) {
569     output = "$root_gen_dir/repack/resources.pak"
570   } else {
571     output = "$root_out_dir/resources.pak"
572   }
575 # GYP version: chrome/chrome_resources.gyp:browser_tests_pak
576 repack("browser_tests_pak") {
577   sources = [
578     "$root_gen_dir/chrome/options_test_resources.pak",
579     "$root_gen_dir/chrome/webui_test_resources.pak",
580   ]
581   output = "$root_out_dir/browser_tests.pak"
582   deps = [
583     "//chrome/browser/resources:options_test_resources",
584     "//chrome/test/data:webui_test_resources",
585   ]
588 # Collects per-locale grit files from many sources into global per-locale files.
589 chrome_repack_locales("repack_locales_pack") {
590   visibility = [ ":*" ]
592   input_locales = locales
594   if (is_mac) {
595     output_locales = locales_as_mac_outputs
596   } else {
597     output_locales = locales
598   }
601 chrome_repack_locales("repack_pseudo_locales_pack") {
602   visibility = [ ":*" ]
604   input_locales = [ "fake-bidi" ]
606   if (is_mac) {
607     output_locales = [ "fake_bidi" ]  # Mac uses underscores.
608   } else {
609     output_locales = [ "fake-bidi" ]
610   }
613 # Generates a rule to repack a set of resources, substituting a given string
614 # in for the percentage (e.g. "100", "200"). It generates the repacked files in
615 # the "gen" directory, and then introduces a copy rule to copy it to the root
616 # build directory.
618 # It's not clear why this two-step dance is necessary as opposed to just
619 # generating the file in the destination. However, this is what the GYP build
620 # does, and for maintenance purposes, this keeps the same files in the same
621 # place between the two builds when possible.
623 # Argument:
624 #   percent [required]
625 #      String to substitute for the percentage.
626 template("chrome_repack_percent") {
627   percent = invoker.percent
629   repack_name = "${target_name}_repack"
630   repack_output_file = "$root_gen_dir/repack/chrome_${percent}_percent.pak"
632   copy_name = target_name
634   repack(repack_name) {
635     visibility = [ ":$copy_name" ]
637     # All sources should also have deps for completeness.
638     sources = [
639       "$root_gen_dir/chrome/renderer_resources_${percent}_percent.pak",
640       "$root_gen_dir/chrome/theme_resources_${percent}_percent.pak",
641       "$root_gen_dir/components/components_resources_${percent}_percent.pak",
642       "$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
643     ]
645     deps = [
646       "//chrome/app/theme:theme_resources",
647       "//chrome/renderer:resources",
648       "//components/resources",
649       "//components/strings",
650       "//net:net_resources",
651       "//ui/resources",
652     ]
654     if (!is_ios) {
655       sources += [
656         "$root_gen_dir/blink/public/resources/blink_image_resources_${percent}_percent.pak",
657         "$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
658       ]
659       deps += [
660         "//content/app/resources",
661         "//third_party/WebKit/public:image_resources",
662       ]
663     }
664     if (use_ash) {
665       sources +=
666           [ "$root_gen_dir/ash/resources/ash_resources_${percent}_percent.pak" ]
667       deps += [ "//ash/resources" ]
668     }
669     if (toolkit_views) {
670       sources += [ "$root_gen_dir/ui/views/resources/views_resources_${percent}_percent.pak" ]
671       deps += [ "//ui/views/resources" ]
672     }
673     if (is_chromeos) {
674       sources += [ "$root_gen_dir/ui/chromeos/resources/ui_chromeos_resources_${percent}_percent.pak" ]
675       deps += [ "//ui/chromeos/resources" ]
676     }
677     if (enable_extensions) {
678       sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
679       deps += [ "//extensions:extensions_browser_resources" ]
680     }
682     output = repack_output_file
683   }
685   copy(copy_name) {
686     visibility = [ ":*" ]
687     deps = [
688       ":$repack_name",
689     ]
690     sources = [
691       repack_output_file,
692     ]
693     outputs = [
694       "$root_build_dir/chrome_${percent}_percent.pak",
695     ]
696   }
699 chrome_repack_percent("repack_chrome_100_percent") {
700   percent = "100"
703 if (enable_hidpi) {
704   chrome_repack_percent("repack_chrome_200_percent") {
705     percent = "200"
706   }
709 # Generates a rule to repack a set of material design resources for the browser
710 # top chrome, substituting a given string in for the percentage (e.g. "100",
711 # "200").
712 template("chrome_repack_material_percent") {
713   percent = invoker.percent
715   repack_name = "${target_name}_repack"
716   repack_output_file =
717       "$root_gen_dir/repack/chrome_material_${percent}_percent.pak"
719   copy_name = target_name
721   repack(repack_name) {
722     visibility = [ ":$copy_name" ]
724     # All sources should also have deps for completeness.
725     sources = [
726       "$root_gen_dir/chrome/theme_resources_material_${percent}_percent.pak",
727     ]
729     deps = [
730       "//chrome/app/theme:theme_resources",
731     ]
733     output = repack_output_file
734   }
736   copy(copy_name) {
737     visibility = [ ":*" ]
738     deps = [
739       ":$repack_name",
740     ]
741     sources = [
742       repack_output_file,
743     ]
744     outputs = [
745       "$root_build_dir/chrome_material_${percent}_percent.pak",
746     ]
747   }
750 if (enable_topchrome_md) {
751   chrome_repack_material_percent("repack_chrome_material_100_percent") {
752     percent = "100"
753   }
755   if (enable_hidpi) {
756     chrome_repack_material_percent("repack_chrome_material_200_percent") {
757       percent = "200"
758     }
759   }
762 # GYP version: chrome/chrome_resources.gyp:chrome_strings
763 group("strings") {
764   deps = [
765     "//chrome/app:chromium_strings",
766     "//chrome/app:generated_resources",
767     "//chrome/app:google_chrome_strings",
768     "//chrome/app/resources:locale_settings",
769   ]
772 if (is_android) {
773   # GYP: //chrome/chrome.gyp:content_setting_java
774   java_cpp_enum("content_setting_javagen") {
775     sources = [
776       "../components/content_settings/core/common/content_settings.h",
777     ]
778     outputs = [
779       "org/chromium/chrome/browser/ContentSetting.java",
780     ]
781   }
783   # GYP: //chrome/chrome.gyp:content_settings_type_java
784   java_cpp_enum("content_settings_type_javagen") {
785     sources = [
786       "../components/content_settings/core/common/content_settings_types.h",
787     ]
788     outputs = [
789       "org/chromium/chrome/browser/ContentSettingsType.java",
790     ]
791   }
793   # GYP: //chrome/chrome.gyp:page_info_connection_type_java
794   java_cpp_enum("page_info_connection_type_javagen") {
795     sources = [
796       "browser/ui/android/website_settings_popup_android.h",
797     ]
798     outputs = [
799       "org/chromium/chrome/browser/PageInfoConnectionType.java",
800     ]
801   }
803   # GYP: //chrome/chrome_android.gypi:chrome_android_core
804   static_library("chrome_android_core") {
805     sources = [
806       "app/android/chrome_android_initializer.cc",
807       "app/android/chrome_android_initializer.h",
808       "app/android/chrome_jni_onload.cc",
809       "app/android/chrome_jni_onload.h",
810       "app/android/chrome_main_delegate_android.cc",
811       "app/android/chrome_main_delegate_android.h",
812       "app/chrome_main_delegate.cc",
813       "app/chrome_main_delegate.h",
814     ]
816     include_dirs = [ android_ndk_include_dir ]
818     libs = [
819       "android",
820       "jnigraphics",
821     ]
823     deps = [
824       "//chrome/browser",
825       "//chrome/browser/ui",
826       "//chrome/child",
827       "//chrome/plugin",
828       "//chrome/renderer",
829       "//chrome/utility",
830       "//components/enhanced_bookmarks",
831       "//content/public/app:both",
832     ]
833   }
836 if (is_linux) {
837   action("manpage") {
838     if (is_chrome_branded) {
839       name = "Google Chrome"
840       filename = "google-chrome"
841       confdir = "google-chrome"
842     } else {
843       name = "Chromium"
844       filename = "chromium-browser"
845       confdir = "chromium"
846     }
848     script = "//chrome/tools/build/linux/sed.py"
849     infile = "app/resources/manpage.1.in"
850     inputs = [
851       infile,
852     ]
854     outfile = "$root_out_dir/chrome.1"
855     outputs = [
856       outfile,
857     ]
859     args = [
860       rebase_path(infile, root_build_dir),
861       rebase_path(outfile, root_build_dir),
862       "-e s/@@NAME@@/$name/",
863       "-e s/@@FILENAME@@/$filename/",
864       "-e s/@@CONFDIR@@/$confdir/",
865     ]
866   }
868   action("linux_symbols") {
869     script = "//build/linux/dump_app_syms.py"
871     dump_syms_label = "//breakpad:dump_syms($host_toolchain)"
872     dump_syms_binary =
873         get_label_info(dump_syms_label, "root_out_dir") + "/" + "dump_syms"
875     chrome_binary = "$root_out_dir/chrome"
876     if (current_cpu == "x86") {
877       # Use "ia32" instead of "x86" for GYP compat.
878       symbol_file = "$root_out_dir/chrome.breakpad.ia32"
879     } else {
880       symbol_file = "$root_out_dir/chrome.breakpad.$current_cpu"
881     }
883     inputs = [
884       chrome_binary,
885       dump_syms_binary,
886     ]
887     outputs = [
888       symbol_file,
889     ]
891     args = [
892       "./" + rebase_path(dump_syms_binary, root_build_dir),
893       "0",  # TODO(GYP) This is linux_strip_binary if it is needed.
894       rebase_path(chrome_binary, root_build_dir),
895       rebase_path(symbol_file, root_build_dir),
896     ]
898     deps = [
899       ":chrome",
900       dump_syms_label,
901     ]
902   }