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.
8 'chromecast_branding%': 'Chromium',
12 '..', # Root of Chromium checkout
17 'target_name': 'cast_base',
18 'type': '<(component)',
20 '../base/base.gyp:base',
23 'base/metrics/cast_histograms.h',
24 'base/metrics/cast_metrics_helper.cc',
25 'base/metrics/cast_metrics_helper.h',
27 }, # end of target 'cast_base'
29 'target_name': 'cast_net',
30 'type': '<(component)',
32 'net/network_change_notifier_cast.cc',
33 'net/network_change_notifier_cast.h',
34 'net/network_change_notifier_factory_cast.cc',
35 'net/network_change_notifier_factory_cast.h',
39 'target_name': 'cast_shell_resources',
42 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
46 'action_name': 'cast_shell_resources',
48 'grit_grd_file': 'app/resources/shell_resources.grd',
49 'grit_resource_ids': 'app/resources/resource_ids',
51 'includes': [ '../build/grit_action.gypi' ],
54 'includes': [ '../build/grit_target.gypi' ],
57 'target_name': 'cast_shell_pak',
60 'cast_shell_resources',
61 '../content/app/resources/content_resources.gyp:content_resources',
62 '../content/app/strings/content_strings.gyp:content_strings',
63 '../net/net.gyp:net_resources',
64 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
65 '../ui/resources/ui_resources.gyp:ui_resources',
66 '../ui/strings/ui_strings.gyp:ui_strings',
70 'action_name': 'repack_cast_shell_pack',
73 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
74 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
75 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
76 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
77 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
78 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
79 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
80 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
81 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
82 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
84 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
86 'includes': [ '../build/repack_action.gypi' ],
90 # This target contains all content-embedder implementation that is
91 # non-platform-specific.
93 'target_name': 'cast_shell_common',
94 'type': '<(component)',
98 'cast_shell_resources',
99 'cast_version_header',
100 'chromecast_locales.gyp:chromecast_locales_pak',
101 'chromecast_locales.gyp:chromecast_settings',
102 'media/media.gyp:media_base',
103 '../base/base.gyp:base',
104 '../components/components.gyp:cdm_renderer',
105 '../components/components.gyp:component_metrics_proto',
106 '../components/components.gyp:metrics',
107 '../components/components.gyp:metrics_gpu',
108 '../components/components.gyp:metrics_net',
109 '../components/components.gyp:metrics_profiler',
110 '../content/content.gyp:content',
111 '../content/content.gyp:content_app_browser',
112 '../skia/skia.gyp:skia',
113 '../third_party/WebKit/public/blink.gyp:blink',
114 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
117 'app/cast_main_delegate.cc',
118 'app/cast_main_delegate.h',
119 'browser/cast_browser_context.cc',
120 'browser/cast_browser_context.h',
121 'browser/cast_browser_main_parts.cc',
122 'browser/cast_browser_main_parts.h',
123 'browser/cast_browser_process.cc',
124 'browser/cast_browser_process.h',
125 'browser/cast_content_browser_client.cc',
126 'browser/cast_content_browser_client.h',
127 'browser/cast_content_window.cc',
128 'browser/cast_content_window.h',
129 'browser/cast_download_manager_delegate.cc',
130 'browser/cast_download_manager_delegate.h',
131 'browser/cast_http_user_agent_settings.cc',
132 'browser/cast_http_user_agent_settings.h',
133 'browser/cast_network_delegate.cc',
134 'browser/cast_network_delegate.h',
135 'browser/devtools/cast_dev_tools_delegate.cc',
136 'browser/devtools/cast_dev_tools_delegate.h',
137 'browser/devtools/remote_debugging_server.cc',
138 'browser/devtools/remote_debugging_server.h',
139 'browser/geolocation/cast_access_token_store.cc',
140 'browser/geolocation/cast_access_token_store.h',
141 'browser/metrics/cast_metrics_prefs.cc',
142 'browser/metrics/cast_metrics_prefs.h',
143 'browser/metrics/cast_metrics_service_client.cc',
144 'browser/metrics/cast_metrics_service_client.h',
145 'browser/metrics/cast_stability_metrics_provider.cc',
146 'browser/metrics/cast_stability_metrics_provider.h',
147 'browser/metrics/platform_metrics_providers.h',
148 'browser/service/cast_service.cc',
149 'browser/service/cast_service.h',
150 'browser/url_request_context_factory.cc',
151 'browser/url_request_context_factory.h',
152 'browser/webui/webui_cast.h',
153 'common/cast_content_client.cc',
154 'common/cast_content_client.h',
155 'common/cast_paths.cc',
156 'common/cast_paths.h',
157 'common/cast_resource_delegate.cc',
158 'common/cast_resource_delegate.h',
159 'common/chromecast_config.cc',
160 'common/chromecast_config.h',
161 'common/chromecast_switches.cc',
162 'common/chromecast_switches.h',
163 'common/platform_client_auth.h',
164 'common/pref_names.cc',
165 'common/pref_names.h',
166 'renderer/cast_content_renderer_client.cc',
167 'renderer/cast_content_renderer_client.h',
168 'renderer/key_systems_cast.cc',
169 'renderer/key_systems_cast.h',
172 ['chromecast_branding=="Chrome"', {
174 '<(cast_internal_gyp):cast_shell_internal',
178 'browser/cast_network_delegate_simple.cc',
179 'browser/devtools/remote_debugging_server_simple.cc',
180 'browser/metrics/platform_metrics_providers_simple.cc',
181 'browser/webui/webui_cast_simple.cc',
182 'common/chromecast_config_simple.cc',
183 'common/platform_client_auth_simple.cc',
184 'renderer/key_systems_cast_simple.cc',
189 'browser/service/cast_service_android.cc',
190 'browser/service/cast_service_android.h',
194 'browser/service/cast_service_simple.cc',
195 'browser/service/cast_service_simple.h',
203 'target_name': 'cast_shell_unittests',
204 'type': '<(gtest_target_type)',
207 '../base/base.gyp:base_prefs_test_support',
208 '../base/base.gyp:run_all_unittests',
209 '../base/base.gyp:test_support_base',
210 '../components/components.gyp:component_metrics_proto',
211 '../testing/gtest.gyp:gtest',
214 'browser/metrics/cast_metrics_service_client_unittest.cc',
217 ['use_allocator!="none"', {
219 '../base/allocator/allocator.gyp:allocator',
223 }, # end of target 'cast_metrics_unittests'
225 'target_name': 'cast_version_header',
227 'direct_dependent_settings': {
229 '<(SHARED_INTERMEDIATE_DIR)',
234 'action_name': 'version_header',
235 'message': 'Generating version header file: <@(_outputs)',
238 'common/version.h.in',
241 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
245 '<(version_py_path)',
246 '-e', 'VERSION_FULL="<(version_full)"',
247 # Revision is taken from buildbot if available; otherwise, a dev string is used.
248 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
249 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
250 'common/version.h.in',
254 '../build/util/version.gypi',
260 'target_name': 'cast_metrics_test_support',
261 'type': '<(component)',
266 'base/metrics/cast_metrics_test_helper.cc',
267 'base/metrics/cast_metrics_test_helper.h',
269 }, # end of target 'cast_metrics_test_support'
271 'target_name': 'cast_tests',
274 'media/media.gyp:cast_media_unittests',
279 # Targets for Android receiver.
284 'target_name': 'libcast_shell_android',
285 'type': 'shared_library',
290 'cast_version_header',
291 '../base/base.gyp:base',
292 '../breakpad/breakpad.gyp:breakpad_client',
293 '../components/components.gyp:breakpad_host',
294 '../components/components.gyp:crash_component',
295 '../content/content.gyp:content_app_browser',
296 '../content/content.gyp:content',
297 '../skia/skia.gyp:skia',
298 '../ui/gfx/gfx.gyp:gfx',
299 '../ui/gl/gl.gyp:gl',
305 'android/cast_jni_registrar.cc',
306 'android/cast_jni_registrar.h',
307 'android/chromecast_config_android.cc',
308 'android/chromecast_config_android.h',
309 'android/platform_jni_loader.h',
310 'app/android/cast_jni_loader.cc',
311 'browser/android/cast_window_android.cc',
312 'browser/android/cast_window_android.h',
313 'browser/android/cast_window_manager.cc',
314 'browser/android/cast_window_manager.h',
315 'browser/android/external_video_surface_container_impl.cc',
316 'browser/android/external_video_surface_container_impl.h',
317 'crash/android/cast_crash_reporter_client_android.cc',
318 'crash/android/cast_crash_reporter_client_android.h',
319 'crash/android/crash_handler.cc',
320 'crash/android/crash_handler.h',
323 ['chromecast_branding=="Chrome"', {
325 '<(cast_internal_gyp):cast_shell_android_internal'
329 'android/chromecast_config_android_stub.cc',
330 'android/platform_jni_loader_stub.cc',
334 }, # end of target 'libcast_shell_android'
336 'target_name': 'cast_shell_java',
339 '../base/base.gyp:base_java',
340 '../content/content.gyp:content_java',
341 '../media/media.gyp:media_java',
342 '../net/net.gyp:net_java',
343 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
344 '../ui/android/ui_android.gyp:ui_java',
347 'has_java_resources': 1,
348 'java_in_dir': 'browser/android/apk',
349 'resource_dir': 'browser/android/apk/res',
350 'R_package': 'org.chromium.chromecast.shell',
352 'includes': ['../build/java.gypi'],
353 }, # end of target 'cast_shell_java'
355 'target_name': 'cast_shell_apk',
359 'libcast_shell_android',
362 'apk_name': 'CastShell',
363 'manifest_package_name': 'org.chromium.chromecast.shell',
364 # Note(gunsch): there are no Java files in the android/ directory.
365 # Unfortunately, the java_apk.gypi target rigidly insists on having
366 # a java_in_dir directory, but complains about duplicate classes
367 # from the common cast_shell_java target (shared with internal APK)
368 # if the actual Java path is used.
369 # This will hopefully be removable after the great GN migration.
370 'java_in_dir': 'android',
371 'android_manifest_path': 'browser/android/apk/AndroidManifest.xml',
372 'package_name': 'org.chromium.chromecast.shell',
373 'native_lib_target': 'libcast_shell_android',
374 'asset_location': '<(PRODUCT_DIR)/assets',
375 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
377 'includes': [ '../build/java_apk.gypi' ],
380 'target_name': 'cast_jni_headers',
383 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
384 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
385 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
386 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
388 'direct_dependent_settings': {
390 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
394 'jni_gen_package': 'chromecast',
396 'includes': [ '../build/jni_generator.gypi' ],
399 }, { # OS != "android"
401 # This target contains all of the primary code of |cast_shell|, except
402 # for |main|. This allows end-to-end tests using |cast_shell|.
403 # This also includes all targets that cannot be built on Android.
405 'target_name': 'cast_shell_core',
406 'type': '<(component)',
410 'media/media.gyp:cast_media',
411 '../ui/aura/aura.gyp:aura_test_support',
414 ['chromecast_branding=="Chrome"', {
416 '<(cast_internal_gyp):cast_gfx_internal',
420 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
426 'target_name': 'cast_shell',
427 'type': 'executable',
436 'target_name': 'cast_shell_browser_test',
437 'type': '<(gtest_target_type)',
439 'cast_shell_test_support',
440 '../testing/gtest.gyp:gtest',
443 'HAS_OUT_OF_PROC_TEST_RUNNER',
446 'browser/test/chromecast_shell_browser_test.cc',
450 'target_name': 'cast_shell_test_support',
451 'type': '<(component)',
453 'HAS_OUT_OF_PROC_TEST_RUNNER',
457 '../content/content_shell_and_tests.gyp:content_browser_test_support',
458 '../testing/gtest.gyp:gtest',
461 'browser/test/chromecast_browser_test.cc',
462 'browser/test/chromecast_browser_test.h',
463 'browser/test/chromecast_browser_test_runner.cc',
468 ], # end of conditions