Revert of Added temporarily CHECKs to OmniboxNavigationObserver. (patchset #2 id...
[chromium-blink-merge.git] / chrome / chrome_shell.gypi
blobdd7c11027d93cf96bc18dd4692ada1c47ca9ad07
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 # This GYPI allows independent customization of the chrome shell in a manner
6 # similar to content shell (in content_shell.gypi). Notably, this file does
7 # NOT contain chrome_android_core, which is independent of the chrome shell
8 # and should be separately customized.
10   'variables': {
11     'package_name': 'chrome_shell_apk',
12   },
13   'targets': [
14     {
15       # GN: //chrome/android:chrome_shell_base
16       'target_name': 'libchromeshell_base',
17       'type': 'static_library',
18       'dependencies': [
19         '../base/base.gyp:base',
20         'chrome_android_core',
21         'chrome.gyp:browser_ui',
22         '../content/content.gyp:content_app_browser',
23       ],
24       'sources': [
25         'android/shell/chrome_shell_google_location_settings_helper.cc',
26         'android/shell/chrome_shell_google_location_settings_helper.h',
27       ],
28       'include_dirs': [
29         '../skia/config',
30       ],
31       'direct_dependent_settings': {
32         'ldflags': [
33           # Some android targets still depend on --gc-sections to link.
34           # TODO: remove --gc-sections for Debug builds (crbug.com/159847).
35           '-Wl,--gc-sections',
36         ],
37       },
38       'conditions': [
39         [ 'order_profiling!=0', {
40           'dependencies': [ '../tools/cygprofile/cygprofile.gyp:cygprofile', ],
41         }],
42         [ 'use_allocator!="none"', {
43           'dependencies': [
44             '../base/allocator/allocator.gyp:allocator', ],
45         }],
46         [ 'cld_version==0 or cld_version==2', {
47           'dependencies': [
48             # Chrome shell should always use the statically-linked CLD data.
49             '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_static', ],
50         }],
51       ],
52     },
53     {
54       # GN: //chrome/android:chrome_shell
55       'target_name': 'libchromeshell',
56       'type': 'shared_library',
57       'sources': [
58         # This file must always be included in the shared_library step to ensure
59         # JNI_OnLoad is exported.
60         'app/android/chrome_jni_onload.cc',
61         'android/shell/chrome_main_delegate_chrome_shell_android.cc',
62         'android/shell/chrome_main_delegate_chrome_shell_android.h',
63       ],
64       'dependencies': [
65         'libchromeshell_base',
66       ],
67       'includes': [
68         # File 'protection' is based on non-trivial linker magic. TODO(pasko):
69         # remove it when crbug.com/424562 is fixed.
70         '../base/files/protect_file_posix.gypi',
71       ],
72     },
73     {
74       # GN: //chrome/android:chrome_sync_shell
75       'target_name': 'libchromesyncshell',
76       'type': 'shared_library',
77       'sources': [
78         # This file must always be included in the shared_library step to ensure
79         # JNI_OnLoad is exported.
80         'app/android/chrome_jni_onload.cc',
81         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.cc',
82         'android/sync_shell/chrome_main_delegate_chrome_sync_shell_android.h',
83       ],
84       'dependencies': [
85         'libchromeshell_base',
86         '../sync/sync.gyp:test_support_sync_fake_server_android',
87       ],
88     },
89     {
90       # GN: //chrome/android:chrome_shell_manifest
91       'target_name': 'chrome_shell_manifest',
92       'type': 'none',
93       'variables': {
94         'jinja_inputs': ['android/shell/java/AndroidManifest.xml.jinja2'],
95         'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
96       },
97       'includes': [ '../build/android/jinja_template.gypi' ],
98     },
99     {
100       # GN: //chrome/android:chrome_shell_apk
101       'target_name': 'chrome_shell_apk',
102       'type': 'none',
103       'dependencies': [
104         'chrome_java',
105         'chrome_shell_paks',
106         'libchromeshell',
107         '../media/media.gyp:media_java',
108       ],
109       'variables': {
110         'apk_name': 'ChromeShell',
111         'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/chrome_shell_manifest/AndroidManifest.xml',
112         'native_lib_version_name': '<(version_full)',
113         'java_in_dir': 'android/shell/java',
114         'resource_dir': 'android/shell/res',
115         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
116         'native_lib_target': 'libchromeshell',
117         'additional_input_paths': [
118           '<@(chrome_android_pak_output_resources)',
119         ],
120       },
121       'includes': [ '../build/java_apk.gypi', ],
122     },
123     {
124       # GN: N/A
125       # chrome_shell_apk creates a .jar as a side effect. Any java targets
126       # that need that .jar in their classpath should depend on this target,
127       # chrome_shell_apk_java. Dependents of chrome_shell_apk receive its
128       # jar path in the variable 'apk_output_jar_path'.
129       # This target should only be used by targets which instrument
130       # chrome_shell_apk.
131       'target_name': 'chrome_shell_apk_java',
132       'type': 'none',
133       'dependencies': [
134         'chrome_shell_apk',
135       ],
136       'includes': [ '../build/apk_fake_jar.gypi' ],
137     },
138     {
139       'target_name': 'chrome_shell_paks',
140       'type': 'none',
141       'dependencies': [
142         '<(DEPTH)/chrome/chrome_resources.gyp:packed_resources',
143         '<(DEPTH)/chrome/chrome_resources.gyp:packed_extra_resources',
144       ],
145       'copies': [
146         {
147           'destination': '<(chrome_android_pak_output_folder)',
148           'files': [
149             '<@(chrome_android_pak_input_resources)',
150           ],
151         }
152       ],
153     },
154     {
155       # GN: //chrome/android:chrome_sync_shell_manifest
156       'target_name': 'chrome_sync_shell_manifest',
157       'type': 'none',
158       'variables': {
159         'jinja_inputs': ['android/sync_shell/java/AndroidManifest.xml.jinja2'],
160         'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/chrome_sync_shell_manifest/AndroidManifest.xml',
161       },
162       'includes': [ '../build/android/jinja_template.gypi' ],
163     },
164     {
165       # GN: //chrome/android:chrome_sync_shell_apk
166       'target_name': 'chrome_sync_shell_apk',
167       'type': 'none',
168       'dependencies': [
169         'chrome_java',
170         'chrome_shell_paks',
171         'libchromesyncshell',
172         '../media/media.gyp:media_java',
173         '../sync/sync.gyp:sync_java_test_support',
174       ],
175       'variables': {
176         'apk_name': 'ChromeSyncShell',
177         'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/chrome_sync_shell_manifest/AndroidManifest.xml',
178         'R_package': 'org.chromium.chrome.shell',
179         'native_lib_version_name': '<(version_full)',
180         'java_in_dir': 'android/shell/java',
181         'resource_dir': 'android/shell/res',
182         'asset_location': '<(PRODUCT_DIR)/../assets/<(package_name)',
183         'native_lib_target': 'libchromesyncshell',
184         'additional_input_paths': [
185           '<@(chrome_android_pak_output_resources)',
186         ],
187       },
188       'includes': [ '../build/java_apk.gypi', ],
189     },
190     {
191       # GN: N/A
192       # chrome_sync_shell_apk creates a .jar as a side effect. Any java
193       # targets that need that .jar in their classpath should depend on this
194       # target. Dependents of chrome_sync_shell_apk receive its jar path in the
195       # variable 'apk_output_jar_path'. This target should only be used by
196       # targets which instrument chrome_sync_shell_apk.
197       'target_name': 'chrome_sync_shell_apk_java',
198       'type': 'none',
199       'dependencies': [
200         'chrome_sync_shell_apk',
201       ],
202       'includes': [ '../build/apk_fake_jar.gypi' ],
203     },
204   ],