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:metrics',
115 '../components/components.gyp:metrics_gpu',
116 '../components/components.gyp:metrics_net',
117 '../components/components.gyp:metrics_profiler',
118 '../content/content.gyp:content',
119 '../content/content.gyp:content_app_browser',
120 '../skia/skia.gyp:skia',
121 '../third_party/WebKit/public/blink.gyp:blink',
122 '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
125 'app/cast_main_delegate.cc',
126 'app/cast_main_delegate.h',
127 'browser/cast_browser_context.cc',
128 'browser/cast_browser_context.h',
129 'browser/cast_browser_main_parts.cc',
130 'browser/cast_browser_main_parts.h',
131 'browser/cast_browser_process.cc',
132 'browser/cast_browser_process.h',
133 'browser/cast_content_browser_client.cc',
134 'browser/cast_content_browser_client.h',
135 'browser/cast_content_window.cc',
136 'browser/cast_content_window.h',
137 'browser/cast_download_manager_delegate.cc',
138 'browser/cast_download_manager_delegate.h',
139 'browser/cast_http_user_agent_settings.cc',
140 'browser/cast_http_user_agent_settings.h',
141 'browser/cast_network_delegate.cc',
142 'browser/cast_network_delegate.h',
143 'browser/devtools/cast_dev_tools_delegate.cc',
144 'browser/devtools/cast_dev_tools_delegate.h',
145 'browser/devtools/remote_debugging_server.cc',
146 'browser/devtools/remote_debugging_server.h',
147 'browser/geolocation/cast_access_token_store.cc',
148 'browser/geolocation/cast_access_token_store.h',
149 'browser/metrics/cast_metrics_prefs.cc',
150 'browser/metrics/cast_metrics_prefs.h',
151 'browser/metrics/cast_metrics_service_client.cc',
152 'browser/metrics/cast_metrics_service_client.h',
153 'browser/metrics/cast_stability_metrics_provider.cc',
154 'browser/metrics/cast_stability_metrics_provider.h',
155 'browser/metrics/platform_metrics_providers.h',
156 'browser/service/cast_service.cc',
157 'browser/service/cast_service.h',
158 'browser/url_request_context_factory.cc',
159 'browser/url_request_context_factory.h',
160 'common/cast_content_client.cc',
161 'common/cast_content_client.h',
162 'common/cast_paths.cc',
163 'common/cast_paths.h',
164 'common/cast_resource_delegate.cc',
165 'common/cast_resource_delegate.h',
166 'common/chromecast_config.cc',
167 'common/chromecast_config.h',
168 'common/chromecast_switches.cc',
169 'common/chromecast_switches.h',
170 'common/platform_client_auth.h',
171 'common/pref_names.cc',
172 'common/pref_names.h',
173 'renderer/cast_content_renderer_client.cc',
174 'renderer/cast_content_renderer_client.h',
175 'renderer/key_systems_cast.cc',
176 'renderer/key_systems_cast.h',
179 ['chromecast_branding=="Chrome"', {
181 '<(cast_internal_gyp):cast_shell_internal',
185 'browser/cast_network_delegate_simple.cc',
186 'browser/devtools/remote_debugging_server_simple.cc',
187 'browser/metrics/platform_metrics_providers_simple.cc',
188 'common/chromecast_config_simple.cc',
189 'common/platform_client_auth_simple.cc',
190 'renderer/key_systems_cast_simple.cc',
195 'browser/service/cast_service_android.cc',
196 'browser/service/cast_service_android.h',
200 'browser/service/cast_service_simple.cc',
201 'browser/service/cast_service_simple.h',
206 # ExternalMetrics not necessary on Android and (as of this writing) uses
207 # non-portable filesystem operations. Also webcrypto is not used on
211 'browser/metrics/external_metrics.cc',
212 'browser/metrics/external_metrics.h',
215 '../components/components.gyp:metrics_serialization',
221 'target_name': 'cast_version_header',
223 'direct_dependent_settings': {
225 '<(SHARED_INTERMEDIATE_DIR)',
230 'action_name': 'version_header',
231 'message': 'Generating version header file: <@(_outputs)',
234 'common/version.h.in',
237 '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
241 '<(version_py_path)',
242 '-e', 'VERSION_FULL="<(version_full)"',
243 # Revision is taken from buildbot if available; otherwise, a dev string is used.
244 '-e', 'CAST_BUILD_REVISION="<!(echo ${BUILD_NUMBER:="local.${USER}"})"',
245 '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
246 'common/version.h.in',
250 '../build/util/version.gypi',
257 # Targets for Android receiver.
262 'target_name': 'libcast_shell_android',
263 'type': 'shared_library',
268 'cast_version_header',
269 '../base/base.gyp:base',
270 '../breakpad/breakpad.gyp:breakpad_client',
271 '../components/components.gyp:breakpad_host',
272 '../components/components.gyp:crash_component',
273 '../content/content.gyp:content_app_browser',
274 '../content/content.gyp:content',
275 '../skia/skia.gyp:skia',
276 '../ui/gfx/gfx.gyp:gfx',
277 '../ui/gl/gl.gyp:gl',
283 'android/cast_jni_registrar.cc',
284 'android/cast_jni_registrar.h',
285 'android/chromecast_config_android.cc',
286 'android/chromecast_config_android.h',
287 'android/platform_jni_loader.h',
288 'app/android/cast_jni_loader.cc',
289 'browser/android/cast_window_android.cc',
290 'browser/android/cast_window_android.h',
291 'browser/android/cast_window_manager.cc',
292 'browser/android/cast_window_manager.h',
293 'browser/android/external_video_surface_container_impl.cc',
294 'browser/android/external_video_surface_container_impl.h',
295 'crash/android/cast_crash_reporter_client_android.cc',
296 'crash/android/cast_crash_reporter_client_android.h',
297 'crash/android/crash_handler.cc',
298 'crash/android/crash_handler.h',
301 ['chromecast_branding=="Chrome"', {
303 '<(cast_internal_gyp):cast_shell_android_internal'
307 'android/chromecast_config_android_stub.cc',
308 'android/platform_jni_loader_stub.cc',
312 }, # end of target 'libcast_shell_android'
314 'target_name': 'cast_shell_java',
317 '<(android_support_v13_target)',
318 '../base/base.gyp:base_java',
319 '../content/content.gyp:content_java',
320 '../media/media.gyp:media_java',
321 '../net/net.gyp:net_java',
322 '../ui/android/ui_android.gyp:ui_java',
325 'has_java_resources': 1,
326 'java_in_dir': 'browser/android/apk',
327 'resource_dir': 'browser/android/apk/res',
328 'R_package': 'org.chromium.chromecast.shell',
330 'includes': ['../build/java.gypi'],
331 }, # end of target 'cast_shell_java'
333 'target_name': 'cast_shell_manifest',
336 'jinja_inputs': ['browser/android/apk/AndroidManifest.xml'],
337 'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
339 'includes': [ '../build/android/jinja_template.gypi' ],
342 'target_name': 'cast_shell_apk',
346 'libcast_shell_android',
349 'apk_name': 'CastShell',
350 'manifest_package_name': 'org.chromium.chromecast.shell',
351 # Note(gunsch): there are no Java files in the android/ directory.
352 # Unfortunately, the java_apk.gypi target rigidly insists on having
353 # a java_in_dir directory, but complains about duplicate classes
354 # from the common cast_shell_java target (shared with internal APK)
355 # if the actual Java path is used.
356 # This will hopefully be removable after the great GN migration.
357 'java_in_dir': 'android',
358 'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
359 'package_name': 'org.chromium.chromecast.shell',
360 'native_lib_target': 'libcast_shell_android',
361 'asset_location': '<(PRODUCT_DIR)/assets',
362 'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
364 'includes': [ '../build/java_apk.gypi' ],
367 'target_name': 'cast_jni_headers',
370 'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
371 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
372 'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
373 'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
375 'direct_dependent_settings': {
377 '<(SHARED_INTERMEDIATE_DIR)/chromecast',
381 'jni_gen_package': 'chromecast',
383 'includes': [ '../build/jni_generator.gypi' ],
386 }, { # OS != "android"
389 'target_name': 'cast_crash_client',
390 'type': '<(component)',
392 '../breakpad/breakpad.gyp:breakpad_client',
393 '../components/components.gyp:crash_component',
396 'crash/cast_crash_reporter_client.cc',
397 'crash/cast_crash_reporter_client.h',
400 ['chromecast_branding=="Chrome"', {
402 '<(cast_internal_gyp):crash_internal',
406 'crash/cast_crash_reporter_client_simple.cc',
410 }, # end of target 'cast_crash_client'
411 # This target contains all of the primary code of |cast_shell|, except
412 # for |main|. This allows end-to-end tests using |cast_shell|.
413 # This also includes all targets that cannot be built on Android.
415 'target_name': 'cast_shell_core',
416 'type': '<(component)',
421 'media/media.gyp:cast_media',
422 '../ui/aura/aura.gyp:aura_test_support',
425 ['chromecast_branding=="Chrome"', {
427 '<(cast_internal_gyp):cast_gfx_internal',
431 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
437 'target_name': 'cast_shell',
438 'type': 'executable',
448 ], # end of conditions