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',
11 'disable_display%': 0,
14 'chromecast_tests.gypi',
18 '..', # Root of Chromium checkout
21 ['disable_display==1', {
22 'defines': ['DISABLE_DISPLAY'],
27 # TODO(gunsch): Remove these fake targets once they're either added or no
28 # longer referenced from internal code.
29 {'target_name': 'cast_media_audio', 'type': 'none'},
30 {'target_name': 'cast_port_impl', 'type': 'none'},
33 'target_name': 'cast_base',
34 'type': '<(component)',
36 '../base/base.gyp:base',
39 'base/metrics/cast_histograms.h',
40 'base/metrics/cast_metrics_helper.cc',
41 'base/metrics/cast_metrics_helper.h',
42 'base/metrics/grouped_histogram.cc',
43 'base/metrics/grouped_histogram.h'
45 }, # end of target 'cast_base'
47 'target_name': 'cast_net',
48 'type': '<(component)',
50 'net/network_change_notifier_cast.cc',
51 'net/network_change_notifier_cast.h',
52 'net/network_change_notifier_factory_cast.cc',
53 'net/network_change_notifier_factory_cast.h',
57 'target_name': 'cast_shell_resources',
60 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
64 'action_name': 'cast_shell_resources',
66 'grit_grd_file': 'app/resources/shell_resources.grd',
67 'grit_resource_ids': 'app/resources/resource_ids',
69 'includes': [ '../build/grit_action.gypi' ],
72 'includes': [ '../build/grit_target.gypi' ],
75 'target_name': 'cast_shell_pak',
78 'cast_shell_resources',
79 '../content/app/resources/content_resources.gyp:content_resources',
80 '../content/app/strings/content_strings.gyp:content_strings',
81 '../net/net.gyp:net_resources',
82 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
83 '../ui/resources/ui_resources.gyp:ui_resources',
84 '../ui/strings/ui_strings.gyp:ui_strings',
88 'action_name': 'repack_cast_shell_pack',
91 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
92 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
93 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
94 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
95 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
96 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
97 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
98 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
99 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
100 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
102 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
104 'includes': [ '../build/repack_action.gypi' ],
108 # This target contains all content-embedder implementation that is
109 # non-platform-specific.
111 'target_name': 'cast_shell_common',
112 'type': '<(component)',
116 'cast_shell_resources',
117 'cast_version_header',
118 'chromecast_locales.gyp:chromecast_locales_pak',
119 'chromecast_locales.gyp:chromecast_settings',
120 'media/media.gyp:media_base',
121 '../base/base.gyp:base',
122 '../components/components.gyp:breakpad_host',
123 '../components/components.gyp:cdm_renderer',
124 '../components/components.gyp:component_metrics_proto',
125 '../components/components.gyp:crash_component',
126 '../components/components.gyp:dns_prefetch_browser',
127 '../components/components.gyp:dns_prefetch_renderer',
128 '../components/components.gyp:metrics',
129 '../components/components.gyp:metrics_gpu',
130 '../components/components.gyp:metrics_net',
131 '../components/components.gyp:metrics_profiler',
132 '../content/content.gyp:content',
133 '../content/content.gyp:content_app_browser',
134 '../skia/skia.gyp:skia',
135 '../third_party/WebKit/public/blink.gyp:blink',
136 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
139 'app/cast_main_delegate.cc',
140 'app/cast_main_delegate.h',
141 'browser/cast_browser_context.cc',
142 'browser/cast_browser_context.h',
143 'browser/cast_browser_main_parts.cc',
144 'browser/cast_browser_main_parts.h',
145 'browser/cast_browser_process.cc',
146 'browser/cast_browser_process.h',
147 'browser/cast_content_browser_client.cc',
148 'browser/cast_content_browser_client.h',
149 'browser/cast_content_window.cc',
150 'browser/cast_content_window.h',
151 'browser/cast_download_manager_delegate.cc',
152 'browser/cast_download_manager_delegate.h',
153 'browser/cast_http_user_agent_settings.cc',
154 'browser/cast_http_user_agent_settings.h',
155 'browser/cast_network_delegate.cc',
156 'browser/cast_network_delegate.h',
157 'browser/devtools/cast_dev_tools_delegate.cc',
158 'browser/devtools/cast_dev_tools_delegate.h',
159 'browser/devtools/remote_debugging_server.cc',
160 'browser/devtools/remote_debugging_server.h',
161 'browser/geolocation/cast_access_token_store.cc',
162 'browser/geolocation/cast_access_token_store.h',
163 'browser/metrics/cast_metrics_prefs.cc',
164 'browser/metrics/cast_metrics_prefs.h',
165 'browser/metrics/cast_metrics_service_client.cc',
166 'browser/metrics/cast_metrics_service_client.h',
167 'browser/metrics/cast_stability_metrics_provider.cc',
168 'browser/metrics/cast_stability_metrics_provider.h',
169 'browser/metrics/platform_metrics_providers.h',
170 'browser/pref_service_helper.cc',
171 'browser/pref_service_helper.h',
172 'browser/service/cast_service.cc',
173 'browser/service/cast_service.h',
174 'browser/url_request_context_factory.cc',
175 'browser/url_request_context_factory.h',
176 'common/cast_content_client.cc',
177 'common/cast_content_client.h',
178 'common/cast_paths.cc',
179 'common/cast_paths.h',
180 'common/cast_resource_delegate.cc',
181 'common/cast_resource_delegate.h',
182 'common/chromecast_switches.cc',
183 'common/chromecast_switches.h',
184 'common/platform_client_auth.h',
185 'common/pref_names.cc',
186 'common/pref_names.h',
187 'renderer/cast_content_renderer_client.cc',
188 'renderer/cast_content_renderer_client.h',
189 'renderer/cast_media_load_deferrer.cc',
190 'renderer/cast_media_load_deferrer.h',
191 'renderer/cast_render_process_observer.cc',
192 'renderer/cast_render_process_observer.h',
193 'renderer/key_systems_cast.cc',
194 'renderer/key_systems_cast.h',
197 ['chromecast_branding=="Chrome"', {
199 '<(cast_internal_gyp):cast_shell_internal',
203 'browser/cast_network_delegate_simple.cc',
204 'browser/devtools/remote_debugging_server_simple.cc',
205 'browser/media/cast_browser_cdm_factory_simple.cc',
206 'browser/metrics/platform_metrics_providers_simple.cc',
207 'browser/pref_service_helper_simple.cc',
208 'common/platform_client_auth_simple.cc',
209 'renderer/key_systems_cast_simple.cc',
214 'browser/service/cast_service_android.cc',
215 'browser/service/cast_service_android.h',
219 'browser/service/cast_service_simple.cc',
220 'browser/service/cast_service_simple.h',
225 # ExternalMetrics not necessary on Android and (as of this writing) uses
226 # non-portable filesystem operations. Also webcrypto is not used on
230 'browser/metrics/external_metrics.cc',
231 'browser/metrics/external_metrics.h',
234 '../components/components.gyp:metrics_serialization',
240 'target_name': 'cast_version_header',
242 'direct_dependent_settings': {
244 '<(SHARED_INTERMEDIATE_DIR)',
249 'action_name': 'version_header',
250 'message': 'Generating version header file: <@(_outputs)',
253 'common/version.h.in',
256 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
260 '<(version_py_path)',
261 '-e', 'VERSION_FULL="<(version_full)"',
262 # Revision is taken from buildbot if available; otherwise, a dev string is used.
263 '-e', 'CAST_BUILD_REVISION="<!(echo ${CAST_BUILD_REVISION:="eng.${USER}.<!(date +%Y%m%d.%H%M%S)"})"',
264 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
265 'common/version.h.in',
269 '../build/util/version.gypi',
276 # Targets for Android receiver.
281 'target_name': 'cast_shell_icudata',
284 '../third_party/icu/icu.gyp:icudata',
287 'destination': '<(PRODUCT_DIR)/assets',
288 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
292 'target_name': 'libcast_shell_android',
293 'type': 'shared_library',
297 'cast_shell_icudata',
299 'cast_version_header',
300 '../base/base.gyp:base',
301 '../breakpad/breakpad.gyp:breakpad_client',
302 '../components/components.gyp:breakpad_host',
303 '../components/components.gyp:crash_component',
304 '../content/content.gyp:content_app_browser',
305 '../content/content.gyp:content',
306 '../skia/skia.gyp:skia',
307 '../ui/gfx/gfx.gyp:gfx',
308 '../ui/gl/gl.gyp:gl',
314 'android/cast_jni_registrar.cc',
315 'android/cast_jni_registrar.h',
316 'android/chromecast_config_android.cc',
317 'android/chromecast_config_android.h',
318 'android/platform_jni_loader.h',
319 'app/android/cast_jni_loader.cc',
320 'browser/android/cast_window_android.cc',
321 'browser/android/cast_window_android.h',
322 'browser/android/cast_window_manager.cc',
323 'browser/android/cast_window_manager.h',
324 'browser/android/external_video_surface_container_impl.cc',
325 'browser/android/external_video_surface_container_impl.h',
326 'crash/android/cast_crash_reporter_client_android.cc',
327 'crash/android/cast_crash_reporter_client_android.h',
328 'crash/android/crash_handler.cc',
329 'crash/android/crash_handler.h',
332 ['chromecast_branding=="Chrome"', {
334 '<(cast_internal_gyp):cast_shell_android_internal'
338 'android/chromecast_config_android_stub.cc',
339 'android/platform_jni_loader_stub.cc',
343 }, # end of target 'libcast_shell_android'
345 'target_name': 'cast_shell_java',
348 '<(android_support_v13_target)',
349 '../base/base.gyp:base_java',
350 '../content/content.gyp:content_java',
351 '../media/media.gyp:media_java',
352 '../net/net.gyp:net_java',
353 '../ui/android/ui_android.gyp:ui_java',
356 'has_java_resources': 1,
357 'java_in_dir': 'browser/android/apk',
358 'resource_dir': 'browser/android/apk/res',
359 'R_package': 'org.chromium.chromecast.shell',
361 'includes': ['../build/java.gypi'],
362 }, # end of target 'cast_shell_java'
364 'target_name': 'cast_shell_manifest',
367 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
368 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
370 'includes': [ '../build/android/jinja_template.gypi' ],
373 'target_name': 'cast_shell_apk',
377 'libcast_shell_android',
380 'apk_name': 'CastShell',
381 'manifest_package_name': 'org.chromium.chromecast.shell',
382 # Note(gunsch): there are no Java files in the android/ directory.
383 # Unfortunately, the java_apk.gypi target rigidly insists on having
384 # a java_in_dir directory, but complains about duplicate classes
385 # from the common cast_shell_java target (shared with internal APK)
386 # if the actual Java path is used.
387 # This will hopefully be removable after the great GN migration.
388 'java_in_dir': 'android',
389 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
390 'package_name': 'org.chromium.chromecast.shell',
391 'native_lib_target': 'libcast_shell_android',
392 'asset_location': '<(PRODUCT_DIR)/assets',
393 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
395 'includes': [ '../build/java_apk.gypi' ],
398 'target_name': 'cast_jni_headers',
401 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
402 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
403 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
404 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
406 'direct_dependent_settings': {
408 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
412 'jni_gen_package': 'chromecast',
414 'includes': [ '../build/jni_generator.gypi' ],
417 }, { # OS != "android"
420 'target_name': 'cast_crash_client',
421 'type': '<(component)',
423 '../breakpad/breakpad.gyp:breakpad_client',
424 '../components/components.gyp:crash_component',
427 'crash/cast_crash_reporter_client.cc',
428 'crash/cast_crash_reporter_client.h',
431 ['chromecast_branding=="Chrome"', {
433 '<(cast_internal_gyp):crash_internal',
437 'crash/cast_crash_reporter_client_simple.cc',
441 }, # end of target 'cast_crash_client'
443 'target_name': 'cast_shell_media',
444 'type': '<(component)',
446 'media/media.gyp:cast_media',
447 '../content/content.gyp:content',
448 '../ipc/ipc.gyp:ipc',
449 '../media/media.gyp:media',
452 'browser/media/cast_browser_cdm_factory.cc',
453 'browser/media/cast_browser_cdm_factory.h',
454 'browser/media/cma_message_filter_host.cc',
455 'browser/media/cma_message_filter_host.h',
456 'browser/media/cma_message_loop.cc',
457 'browser/media/cma_message_loop.h',
458 'browser/media/media_pipeline_host.cc',
459 'browser/media/media_pipeline_host.h',
460 'common/media/cma_ipc_common.h',
461 'common/media/cma_messages.h',
462 'common/media/cma_message_generator.cc',
463 'common/media/cma_message_generator.h',
464 'common/media/cma_param_traits.cc',
465 'common/media/cma_param_traits.h',
466 'common/media/shared_memory_chunk.cc',
467 'common/media/shared_memory_chunk.h',
468 'renderer/media/audio_pipeline_proxy.cc',
469 'renderer/media/audio_pipeline_proxy.h',
470 'renderer/media/cma_media_renderer_factory.cc',
471 'renderer/media/cma_media_renderer_factory.h',
472 'renderer/media/cma_message_filter_proxy.cc',
473 'renderer/media/cma_message_filter_proxy.h',
474 'renderer/media/media_channel_proxy.cc',
475 'renderer/media/media_channel_proxy.h',
476 'renderer/media/media_pipeline_proxy.cc',
477 'renderer/media/media_pipeline_proxy.h',
478 'renderer/media/video_pipeline_proxy.cc',
479 'renderer/media/video_pipeline_proxy.h',
481 }, # end of target 'cast_shell_media'
482 # This target contains all of the primary code of |cast_shell|, except
483 # for |main|. This allows end-to-end tests using |cast_shell|.
484 # This also includes all targets that cannot be built on Android.
486 'target_name': 'cast_shell_core',
487 'type': '<(component)',
493 'media/media.gyp:cast_media',
494 '../ui/aura/aura.gyp:aura_test_support',
497 ['chromecast_branding=="Chrome"', {
499 '<(cast_internal_gyp):cast_gfx_internal',
503 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
509 'target_name': 'cast_shell',
510 'type': 'executable',
520 ], # end of conditions