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_net',
18 'type': '<(component)',
20 'net/network_change_notifier_cast.cc',
21 'net/network_change_notifier_cast.h',
22 'net/network_change_notifier_factory_cast.cc',
23 'net/network_change_notifier_factory_cast.h',
27 'target_name': 'cast_shell_resources',
30 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
34 'action_name': 'cast_shell_resources',
36 'grit_grd_file': 'app/resources/shell_resources.grd',
37 'grit_resource_ids': 'app/resources/resource_ids',
39 'includes': [ '../build/grit_action.gypi' ],
42 'includes': [ '../build/grit_target.gypi' ],
45 'target_name': 'cast_shell_pak',
48 'cast_shell_resources',
49 '../content/app/resources/content_resources.gyp:content_resources',
50 '../content/app/strings/content_strings.gyp:content_strings',
51 '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
52 '../net/net.gyp:net_resources',
53 '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
54 '../ui/resources/ui_resources.gyp:ui_resources',
55 '../ui/strings/ui_strings.gyp:ui_strings',
59 'action_name': 'repack_cast_shell_pack',
62 '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
63 '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
64 '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
65 '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
66 '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
67 '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
68 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
69 '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
70 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
71 '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
72 '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
74 'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
76 'includes': [ '../build/repack_action.gypi' ],
80 # This target contains all content-embedder implementation that is
81 # non-platform-specific.
83 'target_name': 'cast_shell_common',
84 'type': '<(component)',
87 'cast_shell_resources',
88 'cast_version_header',
89 'chromecast_locales.gyp:chromecast_locales_pak',
90 'chromecast_locales.gyp:chromecast_settings',
91 'media/media.gyp:media_base',
92 '../base/base.gyp:base',
93 '../components/components.gyp:cdm_renderer',
94 '../components/components.gyp:component_metrics_proto',
95 '../components/components.gyp:metrics',
96 '../components/components.gyp:metrics_gpu',
97 '../components/components.gyp:metrics_net',
98 '../components/components.gyp:metrics_profiler',
99 '../content/content.gyp:content',
100 '../content/content.gyp:content_app_browser',
101 '../skia/skia.gyp:skia',
102 '../third_party/WebKit/public/blink.gyp:blink',
103 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
106 'app/cast_main_delegate.cc',
107 'app/cast_main_delegate.h',
108 'browser/cast_browser_context.cc',
109 'browser/cast_browser_context.h',
110 'browser/cast_browser_main_parts.cc',
111 'browser/cast_browser_main_parts.h',
112 'browser/cast_browser_process.cc',
113 'browser/cast_browser_process.h',
114 'browser/cast_content_browser_client.cc',
115 'browser/cast_content_browser_client.h',
116 'browser/cast_download_manager_delegate.cc',
117 'browser/cast_download_manager_delegate.h',
118 'browser/cast_http_user_agent_settings.cc',
119 'browser/cast_http_user_agent_settings.h',
120 'browser/cast_network_delegate.cc',
121 'browser/cast_network_delegate.h',
122 'browser/devtools/cast_dev_tools_delegate.cc',
123 'browser/devtools/cast_dev_tools_delegate.h',
124 'browser/devtools/remote_debugging_server.cc',
125 'browser/devtools/remote_debugging_server.h',
126 'browser/geolocation/cast_access_token_store.cc',
127 'browser/geolocation/cast_access_token_store.h',
128 'browser/metrics/cast_metrics_prefs.cc',
129 'browser/metrics/cast_metrics_prefs.h',
130 'browser/metrics/cast_metrics_service_client.cc',
131 'browser/metrics/cast_metrics_service_client.h',
132 'browser/metrics/cast_stability_metrics_provider.cc',
133 'browser/metrics/cast_stability_metrics_provider.h',
134 'browser/metrics/platform_metrics_providers.h',
135 'browser/service/cast_service.cc',
136 'browser/service/cast_service.h',
137 'browser/url_request_context_factory.cc',
138 'browser/url_request_context_factory.h',
139 'browser/webui/webui_cast.h',
140 'common/cast_content_client.cc',
141 'common/cast_content_client.h',
142 'common/cast_paths.cc',
143 'common/cast_paths.h',
144 'common/cast_resource_delegate.cc',
145 'common/cast_resource_delegate.h',
146 'common/chromecast_config.cc',
147 'common/chromecast_config.h',
148 'common/chromecast_switches.cc',
149 'common/chromecast_switches.h',
150 'common/pref_names.cc',
151 'common/pref_names.h',
152 'renderer/cast_content_renderer_client.cc',
153 'renderer/cast_content_renderer_client.h',
154 'renderer/key_systems_cast.cc',
155 'renderer/key_systems_cast.h',
158 ['chromecast_branding=="Chrome"', {
160 'internal/chromecast_internal.gyp:cast_shell_internal',
164 'browser/cast_network_delegate_simple.cc',
165 'browser/devtools/remote_debugging_server_simple.cc',
166 'browser/metrics/platform_metrics_providers_simple.cc',
167 'browser/webui/webui_cast_simple.cc',
168 'common/chromecast_config_simple.cc',
169 'renderer/key_systems_cast_simple.cc',
174 'browser/service/cast_service_android.cc',
175 'browser/service/cast_service_android.h',
179 'browser/service/cast_service_simple.cc',
180 'browser/service/cast_service_simple.h',
188 'target_name': 'cast_shell_unittests',
189 'type': '<(gtest_target_type)',
192 '../base/base.gyp:base_prefs_test_support',
193 '../base/base.gyp:run_all_unittests',
194 '../base/base.gyp:test_support_base',
195 '../components/components.gyp:component_metrics_proto',
196 '../testing/gtest.gyp:gtest',
199 'browser/metrics/cast_metrics_service_client_unittest.cc',
202 ['use_allocator!="none"', {
204 '../base/allocator/allocator.gyp:allocator',
208 }, # end of target 'cast_metrics_unittests'
210 'target_name': 'cast_version_header',
212 'direct_dependent_settings': {
214 '<(SHARED_INTERMEDIATE_DIR)',
219 'action_name': 'version_header',
220 'message': 'Generating version header file: <@(_outputs)',
223 'common/version.h.in',
226 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
230 '<(version_py_path)',
231 '-e', 'VERSION_FULL="<(version_full)"',
232 # Revision is taken from buildbot if available; otherwise, a dev string is used.
233 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
234 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
235 'common/version.h.in',
239 '../build/util/version.gypi',
245 'target_name': 'cast_tests',
248 'media/media.gyp:cast_media_unittests',
253 # Targets for Android receiver.
258 'target_name': 'libcast_shell_android',
259 'type': 'shared_library',
264 'cast_version_header',
265 '../base/base.gyp:base',
266 '../breakpad/breakpad.gyp:breakpad_client',
267 '../components/components.gyp:breakpad_host',
268 '../components/components.gyp:crash_component',
269 '../content/content.gyp:content_app_browser',
270 '../content/content.gyp:content',
271 '../skia/skia.gyp:skia',
272 '../ui/gfx/gfx.gyp:gfx',
273 '../ui/gl/gl.gyp:gl',
279 'android/cast_jni_registrar.cc',
280 'android/cast_jni_registrar.h',
281 'android/chromecast_config_android.cc',
282 'android/chromecast_config_android.h',
283 'android/platform_jni_loader.h',
284 'app/android/cast_jni_loader.cc',
285 'browser/android/cast_window_android.cc',
286 'browser/android/cast_window_android.h',
287 'browser/android/cast_window_manager.cc',
288 'browser/android/cast_window_manager.h',
289 'browser/android/external_video_surface_container_impl.cc',
290 'browser/android/external_video_surface_container_impl.h',
291 'crash/android/cast_crash_reporter_client_android.cc',
292 'crash/android/cast_crash_reporter_client_android.h',
293 'crash/android/crash_handler.cc',
294 'crash/android/crash_handler.h',
297 ['chromecast_branding=="Chrome"', {
299 '<(cast_internal_gyp):cast_shell_android_internal'
303 'android/chromecast_config_android_stub.cc',
304 'android/platform_jni_loader_stub.cc',
308 }, # end of target 'libcast_shell_android'
310 'target_name': 'cast_shell_java',
313 '../base/base.gyp:base_java',
314 '../content/content.gyp:content_java',
315 '../media/media.gyp:media_java',
316 '../net/net.gyp:net_java',
317 '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
318 '../ui/android/ui_android.gyp:ui_java',
321 'has_java_resources': 1,
322 'java_in_dir': 'browser/android/apk',
323 'resource_dir': 'browser/android/apk/res',
324 'R_package': 'org.chromium.chromecast.shell',
326 'includes': ['../build/java.gypi'],
327 }, # end of target 'cast_shell_java'
329 'target_name': 'cast_shell_apk',
333 'libcast_shell_android',
336 'apk_name': 'CastShell',
337 'manifest_package_name': 'org.chromium.chromecast.shell',
338 # Note(gunsch): there are no Java files in the android/ directory.
339 # Unfortunately, the java_apk.gypi target rigidly insists on having
340 # a java_in_dir directory, but complains about duplicate classes
341 # from the common cast_shell_java target (shared with internal APK)
342 # if the actual Java path is used.
343 # This will hopefully be removable after the great GN migration.
344 'java_in_dir': 'android',
345 'android_manifest_path': 'browser/android/apk/AndroidManifest.xml',
346 'package_name': 'org.chromium.chromecast.shell',
347 'native_lib_target': 'libcast_shell_android',
348 'asset_location': '<(PRODUCT_DIR)/assets',
349 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
351 'includes': [ '../build/java_apk.gypi' ],
354 'target_name': 'cast_jni_headers',
357 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
358 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
359 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
360 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
362 'direct_dependent_settings': {
364 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
368 'jni_gen_package': 'chromecast',
370 'includes': [ '../build/jni_generator.gypi' ],
373 }, { # OS != "android"
375 # This target contains all of the primary code of |cast_shell|, except
376 # for |main|. This allows end-to-end tests using |cast_shell|.
377 # This also includes all targets that cannot be built on Android.
379 'target_name': 'cast_shell_core',
380 'type': '<(component)',
384 'media/media.gyp:cast_media',
385 '../ui/aura/aura.gyp:aura_test_support',
388 ['chromecast_branding=="Chrome"', {
390 'internal/chromecast_internal.gyp:cast_gfx_internal',
394 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
400 'target_name': 'cast_shell',
401 'type': 'executable',
410 'target_name': 'cast_shell_browser_test',
411 'type': '<(gtest_target_type)',
413 'cast_shell_test_support',
414 '../testing/gtest.gyp:gtest',
417 'HAS_OUT_OF_PROC_TEST_RUNNER',
420 'browser/test/chromecast_shell_browser_test.cc',
424 'target_name': 'cast_shell_test_support',
425 'type': '<(component)',
427 'HAS_OUT_OF_PROC_TEST_RUNNER',
431 '../content/content_shell_and_tests.gyp:content_browser_test_support',
432 '../testing/gtest.gyp:gtest',
435 'browser/test/chromecast_browser_test.cc',
436 'browser/test/chromecast_browser_test.h',
437 'browser/test/chromecast_browser_test_runner.cc',
442 ], # end of conditions