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',
9 'cast_build_release': 'internal/build/cast_build_release',
11 'chromecast_branding%': 'Chromium',
12 'disable_display%': 0,
13 'use_chromecast_webui%': 0,
16 'chromecast_tests.gypi',
20 '..', # Root of Chromium checkout
23 ['disable_display==1', {
24 'defines': ['DISABLE_DISPLAY'],
29 # TODO(gunsch): Remove this fake target once it's either added or no
30 # longer referenced from internal code.
31 {'target_name': 'cast_media_audio', 'type': 'none'},
34 'target_name': 'cast_base',
35 'type': '<(component)',
37 '../base/base.gyp:base',
40 'base/metrics/cast_histograms.h',
41 'base/metrics/cast_metrics_helper.cc',
42 'base/metrics/cast_metrics_helper.h',
43 'base/metrics/grouped_histogram.cc',
44 'base/metrics/grouped_histogram.h'
46 }, # end of target 'cast_base'
48 'target_name': 'cast_crash_client',
49 'type': '<(component)',
51 '../breakpad/breakpad.gyp:breakpad_client',
52 '../components/components.gyp:crash_component',
55 'crash/cast_crash_keys.cc',
56 'crash/cast_crash_keys.h',
57 'crash/cast_crash_reporter_client.cc',
58 'crash/cast_crash_reporter_client.h',
61 ['chromecast_branding=="Chrome"', {
63 '<(cast_internal_gyp):crash_internal',
67 'crash/cast_crash_reporter_client_simple.cc',
71 }, # end of target 'cast_crash_client'
73 'target_name': 'cast_net',
74 'type': '<(component)',
76 'net/connectivity_checker.cc',
77 'net/connectivity_checker.h',
78 'net/net_switches.cc',
80 'net/network_change_notifier_cast.cc',
81 'net/network_change_notifier_cast.h',
82 'net/network_change_notifier_factory_cast.cc',
83 'net/network_change_notifier_factory_cast.h',
87 'target_name': 'cast_shell_resources',
90 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
94 'action_name': 'cast_shell_resources',
96 'grit_grd_file': 'app/resources/shell_resources.grd',
97 'grit_resource_ids': 'app/resources/resource_ids',
99 'includes': [ '../build/grit_action.gypi' ],
102 'includes': [ '../build/grit_target.gypi' ],
105 'target_name': 'cast_shell_pak',
108 'cast_shell_resources',
109 '../content/app/resources/content_resources.gyp:content_resources',
110 '../content/app/strings/content_strings.gyp:content_strings',
111 '../net/net.gyp:net_resources',
112 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
113 '../ui/resources/ui_resources.gyp:ui_resources',
114 '../ui/strings/ui_strings.gyp:ui_strings',
118 'action_name': 'repack_cast_shell_pak',
121 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
122 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
123 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
124 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
125 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
126 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
127 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
128 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
129 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
130 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
133 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
135 '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
136 '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
140 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
142 'includes': [ '../build/repack_action.gypi' ],
146 ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
148 'internal/chromecast_resources.gyp:chromecast_app_resources',
149 'internal/chromecast_resources.gyp:chromecast_webui_resources',
153 }, # end of target 'cast_shell_pak'
154 # This target contains all content-embedder implementation that is
155 # non-platform-specific.
157 'target_name': 'cast_shell_common',
158 'type': '<(component)',
164 'cast_shell_resources',
165 'cast_version_header',
166 'chromecast_locales.gyp:chromecast_locales_pak',
167 'chromecast_locales.gyp:chromecast_settings',
168 'media/media.gyp:media_base',
169 '../base/base.gyp:base',
170 '../components/components.gyp:breakpad_host',
171 '../components/components.gyp:cdm_renderer',
172 '../components/components.gyp:component_metrics_proto',
173 '../components/components.gyp:crash_component',
174 '../components/components.gyp:network_hints_browser',
175 '../components/components.gyp:network_hints_renderer',
176 '../components/components.gyp:metrics',
177 '../components/components.gyp:metrics_gpu',
178 '../components/components.gyp:metrics_net',
179 '../components/components.gyp:metrics_profiler',
180 '../content/content.gyp:content',
181 '../content/content.gyp:content_app_browser',
182 '../skia/skia.gyp:skia',
183 '../third_party/WebKit/public/blink.gyp:blink',
184 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
187 'app/cast_main_delegate.cc',
188 'app/cast_main_delegate.h',
189 'browser/cast_browser_context.cc',
190 'browser/cast_browser_context.h',
191 'browser/cast_browser_main_parts.cc',
192 'browser/cast_browser_main_parts.h',
193 'browser/cast_browser_process.cc',
194 'browser/cast_browser_process.h',
195 'browser/cast_content_browser_client.cc',
196 'browser/cast_content_browser_client.h',
197 'browser/cast_content_window.cc',
198 'browser/cast_content_window.h',
199 'browser/cast_download_manager_delegate.cc',
200 'browser/cast_download_manager_delegate.h',
201 'browser/cast_http_user_agent_settings.cc',
202 'browser/cast_http_user_agent_settings.h',
203 'browser/cast_network_delegate.cc',
204 'browser/cast_network_delegate.h',
205 'browser/cast_resource_dispatcher_host_delegate.cc',
206 'browser/cast_resource_dispatcher_host_delegate.h',
207 'browser/devtools/cast_dev_tools_delegate.cc',
208 'browser/devtools/cast_dev_tools_delegate.h',
209 'browser/devtools/remote_debugging_server.cc',
210 'browser/devtools/remote_debugging_server.h',
211 'browser/geolocation/cast_access_token_store.cc',
212 'browser/geolocation/cast_access_token_store.h',
213 'browser/metrics/cast_metrics_prefs.cc',
214 'browser/metrics/cast_metrics_prefs.h',
215 'browser/metrics/cast_metrics_service_client.cc',
216 'browser/metrics/cast_metrics_service_client.h',
217 'browser/metrics/cast_stability_metrics_provider.cc',
218 'browser/metrics/cast_stability_metrics_provider.h',
219 'browser/metrics/platform_metrics_providers.h',
220 'browser/pref_service_helper.cc',
221 'browser/pref_service_helper.h',
222 'browser/service/cast_service.cc',
223 'browser/service/cast_service.h',
224 'browser/url_request_context_factory.cc',
225 'browser/url_request_context_factory.h',
226 'common/cast_content_client.cc',
227 'common/cast_content_client.h',
228 'common/cast_paths.cc',
229 'common/cast_paths.h',
230 'common/cast_resource_delegate.cc',
231 'common/cast_resource_delegate.h',
232 'common/chromecast_switches.cc',
233 'common/chromecast_switches.h',
234 'common/platform_client_auth.h',
235 'common/pref_names.cc',
236 'common/pref_names.h',
237 'renderer/cast_content_renderer_client.cc',
238 'renderer/cast_content_renderer_client.h',
239 'renderer/cast_media_load_deferrer.cc',
240 'renderer/cast_media_load_deferrer.h',
241 'renderer/cast_render_process_observer.cc',
242 'renderer/cast_render_process_observer.h',
243 'renderer/key_systems_cast.cc',
244 'renderer/key_systems_cast.h',
247 ['chromecast_branding=="Chrome"', {
249 '<(cast_internal_gyp):cast_shell_internal',
253 'browser/cast_content_browser_client_simple.cc',
254 'browser/cast_network_delegate_simple.cc',
255 'browser/devtools/remote_debugging_server_simple.cc',
256 'browser/media/cast_browser_cdm_factory_simple.cc',
257 'browser/metrics/platform_metrics_providers_simple.cc',
258 'browser/pref_service_helper_simple.cc',
259 'common/platform_client_auth_simple.cc',
260 'renderer/cast_content_renderer_client_simple.cc',
261 'renderer/key_systems_cast_simple.cc',
266 'browser/service/cast_service_android.cc',
267 'browser/service/cast_service_android.h',
271 'browser/service/cast_service_simple.cc',
272 'browser/service/cast_service_simple.h',
277 # ExternalMetrics not necessary on Android and (as of this writing) uses
278 # non-portable filesystem operations. Also webcrypto is not used on
282 'browser/metrics/external_metrics.cc',
283 'browser/metrics/external_metrics.h',
286 '../components/components.gyp:metrics_serialization',
292 'target_name': 'cast_version_header',
294 'direct_dependent_settings': {
296 '<(SHARED_INTERMEDIATE_DIR)',
301 'action_name': 'version_header',
302 'message': 'Generating version header file: <@(_outputs)',
305 'common/version.h.in',
308 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
312 '<(version_py_path)',
313 '-e', 'VERSION_FULL="<(version_full)"',
314 # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
315 # otherwise, a dev string is used.
316 '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
317 # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
318 # otherwise, a dev string is used.
319 '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
320 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
321 'common/version.h.in',
325 '../build/util/version.gypi',
332 # Targets for Android receiver.
337 'target_name': 'cast_shell_icudata',
340 '../third_party/icu/icu.gyp:icudata',
343 'destination': '<(PRODUCT_DIR)/assets',
344 'files': ['<(PRODUCT_DIR)/icudtl.dat'],
348 'target_name': 'libcast_shell_android',
349 'type': 'shared_library',
353 'cast_shell_icudata',
355 'cast_version_header',
356 '../base/base.gyp:base',
357 '../breakpad/breakpad.gyp:breakpad_client',
358 '../components/components.gyp:breakpad_host',
359 '../components/components.gyp:crash_component',
360 '../content/content.gyp:content_app_browser',
361 '../content/content.gyp:content',
362 '../skia/skia.gyp:skia',
363 '../ui/gfx/gfx.gyp:gfx',
364 '../ui/gl/gl.gyp:gl',
370 'android/cast_jni_registrar.cc',
371 'android/cast_jni_registrar.h',
372 'android/chromecast_config_android.cc',
373 'android/chromecast_config_android.h',
374 'android/platform_jni_loader.h',
375 'app/android/cast_jni_loader.cc',
376 'browser/android/cast_window_android.cc',
377 'browser/android/cast_window_android.h',
378 'browser/android/cast_window_manager.cc',
379 'browser/android/cast_window_manager.h',
380 'browser/android/external_video_surface_container_impl.cc',
381 'browser/android/external_video_surface_container_impl.h',
382 'crash/android/cast_crash_reporter_client_android.cc',
383 'crash/android/cast_crash_reporter_client_android.h',
384 'crash/android/crash_handler.cc',
385 'crash/android/crash_handler.h',
388 ['chromecast_branding=="Chrome"', {
390 '<(cast_internal_gyp):cast_shell_android_internal'
394 'android/chromecast_config_android_stub.cc',
395 'android/platform_jni_loader_stub.cc',
399 }, # end of target 'libcast_shell_android'
401 'target_name': 'cast_shell_java',
404 '<(android_support_v13_target)',
405 '../base/base.gyp:base_java',
406 '../content/content.gyp:content_java',
407 '../media/media.gyp:media_java',
408 '../net/net.gyp:net_java',
409 '../ui/android/ui_android.gyp:ui_java',
412 'has_java_resources': 1,
413 'java_in_dir': 'browser/android/apk',
414 'resource_dir': 'browser/android/apk/res',
415 'R_package': 'org.chromium.chromecast.shell',
417 'includes': ['../build/java.gypi'],
418 }, # end of target 'cast_shell_java'
420 'target_name': 'cast_shell_manifest',
423 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
424 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
426 'includes': [ '../build/android/jinja_template.gypi' ],
429 'target_name': 'cast_shell_apk',
433 'libcast_shell_android',
436 'apk_name': 'CastShell',
437 'manifest_package_name': 'org.chromium.chromecast.shell',
438 # Note(gunsch): there are no Java files in the android/ directory.
439 # Unfortunately, the java_apk.gypi target rigidly insists on having
440 # a java_in_dir directory, but complains about duplicate classes
441 # from the common cast_shell_java target (shared with internal APK)
442 # if the actual Java path is used.
443 # This will hopefully be removable after the great GN migration.
444 'java_in_dir': 'android',
445 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
446 'package_name': 'org.chromium.chromecast.shell',
447 'native_lib_target': 'libcast_shell_android',
448 'asset_location': '<(PRODUCT_DIR)/assets',
449 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
451 'includes': [ '../build/java_apk.gypi' ],
454 'target_name': 'cast_jni_headers',
457 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
458 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
459 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
460 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
462 'direct_dependent_settings': {
464 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
468 'jni_gen_package': 'chromecast',
470 'includes': [ '../build/jni_generator.gypi' ],
473 }, { # OS != "android"
476 'target_name': 'cast_shell_media',
477 'type': '<(component)',
479 'media/media.gyp:cast_media',
480 '../content/content.gyp:content',
481 '../ipc/ipc.gyp:ipc',
482 '../media/media.gyp:media',
485 'browser/media/cast_browser_cdm_factory.cc',
486 'browser/media/cast_browser_cdm_factory.h',
487 'browser/media/cma_message_filter_host.cc',
488 'browser/media/cma_message_filter_host.h',
489 'browser/media/cma_message_loop.cc',
490 'browser/media/cma_message_loop.h',
491 'browser/media/media_pipeline_host.cc',
492 'browser/media/media_pipeline_host.h',
493 'common/media/cma_ipc_common.h',
494 'common/media/cma_messages.h',
495 'common/media/cma_message_generator.cc',
496 'common/media/cma_message_generator.h',
497 'common/media/cma_param_traits.cc',
498 'common/media/cma_param_traits.h',
499 'common/media/shared_memory_chunk.cc',
500 'common/media/shared_memory_chunk.h',
501 'renderer/media/audio_pipeline_proxy.cc',
502 'renderer/media/audio_pipeline_proxy.h',
503 'renderer/media/cma_media_renderer_factory.cc',
504 'renderer/media/cma_media_renderer_factory.h',
505 'renderer/media/cma_message_filter_proxy.cc',
506 'renderer/media/cma_message_filter_proxy.h',
507 'renderer/media/media_channel_proxy.cc',
508 'renderer/media/media_channel_proxy.h',
509 'renderer/media/media_pipeline_proxy.cc',
510 'renderer/media/media_pipeline_proxy.h',
511 'renderer/media/video_pipeline_proxy.cc',
512 'renderer/media/video_pipeline_proxy.h',
514 }, # end of target 'cast_shell_media'
515 # This target contains all of the primary code of |cast_shell|, except
516 # for |main|. This allows end-to-end tests using |cast_shell|.
517 # This also includes all targets that cannot be built on Android.
519 'target_name': 'cast_shell_core',
520 'type': '<(component)',
524 'media/media.gyp:cast_media',
525 '../ui/aura/aura.gyp:aura_test_support',
528 ['chromecast_branding=="Chrome"', {
530 '<(cast_internal_gyp):cast_gfx_internal',
534 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
540 'target_name': 'cast_shell',
541 'type': 'executable',
548 # TODO(dougsteed): remove when Chromecast moves to boringssl.
549 # Allow the cast shell to find the NSS module in the same directory.
551 '-Wl,-rpath=\$$ORIGIN'
556 ], # end of conditions