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:metrics',
109 '../components/components.gyp:metrics_gpu',
110 '../components/components.gyp:metrics_net',
111 '../components/components.gyp:metrics_profiler',
112 '../content/content.gyp:content',
113 '../content/content.gyp:content_app_browser',
114 '../skia/skia.gyp:skia',
115 '../third_party/WebKit/public/blink.gyp:blink',
116 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
119 'app/cast_main_delegate.cc',
120 'app/cast_main_delegate.h',
121 'browser/cast_browser_context.cc',
122 'browser/cast_browser_context.h',
123 'browser/cast_browser_main_parts.cc',
124 'browser/cast_browser_main_parts.h',
125 'browser/cast_browser_process.cc',
126 'browser/cast_browser_process.h',
127 'browser/cast_content_browser_client.cc',
128 'browser/cast_content_browser_client.h',
129 'browser/cast_content_window.cc',
130 'browser/cast_content_window.h',
131 'browser/cast_download_manager_delegate.cc',
132 'browser/cast_download_manager_delegate.h',
133 'browser/cast_http_user_agent_settings.cc',
134 'browser/cast_http_user_agent_settings.h',
135 'browser/cast_network_delegate.cc',
136 'browser/cast_network_delegate.h',
137 'browser/devtools/cast_dev_tools_delegate.cc',
138 'browser/devtools/cast_dev_tools_delegate.h',
139 'browser/devtools/remote_debugging_server.cc',
140 'browser/devtools/remote_debugging_server.h',
141 'browser/geolocation/cast_access_token_store.cc',
142 'browser/geolocation/cast_access_token_store.h',
143 'browser/metrics/cast_metrics_prefs.cc',
144 'browser/metrics/cast_metrics_prefs.h',
145 'browser/metrics/cast_metrics_service_client.cc',
146 'browser/metrics/cast_metrics_service_client.h',
147 'browser/metrics/cast_stability_metrics_provider.cc',
148 'browser/metrics/cast_stability_metrics_provider.h',
149 'browser/metrics/platform_metrics_providers.h',
150 'browser/service/cast_service.cc',
151 'browser/service/cast_service.h',
152 'browser/url_request_context_factory.cc',
153 'browser/url_request_context_factory.h',
154 'browser/webui/webui_cast.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 'browser/webui/webui_cast_simple.cc',
184 'common/chromecast_config_simple.cc',
185 'common/platform_client_auth_simple.cc',
186 'renderer/key_systems_cast_simple.cc',
191 'browser/service/cast_service_android.cc',
192 'browser/service/cast_service_android.h',
196 'browser/service/cast_service_simple.cc',
197 'browser/service/cast_service_simple.h',
202 # ExternalMetrics not necessary on Android and (as of this writing) uses
203 # non-portable filesystem operations. Also webcrypto is not used on
207 'browser/metrics/external_metrics.cc',
208 'browser/metrics/external_metrics.h',
211 '../components/components.gyp:metrics_serialization',
217 'target_name': 'cast_shell_unittests',
218 'type': '<(gtest_target_type)',
221 '../base/base.gyp:base_prefs_test_support',
222 '../base/base.gyp:run_all_unittests',
223 '../base/base.gyp:test_support_base',
224 '../components/components.gyp:component_metrics_proto',
225 '../testing/gtest.gyp:gtest',
228 'browser/metrics/cast_metrics_service_client_unittest.cc',
231 ['use_allocator!="none"', {
233 '../base/allocator/allocator.gyp:allocator',
237 }, # end of target 'cast_metrics_unittests'
239 'target_name': 'cast_version_header',
241 'direct_dependent_settings': {
243 '<(SHARED_INTERMEDIATE_DIR)',
248 'action_name': 'version_header',
249 'message': 'Generating version header file: <@(_outputs)',
252 'common/version.h.in',
255 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
259 '<(version_py_path)',
260 '-e', 'VERSION_FULL="<(version_full)"',
261 # Revision is taken from buildbot if available; otherwise, a dev string is used.
262 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
263 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
264 'common/version.h.in',
268 '../build/util/version.gypi',
274 'target_name': 'cast_metrics_test_support',
275 'type': '<(component)',
280 'base/metrics/cast_metrics_test_helper.cc',
281 'base/metrics/cast_metrics_test_helper.h',
283 }, # end of target 'cast_metrics_test_support'
285 'target_name': 'cast_tests',
288 'media/media.gyp:cast_media_unittests',
293 # Targets for Android receiver.
298 'target_name': 'libcast_shell_android',
299 'type': 'shared_library',
304 'cast_version_header',
305 '../base/base.gyp:base',
306 '../breakpad/breakpad.gyp:breakpad_client',
307 '../components/components.gyp:breakpad_host',
308 '../components/components.gyp:crash_component',
309 '../content/content.gyp:content_app_browser',
310 '../content/content.gyp:content',
311 '../skia/skia.gyp:skia',
312 '../ui/gfx/gfx.gyp:gfx',
313 '../ui/gl/gl.gyp:gl',
319 'android/cast_jni_registrar.cc',
320 'android/cast_jni_registrar.h',
321 'android/chromecast_config_android.cc',
322 'android/chromecast_config_android.h',
323 'android/platform_jni_loader.h',
324 'app/android/cast_jni_loader.cc',
325 'browser/android/cast_window_android.cc',
326 'browser/android/cast_window_android.h',
327 'browser/android/cast_window_manager.cc',
328 'browser/android/cast_window_manager.h',
329 'browser/android/external_video_surface_container_impl.cc',
330 'browser/android/external_video_surface_container_impl.h',
331 'crash/android/cast_crash_reporter_client_android.cc',
332 'crash/android/cast_crash_reporter_client_android.h',
333 'crash/android/crash_handler.cc',
334 'crash/android/crash_handler.h',
337 ['chromecast_branding=="Chrome"', {
339 '<(cast_internal_gyp):cast_shell_android_internal'
343 'android/chromecast_config_android_stub.cc',
344 'android/platform_jni_loader_stub.cc',
348 }, # end of target 'libcast_shell_android'
350 'target_name': 'cast_shell_java',
353 '<(android_support_v13_target)',
354 '../base/base.gyp:base_java',
355 '../content/content.gyp:content_java',
356 '../media/media.gyp:media_java',
357 '../net/net.gyp:net_java',
358 '../ui/android/ui_android.gyp:ui_java',
361 'has_java_resources': 1,
362 'java_in_dir': 'browser/android/apk',
363 'resource_dir': 'browser/android/apk/res',
364 'R_package': 'org.chromium.chromecast.shell',
366 'includes': ['../build/java.gypi'],
367 }, # end of target 'cast_shell_java'
369 'target_name': 'cast_shell_apk',
373 'libcast_shell_android',
376 'apk_name': 'CastShell',
377 'manifest_package_name': 'org.chromium.chromecast.shell',
378 # Note(gunsch): there are no Java files in the android/ directory.
379 # Unfortunately, the java_apk.gypi target rigidly insists on having
380 # a java_in_dir directory, but complains about duplicate classes
381 # from the common cast_shell_java target (shared with internal APK)
382 # if the actual Java path is used.
383 # This will hopefully be removable after the great GN migration.
384 'java_in_dir': 'android',
385 'android_manifest_path': 'browser/android/apk/AndroidManifest.xml',
386 'package_name': 'org.chromium.chromecast.shell',
387 'native_lib_target': 'libcast_shell_android',
388 'asset_location': '<(PRODUCT_DIR)/assets',
389 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
391 'includes': [ '../build/java_apk.gypi' ],
394 'target_name': 'cast_jni_headers',
397 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
398 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
399 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
400 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
402 'direct_dependent_settings': {
404 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
408 'jni_gen_package': 'chromecast',
410 'includes': [ '../build/jni_generator.gypi' ],
413 }, { # OS != "android"
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)',
424 'media/media.gyp:cast_media',
425 '../ui/aura/aura.gyp:aura_test_support',
428 ['chromecast_branding=="Chrome"', {
430 '<(cast_internal_gyp):cast_gfx_internal',
434 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
440 'target_name': 'cast_shell',
441 'type': 'executable',
450 'target_name': 'cast_shell_browser_test',
451 'type': '<(gtest_target_type)',
453 'cast_shell_test_support',
454 '../testing/gtest.gyp:gtest',
457 'HAS_OUT_OF_PROC_TEST_RUNNER',
460 'browser/test/chromecast_shell_browser_test.cc',
464 'target_name': 'cast_shell_test_support',
465 'type': '<(component)',
467 'HAS_OUT_OF_PROC_TEST_RUNNER',
471 '../content/content_shell_and_tests.gyp:content_browser_test_support',
472 '../testing/gtest.gyp:gtest',
475 'browser/test/chromecast_browser_test.cc',
476 'browser/test/chromecast_browser_test.h',
477 'browser/test/chromecast_browser_test_runner.cc',
482 ], # end of conditions