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.
7 'android_support_v13_target%':
8 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
10 'chromecast_branding%': 'Chromium',
13 'chromecast_tests.gypi',
17 '..', # Root of Chromium checkout
22 'target_name': 'cast_base',
23 'type': '<(component)',
25 '../base/base.gyp:base',
28 'base/metrics/cast_histograms.h',
29 'base/metrics/cast_metrics_helper.cc',
30 'base/metrics/cast_metrics_helper.h',
31 'base/metrics/grouped_histogram.cc',
32 'base/metrics/grouped_histogram.h'
34 }, # end of target 'cast_base'
36 'target_name': 'cast_net',
37 'type': '<(component)',
39 'net/network_change_notifier_cast.cc',
40 'net/network_change_notifier_cast.h',
41 'net/network_change_notifier_factory_cast.cc',
42 'net/network_change_notifier_factory_cast.h',
46 'target_name': 'cast_shell_resources',
49 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
53 'action_name': 'cast_shell_resources',
55 'grit_grd_file': 'app/resources/shell_resources.grd',
56 'grit_resource_ids': 'app/resources/resource_ids',
58 'includes': [ '../build/grit_action.gypi' ],
61 'includes': [ '../build/grit_target.gypi' ],
64 'target_name': 'cast_shell_pak',
67 'cast_shell_resources',
68 '../content/app/resources/content_resources.gyp:content_resources',
69 '../content/app/strings/content_strings.gyp:content_strings',
70 '../net/net.gyp:net_resources',
71 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
72 '../ui/resources/ui_resources.gyp:ui_resources',
73 '../ui/strings/ui_strings.gyp:ui_strings',
77 'action_name': 'repack_cast_shell_pack',
80 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
81 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
82 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
83 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
84 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
85 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
86 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
87 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
88 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
89 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
91 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
93 'includes': [ '../build/repack_action.gypi' ],
97 # This target contains all content-embedder implementation that is
98 # non-platform-specific.
100 'target_name': 'cast_shell_common',
101 'type': '<(component)',
105 'cast_shell_resources',
106 'cast_version_header',
107 'chromecast_locales.gyp:chromecast_locales_pak',
108 'chromecast_locales.gyp:chromecast_settings',
109 'media/media.gyp:media_base',
110 '../base/base.gyp:base',
111 '../components/components.gyp:cdm_renderer',
112 '../components/components.gyp:component_metrics_proto',
113 '../components/components.gyp:crash_component',
114 '../components/components.gyp:dns_prefetch_browser',
115 '../components/components.gyp:dns_prefetch_renderer',
116 '../components/components.gyp:metrics',
117 '../components/components.gyp:metrics_gpu',
118 '../components/components.gyp:metrics_net',
119 '../components/components.gyp:metrics_profiler',
120 '../content/content.gyp:content',
121 '../content/content.gyp:content_app_browser',
122 '../skia/skia.gyp:skia',
123 '../third_party/WebKit/public/blink.gyp:blink',
124 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
127 'app/cast_main_delegate.cc',
128 'app/cast_main_delegate.h',
129 'browser/cast_browser_context.cc',
130 'browser/cast_browser_context.h',
131 'browser/cast_browser_main_parts.cc',
132 'browser/cast_browser_main_parts.h',
133 'browser/cast_browser_process.cc',
134 'browser/cast_browser_process.h',
135 'browser/cast_content_browser_client.cc',
136 'browser/cast_content_browser_client.h',
137 'browser/cast_content_window.cc',
138 'browser/cast_content_window.h',
139 'browser/cast_download_manager_delegate.cc',
140 'browser/cast_download_manager_delegate.h',
141 'browser/cast_http_user_agent_settings.cc',
142 'browser/cast_http_user_agent_settings.h',
143 'browser/cast_network_delegate.cc',
144 'browser/cast_network_delegate.h',
145 'browser/devtools/cast_dev_tools_delegate.cc',
146 'browser/devtools/cast_dev_tools_delegate.h',
147 'browser/devtools/remote_debugging_server.cc',
148 'browser/devtools/remote_debugging_server.h',
149 'browser/geolocation/cast_access_token_store.cc',
150 'browser/geolocation/cast_access_token_store.h',
151 'browser/metrics/cast_metrics_prefs.cc',
152 'browser/metrics/cast_metrics_prefs.h',
153 'browser/metrics/cast_metrics_service_client.cc',
154 'browser/metrics/cast_metrics_service_client.h',
155 'browser/metrics/cast_stability_metrics_provider.cc',
156 'browser/metrics/cast_stability_metrics_provider.h',
157 'browser/metrics/platform_metrics_providers.h',
158 'browser/pref_service_helper.cc',
159 'browser/pref_service_helper.h',
160 'browser/service/cast_service.cc',
161 'browser/service/cast_service.h',
162 'browser/url_request_context_factory.cc',
163 'browser/url_request_context_factory.h',
164 'common/cast_content_client.cc',
165 'common/cast_content_client.h',
166 'common/cast_paths.cc',
167 'common/cast_paths.h',
168 'common/cast_resource_delegate.cc',
169 'common/cast_resource_delegate.h',
170 'common/chromecast_switches.cc',
171 'common/chromecast_switches.h',
172 'common/platform_client_auth.h',
173 'common/pref_names.cc',
174 'common/pref_names.h',
175 'renderer/cast_content_renderer_client.cc',
176 'renderer/cast_content_renderer_client.h',
177 'renderer/key_systems_cast.cc',
178 'renderer/key_systems_cast.h',
181 ['chromecast_branding=="Chrome"', {
183 '<(cast_internal_gyp):cast_shell_internal',
187 'browser/cast_network_delegate_simple.cc',
188 'browser/devtools/remote_debugging_server_simple.cc',
189 'browser/metrics/platform_metrics_providers_simple.cc',
190 'browser/pref_service_helper_simple.cc',
191 'common/platform_client_auth_simple.cc',
192 'renderer/key_systems_cast_simple.cc',
197 'browser/service/cast_service_android.cc',
198 'browser/service/cast_service_android.h',
202 'browser/service/cast_service_simple.cc',
203 'browser/service/cast_service_simple.h',
208 # ExternalMetrics not necessary on Android and (as of this writing) uses
209 # non-portable filesystem operations. Also webcrypto is not used on
213 'browser/metrics/external_metrics.cc',
214 'browser/metrics/external_metrics.h',
217 '../components/components.gyp:metrics_serialization',
223 'target_name': 'cast_version_header',
225 'direct_dependent_settings': {
227 '<(SHARED_INTERMEDIATE_DIR)',
232 'action_name': 'version_header',
233 'message': 'Generating version header file: <@(_outputs)',
236 'common/version.h.in',
239 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
243 '<(version_py_path)',
244 '-e', 'VERSION_FULL="<(version_full)"',
245 # Revision is taken from buildbot if available; otherwise, a dev string is used.
246 '-e', 'CAST_BUILD_REVISION="<!(echo ${CAST_BUILD_REVISION:="eng.${USER}.<!(date +%Y%m%d.%H%M%S)"})"',
247 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
248 'common/version.h.in',
252 '../build/util/version.gypi',
259 # Targets for Android receiver.
264 'target_name': 'libcast_shell_android',
265 'type': 'shared_library',
270 'cast_version_header',
271 '../base/base.gyp:base',
272 '../breakpad/breakpad.gyp:breakpad_client',
273 '../components/components.gyp:breakpad_host',
274 '../components/components.gyp:crash_component',
275 '../content/content.gyp:content_app_browser',
276 '../content/content.gyp:content',
277 '../skia/skia.gyp:skia',
278 '../ui/gfx/gfx.gyp:gfx',
279 '../ui/gl/gl.gyp:gl',
285 'android/cast_jni_registrar.cc',
286 'android/cast_jni_registrar.h',
287 'android/chromecast_config_android.cc',
288 'android/chromecast_config_android.h',
289 'android/platform_jni_loader.h',
290 'app/android/cast_jni_loader.cc',
291 'browser/android/cast_window_android.cc',
292 'browser/android/cast_window_android.h',
293 'browser/android/cast_window_manager.cc',
294 'browser/android/cast_window_manager.h',
295 'browser/android/external_video_surface_container_impl.cc',
296 'browser/android/external_video_surface_container_impl.h',
297 'crash/android/cast_crash_reporter_client_android.cc',
298 'crash/android/cast_crash_reporter_client_android.h',
299 'crash/android/crash_handler.cc',
300 'crash/android/crash_handler.h',
303 ['chromecast_branding=="Chrome"', {
305 '<(cast_internal_gyp):cast_shell_android_internal'
309 'android/chromecast_config_android_stub.cc',
310 'android/platform_jni_loader_stub.cc',
314 }, # end of target 'libcast_shell_android'
316 'target_name': 'cast_shell_java',
319 '<(android_support_v13_target)',
320 '../base/base.gyp:base_java',
321 '../content/content.gyp:content_java',
322 '../media/media.gyp:media_java',
323 '../net/net.gyp:net_java',
324 '../ui/android/ui_android.gyp:ui_java',
327 'has_java_resources': 1,
328 'java_in_dir': 'browser/android/apk',
329 'resource_dir': 'browser/android/apk/res',
330 'R_package': 'org.chromium.chromecast.shell',
332 'includes': ['../build/java.gypi'],
333 }, # end of target 'cast_shell_java'
335 'target_name': 'cast_shell_manifest',
338 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
339 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
341 'includes': [ '../build/android/jinja_template.gypi' ],
344 'target_name': 'cast_shell_apk',
348 'libcast_shell_android',
351 'apk_name': 'CastShell',
352 'manifest_package_name': 'org.chromium.chromecast.shell',
353 # Note(gunsch): there are no Java files in the android/ directory.
354 # Unfortunately, the java_apk.gypi target rigidly insists on having
355 # a java_in_dir directory, but complains about duplicate classes
356 # from the common cast_shell_java target (shared with internal APK)
357 # if the actual Java path is used.
358 # This will hopefully be removable after the great GN migration.
359 'java_in_dir': 'android',
360 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
361 'package_name': 'org.chromium.chromecast.shell',
362 'native_lib_target': 'libcast_shell_android',
363 'asset_location': '<(PRODUCT_DIR)/assets',
364 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
366 'includes': [ '../build/java_apk.gypi' ],
369 'target_name': 'cast_jni_headers',
372 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
373 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
374 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
375 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
377 'direct_dependent_settings': {
379 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
383 'jni_gen_package': 'chromecast',
385 'includes': [ '../build/jni_generator.gypi' ],
388 }, { # OS != "android"
391 'target_name': 'cast_crash_client',
392 'type': '<(component)',
394 '../breakpad/breakpad.gyp:breakpad_client',
395 '../components/components.gyp:crash_component',
398 'crash/cast_crash_reporter_client.cc',
399 'crash/cast_crash_reporter_client.h',
402 ['chromecast_branding=="Chrome"', {
404 '<(cast_internal_gyp):crash_internal',
408 'crash/cast_crash_reporter_client_simple.cc',
412 }, # end of target 'cast_crash_client'
413 # This target contains all of the primary code of |cast_shell|, except
414 # for |main|. This allows end-to-end tests using |cast_shell|.
415 # This also includes all targets that cannot be built on Android.
417 'target_name': 'cast_shell_core',
418 'type': '<(component)',
423 'media/media.gyp:cast_media',
424 '../ui/aura/aura.gyp:aura_test_support',
427 ['chromecast_branding=="Chrome"', {
429 '<(cast_internal_gyp):cast_gfx_internal',
433 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
439 'target_name': 'cast_shell',
440 'type': 'executable',
450 ], # end of conditions