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',
14 '..', # Root of Chromium checkout
19 'target_name': 'cast_base',
20 'type': '<(component)',
22 '../base/base.gyp:base',
25 'base/metrics/cast_histograms.h',
26 'base/metrics/cast_metrics_helper.cc',
27 'base/metrics/cast_metrics_helper.h',
29 }, # end of target 'cast_base'
31 'target_name': 'cast_net',
32 'type': '<(component)',
34 'net/network_change_notifier_cast.cc',
35 'net/network_change_notifier_cast.h',
36 'net/network_change_notifier_factory_cast.cc',
37 'net/network_change_notifier_factory_cast.h',
41 'target_name': 'cast_shell_resources',
44 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
48 'action_name': 'cast_shell_resources',
50 'grit_grd_file': 'app/resources/shell_resources.grd',
51 'grit_resource_ids': 'app/resources/resource_ids',
53 'includes': [ '../build/grit_action.gypi' ],
56 'includes': [ '../build/grit_target.gypi' ],
59 'target_name': 'cast_shell_pak',
62 'cast_shell_resources',
63 '../content/app/resources/content_resources.gyp:content_resources',
64 '../content/app/strings/content_strings.gyp:content_strings',
65 '../net/net.gyp:net_resources',
66 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
67 '../ui/resources/ui_resources.gyp:ui_resources',
68 '../ui/strings/ui_strings.gyp:ui_strings',
72 'action_name': 'repack_cast_shell_pack',
75 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
76 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
77 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
78 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
79 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
80 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
81 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
82 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
83 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
84 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
86 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
88 'includes': [ '../build/repack_action.gypi' ],
92 # This target contains all content-embedder implementation that is
93 # non-platform-specific.
95 'target_name': 'cast_shell_common',
96 'type': '<(component)',
100 'cast_shell_resources',
101 'cast_version_header',
102 'chromecast_locales.gyp:chromecast_locales_pak',
103 'chromecast_locales.gyp:chromecast_settings',
104 'media/media.gyp:media_base',
105 '../base/base.gyp:base',
106 '../components/components.gyp:cdm_renderer',
107 '../components/components.gyp:component_metrics_proto',
108 '../components/components.gyp:crash_component',
109 '../components/components.gyp:metrics',
110 '../components/components.gyp:metrics_gpu',
111 '../components/components.gyp:metrics_net',
112 '../components/components.gyp:metrics_profiler',
113 '../content/content.gyp:content',
114 '../content/content.gyp:content_app_browser',
115 '../skia/skia.gyp:skia',
116 '../third_party/WebKit/public/blink.gyp:blink',
117 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
120 'app/cast_main_delegate.cc',
121 'app/cast_main_delegate.h',
122 'browser/cast_browser_context.cc',
123 'browser/cast_browser_context.h',
124 'browser/cast_browser_main_parts.cc',
125 'browser/cast_browser_main_parts.h',
126 'browser/cast_browser_process.cc',
127 'browser/cast_browser_process.h',
128 'browser/cast_content_browser_client.cc',
129 'browser/cast_content_browser_client.h',
130 'browser/cast_content_window.cc',
131 'browser/cast_content_window.h',
132 'browser/cast_download_manager_delegate.cc',
133 'browser/cast_download_manager_delegate.h',
134 'browser/cast_http_user_agent_settings.cc',
135 'browser/cast_http_user_agent_settings.h',
136 'browser/cast_network_delegate.cc',
137 'browser/cast_network_delegate.h',
138 'browser/devtools/cast_dev_tools_delegate.cc',
139 'browser/devtools/cast_dev_tools_delegate.h',
140 'browser/devtools/remote_debugging_server.cc',
141 'browser/devtools/remote_debugging_server.h',
142 'browser/geolocation/cast_access_token_store.cc',
143 'browser/geolocation/cast_access_token_store.h',
144 'browser/metrics/cast_metrics_prefs.cc',
145 'browser/metrics/cast_metrics_prefs.h',
146 'browser/metrics/cast_metrics_service_client.cc',
147 'browser/metrics/cast_metrics_service_client.h',
148 'browser/metrics/cast_stability_metrics_provider.cc',
149 'browser/metrics/cast_stability_metrics_provider.h',
150 'browser/metrics/platform_metrics_providers.h',
151 'browser/service/cast_service.cc',
152 'browser/service/cast_service.h',
153 'browser/url_request_context_factory.cc',
154 'browser/url_request_context_factory.h',
155 'common/cast_content_client.cc',
156 'common/cast_content_client.h',
157 'common/cast_paths.cc',
158 'common/cast_paths.h',
159 'common/cast_resource_delegate.cc',
160 'common/cast_resource_delegate.h',
161 'common/chromecast_config.cc',
162 'common/chromecast_config.h',
163 'common/chromecast_switches.cc',
164 'common/chromecast_switches.h',
165 'common/platform_client_auth.h',
166 'common/pref_names.cc',
167 'common/pref_names.h',
168 'renderer/cast_content_renderer_client.cc',
169 'renderer/cast_content_renderer_client.h',
170 'renderer/key_systems_cast.cc',
171 'renderer/key_systems_cast.h',
174 ['chromecast_branding=="Chrome"', {
176 '<(cast_internal_gyp):cast_shell_internal',
180 'browser/cast_network_delegate_simple.cc',
181 'browser/devtools/remote_debugging_server_simple.cc',
182 'browser/metrics/platform_metrics_providers_simple.cc',
183 'common/chromecast_config_simple.cc',
184 'common/platform_client_auth_simple.cc',
185 'renderer/key_systems_cast_simple.cc',
190 'browser/service/cast_service_android.cc',
191 'browser/service/cast_service_android.h',
195 'browser/service/cast_service_simple.cc',
196 'browser/service/cast_service_simple.h',
201 # ExternalMetrics not necessary on Android and (as of this writing) uses
202 # non-portable filesystem operations. Also webcrypto is not used on
206 'browser/metrics/external_metrics.cc',
207 'browser/metrics/external_metrics.h',
210 '../components/components.gyp:metrics_serialization',
216 'target_name': 'cast_version_header',
218 'direct_dependent_settings': {
220 '<(SHARED_INTERMEDIATE_DIR)',
225 'action_name': 'version_header',
226 'message': 'Generating version header file: <@(_outputs)',
229 'common/version.h.in',
232 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
236 '<(version_py_path)',
237 '-e', 'VERSION_FULL="<(version_full)"',
238 # Revision is taken from buildbot if available; otherwise, a dev string is used.
239 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
240 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
241 'common/version.h.in',
245 '../build/util/version.gypi',
251 'target_name': 'cast_metrics_test_support',
252 'type': '<(component)',
257 'base/metrics/cast_metrics_test_helper.cc',
258 'base/metrics/cast_metrics_test_helper.h',
260 }, # end of target 'cast_metrics_test_support'
262 'target_name': 'cast_tests',
265 'media/media.gyp:cast_media_unittests',
270 # Targets for Android receiver.
275 'target_name': 'libcast_shell_android',
276 'type': 'shared_library',
281 'cast_version_header',
282 '../base/base.gyp:base',
283 '../breakpad/breakpad.gyp:breakpad_client',
284 '../components/components.gyp:breakpad_host',
285 '../components/components.gyp:crash_component',
286 '../content/content.gyp:content_app_browser',
287 '../content/content.gyp:content',
288 '../skia/skia.gyp:skia',
289 '../ui/gfx/gfx.gyp:gfx',
290 '../ui/gl/gl.gyp:gl',
296 'android/cast_jni_registrar.cc',
297 'android/cast_jni_registrar.h',
298 'android/chromecast_config_android.cc',
299 'android/chromecast_config_android.h',
300 'android/platform_jni_loader.h',
301 'app/android/cast_jni_loader.cc',
302 'browser/android/cast_window_android.cc',
303 'browser/android/cast_window_android.h',
304 'browser/android/cast_window_manager.cc',
305 'browser/android/cast_window_manager.h',
306 'browser/android/external_video_surface_container_impl.cc',
307 'browser/android/external_video_surface_container_impl.h',
308 'crash/android/cast_crash_reporter_client_android.cc',
309 'crash/android/cast_crash_reporter_client_android.h',
310 'crash/android/crash_handler.cc',
311 'crash/android/crash_handler.h',
314 ['chromecast_branding=="Chrome"', {
316 '<(cast_internal_gyp):cast_shell_android_internal'
320 'android/chromecast_config_android_stub.cc',
321 'android/platform_jni_loader_stub.cc',
325 }, # end of target 'libcast_shell_android'
327 'target_name': 'cast_shell_java',
330 '<(android_support_v13_target)',
331 '../base/base.gyp:base_java',
332 '../content/content.gyp:content_java',
333 '../media/media.gyp:media_java',
334 '../net/net.gyp:net_java',
335 '../ui/android/ui_android.gyp:ui_java',
338 'has_java_resources': 1,
339 'java_in_dir': 'browser/android/apk',
340 'resource_dir': 'browser/android/apk/res',
341 'R_package': 'org.chromium.chromecast.shell',
343 'includes': ['../build/java.gypi'],
344 }, # end of target 'cast_shell_java'
346 'target_name': 'cast_shell_apk',
350 'libcast_shell_android',
353 'apk_name': 'CastShell',
354 'manifest_package_name': 'org.chromium.chromecast.shell',
355 # Note(gunsch): there are no Java files in the android/ directory.
356 # Unfortunately, the java_apk.gypi target rigidly insists on having
357 # a java_in_dir directory, but complains about duplicate classes
358 # from the common cast_shell_java target (shared with internal APK)
359 # if the actual Java path is used.
360 # This will hopefully be removable after the great GN migration.
361 'java_in_dir': 'android',
362 'android_manifest_path': 'browser/android/apk/AndroidManifest.xml',
363 'package_name': 'org.chromium.chromecast.shell',
364 'native_lib_target': 'libcast_shell_android',
365 'asset_location': '<(PRODUCT_DIR)/assets',
366 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
368 'includes': [ '../build/java_apk.gypi' ],
371 'target_name': 'cast_jni_headers',
374 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
375 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
376 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
377 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
379 'direct_dependent_settings': {
381 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
385 'jni_gen_package': 'chromecast',
387 'includes': [ '../build/jni_generator.gypi' ],
390 }, { # OS != "android"
393 'target_name': 'cast_crash_client',
394 'type': '<(component)',
396 '../breakpad/breakpad.gyp:breakpad_client',
397 '../components/components.gyp:crash_component',
400 'crash/cast_crash_reporter_client.cc',
401 'crash/cast_crash_reporter_client.h',
404 ['chromecast_branding=="Chrome"', {
406 '<(cast_internal_gyp):crash_internal',
410 'crash/cast_crash_reporter_client_simple.cc',
414 }, # end of target 'cast_crash_client'
415 # This target contains all of the primary code of |cast_shell|, except
416 # for |main|. This allows end-to-end tests using |cast_shell|.
417 # This also includes all targets that cannot be built on Android.
419 'target_name': 'cast_shell_core',
420 'type': '<(component)',
425 'media/media.gyp:cast_media',
426 '../ui/aura/aura.gyp:aura_test_support',
429 ['chromecast_branding=="Chrome"', {
431 '<(cast_internal_gyp):cast_gfx_internal',
435 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
441 'target_name': 'cast_shell',
442 'type': 'executable',
451 'target_name': 'cast_shell_browser_test',
452 'type': '<(gtest_target_type)',
454 'cast_shell_test_support',
455 '../testing/gtest.gyp:gtest',
458 'HAS_OUT_OF_PROC_TEST_RUNNER',
461 'browser/test/chromecast_shell_browser_test.cc',
465 'target_name': 'cast_shell_test_support',
466 'type': '<(component)',
468 'HAS_OUT_OF_PROC_TEST_RUNNER',
472 '../content/content_shell_and_tests.gyp:content_browser_test_support',
473 '../testing/gtest.gyp:gtest',
476 'browser/test/chromecast_browser_test.cc',
477 'browser/test/chromecast_browser_test.h',
478 'browser/test/chromecast_browser_test_runner.cc',
483 ], # end of conditions