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/cast_media_load_deferrer.cc',
178 'renderer/cast_media_load_deferrer.h',
179 'renderer/cast_render_process_observer.cc',
180 'renderer/cast_render_process_observer.h',
181 'renderer/key_systems_cast.cc',
182 'renderer/key_systems_cast.h',
185 ['chromecast_branding=="Chrome"', {
187 '<(cast_internal_gyp):cast_shell_internal',
191 'browser/cast_network_delegate_simple.cc',
192 'browser/devtools/remote_debugging_server_simple.cc',
193 'browser/metrics/platform_metrics_providers_simple.cc',
194 'browser/pref_service_helper_simple.cc',
195 'common/platform_client_auth_simple.cc',
196 'renderer/key_systems_cast_simple.cc',
201 'browser/service/cast_service_android.cc',
202 'browser/service/cast_service_android.h',
206 'browser/service/cast_service_simple.cc',
207 'browser/service/cast_service_simple.h',
212 # ExternalMetrics not necessary on Android and (as of this writing) uses
213 # non-portable filesystem operations. Also webcrypto is not used on
217 'browser/metrics/external_metrics.cc',
218 'browser/metrics/external_metrics.h',
221 '../components/components.gyp:metrics_serialization',
227 'target_name': 'cast_version_header',
229 'direct_dependent_settings': {
231 '<(SHARED_INTERMEDIATE_DIR)',
236 'action_name': 'version_header',
237 'message': 'Generating version header file: <@(_outputs)',
240 'common/version.h.in',
243 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
247 '<(version_py_path)',
248 '-e', 'VERSION_FULL="<(version_full)"',
249 # Revision is taken from buildbot if available; otherwise, a dev string is used.
250 '-e', 'CAST_BUILD_REVISION="<!(echo ${CAST_BUILD_REVISION:="eng.${USER}.<!(date +%Y%m%d.%H%M%S)"})"',
251 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
252 'common/version.h.in',
256 '../build/util/version.gypi',
263 # Targets for Android receiver.
268 'target_name': 'libcast_shell_android',
269 'type': 'shared_library',
274 'cast_version_header',
275 '../base/base.gyp:base',
276 '../breakpad/breakpad.gyp:breakpad_client',
277 '../components/components.gyp:breakpad_host',
278 '../components/components.gyp:crash_component',
279 '../content/content.gyp:content_app_browser',
280 '../content/content.gyp:content',
281 '../skia/skia.gyp:skia',
282 '../ui/gfx/gfx.gyp:gfx',
283 '../ui/gl/gl.gyp:gl',
289 'android/cast_jni_registrar.cc',
290 'android/cast_jni_registrar.h',
291 'android/chromecast_config_android.cc',
292 'android/chromecast_config_android.h',
293 'android/platform_jni_loader.h',
294 'app/android/cast_jni_loader.cc',
295 'browser/android/cast_window_android.cc',
296 'browser/android/cast_window_android.h',
297 'browser/android/cast_window_manager.cc',
298 'browser/android/cast_window_manager.h',
299 'browser/android/external_video_surface_container_impl.cc',
300 'browser/android/external_video_surface_container_impl.h',
301 'crash/android/cast_crash_reporter_client_android.cc',
302 'crash/android/cast_crash_reporter_client_android.h',
303 'crash/android/crash_handler.cc',
304 'crash/android/crash_handler.h',
307 ['chromecast_branding=="Chrome"', {
309 '<(cast_internal_gyp):cast_shell_android_internal'
313 'android/chromecast_config_android_stub.cc',
314 'android/platform_jni_loader_stub.cc',
318 }, # end of target 'libcast_shell_android'
320 'target_name': 'cast_shell_java',
323 '<(android_support_v13_target)',
324 '../base/base.gyp:base_java',
325 '../content/content.gyp:content_java',
326 '../media/media.gyp:media_java',
327 '../net/net.gyp:net_java',
328 '../ui/android/ui_android.gyp:ui_java',
331 'has_java_resources': 1,
332 'java_in_dir': 'browser/android/apk',
333 'resource_dir': 'browser/android/apk/res',
334 'R_package': 'org.chromium.chromecast.shell',
336 'includes': ['../build/java.gypi'],
337 }, # end of target 'cast_shell_java'
339 'target_name': 'cast_shell_manifest',
342 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
343 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
345 'includes': [ '../build/android/jinja_template.gypi' ],
348 'target_name': 'cast_shell_apk',
352 'libcast_shell_android',
355 'apk_name': 'CastShell',
356 'manifest_package_name': 'org.chromium.chromecast.shell',
357 # Note(gunsch): there are no Java files in the android/ directory.
358 # Unfortunately, the java_apk.gypi target rigidly insists on having
359 # a java_in_dir directory, but complains about duplicate classes
360 # from the common cast_shell_java target (shared with internal APK)
361 # if the actual Java path is used.
362 # This will hopefully be removable after the great GN migration.
363 'java_in_dir': 'android',
364 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
365 'package_name': 'org.chromium.chromecast.shell',
366 'native_lib_target': 'libcast_shell_android',
367 'asset_location': '<(PRODUCT_DIR)/assets',
368 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
370 'includes': [ '../build/java_apk.gypi' ],
373 'target_name': 'cast_jni_headers',
376 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
377 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
378 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
379 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
381 'direct_dependent_settings': {
383 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
387 'jni_gen_package': 'chromecast',
389 'includes': [ '../build/jni_generator.gypi' ],
392 }, { # OS != "android"
395 'target_name': 'cast_crash_client',
396 'type': '<(component)',
398 '../breakpad/breakpad.gyp:breakpad_client',
399 '../components/components.gyp:crash_component',
402 'crash/cast_crash_reporter_client.cc',
403 'crash/cast_crash_reporter_client.h',
406 ['chromecast_branding=="Chrome"', {
408 '<(cast_internal_gyp):crash_internal',
412 'crash/cast_crash_reporter_client_simple.cc',
416 }, # end of target 'cast_crash_client'
418 'target_name': 'cast_shell_media',
419 'type': '<(component)',
421 'media/media.gyp:cast_media',
422 '../content/content.gyp:content',
423 '../ipc/ipc.gyp:ipc',
426 'common/media/cma_ipc_common.h',
427 'common/media/cma_messages.h',
428 'common/media/cma_message_generator.cc',
429 'common/media/cma_message_generator.h',
430 'common/media/cma_param_traits.cc',
431 'common/media/cma_param_traits.h',
432 'common/media/shared_memory_chunk.cc',
433 'common/media/shared_memory_chunk.h',
434 'renderer/media/audio_pipeline_proxy.cc',
435 'renderer/media/audio_pipeline_proxy.h',
436 'renderer/media/cma_media_renderer_factory.cc',
437 'renderer/media/cma_media_renderer_factory.h',
438 'renderer/media/cma_message_filter_proxy.cc',
439 'renderer/media/cma_message_filter_proxy.h',
440 'renderer/media/media_channel_proxy.cc',
441 'renderer/media/media_channel_proxy.h',
442 'renderer/media/media_pipeline_proxy.cc',
443 'renderer/media/media_pipeline_proxy.h',
444 'renderer/media/video_pipeline_proxy.cc',
445 'renderer/media/video_pipeline_proxy.h',
447 }, # end of target 'cast_shell_media'
448 # This target contains all of the primary code of |cast_shell|, except
449 # for |main|. This allows end-to-end tests using |cast_shell|.
450 # This also includes all targets that cannot be built on Android.
452 'target_name': 'cast_shell_core',
453 'type': '<(component)',
459 'media/media.gyp:cast_media',
460 '../ui/aura/aura.gyp:aura_test_support',
463 ['chromecast_branding=="Chrome"', {
465 '<(cast_internal_gyp):cast_gfx_internal',
469 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
475 'target_name': 'cast_shell',
476 'type': 'executable',
486 ], # end of conditions