Delete unused downloads page asset.
[chromium-blink-merge.git] / chromecast / chromecast.gyp
blob9445b5e8a4874ca74e60f1414e36f783f5e42ca7
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.
6   'variables': {
7     'android_support_v13_target%':
8         '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
9     'cast_build_release': 'internal/build/cast_build_release',
10     'cast_is_debug_build%': 0,
11     # Refers to enum CastProductType in components/metrics/proto/cast_logs.proto
12     'cast_product_type%': 0,  # CAST_PRODUCT_TYPE_UNKNOWN
13     'chromium_code': 1,
14     'chromecast_branding%': 'public',
15     'disable_display%': 0,
16     'enable_default_cast_graphics%': 1,
17     'ozone_platform_cast%': 0,
18     'use_chromecast_webui%': 0,
19   },
20   'includes': [
21     'chromecast_tests.gypi',
22   ],
23   'target_defaults': {
24     'include_dirs': [
25       '..',  # Root of Chromium checkout
26     ],
27     'conditions': [
28       ['disable_display==1', {
29         'defines': ['DISABLE_DISPLAY'],
30       }],
31     ],
32   },
33   'targets': [
34     # Public API target for OEM partners to replace shlibs.
35     {
36       'target_name': 'cast_public_api',
37       'type': '<(component)',
38       'sources': [
39         'public/cast_egl_platform.h',
40         'public/cast_egl_platform_shlib.h',
41         'public/cast_media_shlib.h',
42         'public/cast_sys_info.h',
43         'public/chromecast_export.h',
44         'public/graphics_properties_shlib.h',
45         'public/graphics_types.h',
46         'public/media_codec_support.h',
47         'public/media/audio_pipeline_device.h',
48         'public/media/cast_decoder_buffer.h',
49         'public/media/cast_decrypt_config.h',
50         'public/media/cast_key_system.h',
51         'public/media/decoder_config.h',
52         'public/media/decrypt_context.h',
53         'public/media/media_clock_device.h',
54         'public/media/media_component_device.h',
55         'public/media/media_pipeline_backend.h',
56         'public/media/media_pipeline_device_params.h',
57         'public/media/stream_id.h',
58         'public/media/video_pipeline_device.h',
59         'public/osd_plane.h',
60         'public/osd_plane_shlib.h',
61         'public/osd_surface.h',
62         'public/task_runner.h',
63         'public/video_plane.h',
64       ],
65       'direct_dependent_settings': {
66         'include_dirs': [
67           'public/',
68         ],
69       },
70     },
71     {
72       'target_name': 'cast_base',
73       'type': '<(component)',
74       'dependencies': [
75         '../base/base.gyp:base',
76       ],
77       'sources': [
78         'base/android/dumpstate_writer.cc',
79         'base/android/dumpstate_writer.h',
80         'base/android/system_time_change_notifier_android.cc',
81         'base/android/system_time_change_notifier_android.h',
82         'base/cast_paths.cc',
83         'base/cast_paths.h',
84         'base/chromecast_config_android.cc',
85         'base/chromecast_config_android.h',
86         'base/chromecast_switches.cc',
87         'base/chromecast_switches.h',
88         'base/error_codes.cc',
89         'base/error_codes.h',
90         'base/metrics/cast_histograms.h',
91         'base/metrics/cast_metrics_helper.cc',
92         'base/metrics/cast_metrics_helper.h',
93         'base/metrics/grouped_histogram.cc',
94         'base/metrics/grouped_histogram.h',
95         'base/path_utils.cc',
96         'base/path_utils.h',
97         'base/pref_names.cc',
98         'base/pref_names.h',
99         'base/process_utils.cc',
100         'base/process_utils.h',
101         'base/serializers.cc',
102         'base/serializers.h',
103         'base/system_time_change_notifier.cc',
104         'base/system_time_change_notifier.h',
105         'base/task_runner_impl.cc',
106         'base/task_runner_impl.h',
107       ],
108       'conditions': [
109         ['OS=="android"', {
110           'dependencies': [
111             'cast_jni_headers',
112           ],
113         }],
114       ],
115     },  # end of target 'cast_base'
116     {
117       'target_name': 'cast_crash',
118       'type': '<(component)',
119       'include_dirs': [
120         # TODO(gfhuang): we should not need to include this directly, but
121         # somehow depending on component.gyp:breakpad_component is not
122         # working as expected.
123         '../breakpad/src',
124       ],
125       'dependencies': [
126         'cast_base',
127         'cast_version_header',
128         '../breakpad/breakpad.gyp:breakpad_client',
129       ],
130       'sources': [
131         'crash/app_state_tracker.cc',
132         'crash/app_state_tracker.h',
133         'crash/cast_crash_keys.cc',
134         'crash/cast_crash_keys.h',
135         'crash/cast_crashdump_uploader.cc',
136         'crash/cast_crashdump_uploader.h',
137         'crash/linux/crash_util.cc',
138         'crash/linux/crash_util.h',
139         'crash/linux/dummy_minidump_generator.cc',
140         'crash/linux/dummy_minidump_generator.h',
141         'crash/linux/dump_info.cc',
142         'crash/linux/dump_info.h',
143         'crash/linux/minidump_generator.h',
144         'crash/linux/synchronized_minidump_manager.cc',
145         'crash/linux/synchronized_minidump_manager.h',
146         'crash/linux/minidump_params.cc',
147         'crash/linux/minidump_params.h',
148         'crash/linux/minidump_writer.cc',
149         'crash/linux/minidump_writer.h',
150       ],
151     },  # end of target 'cast_crash'
152     {
153       'target_name': 'cast_crash_client',
154       'type': '<(component)',
155       'dependencies': [
156         'cast_crash',
157         '../breakpad/breakpad.gyp:breakpad_client',
158         '../components/components.gyp:crash_component',
159         '../content/content.gyp:content_common',
160       ],
161       'include_dirs': [
162         '../breakpad/src',
163       ],
164       'sources' : [
165         'app/android/crash_handler.cc',
166         'app/android/crash_handler.h',
167         'app/android/cast_crash_reporter_client_android.cc',
168         'app/android/cast_crash_reporter_client_android.h',
169         'app/linux/cast_crash_reporter_client.cc',
170         'app/linux/cast_crash_reporter_client.h',
171       ],
172       'conditions': [
173         ['OS=="android"', {
174           'dependencies': [
175             'cast_jni_headers',
176           ],
177         }],
178       ],
179     },  # end of target 'cast_crash_client'
180     {
181       'target_name': 'cast_net',
182       'type': '<(component)',
183       'sources': [
184         'net/connectivity_checker.cc',
185         'net/connectivity_checker.h',
186         'net/connectivity_checker_impl.cc',
187         'net/connectivity_checker_impl.h',
188         'net/fake_connectivity_checker.cc',
189         'net/fake_connectivity_checker.h',
190         'net/net_switches.cc',
191         'net/net_switches.h',
192         'net/net_util_cast.cc',
193         'net/net_util_cast.h',
194       ],
195       'conditions': [
196         ['OS!="android"', {
197           'sources': [
198             'net/network_change_notifier_factory_cast.cc',
199             'net/network_change_notifier_factory_cast.h',
200           ],
201         }],
202       ],
203     },
204     {
205       'target_name': 'cast_shell_resources',
206       'type': 'none',
207       'variables': {
208         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
209       },
210       'actions': [
211         {
212           'action_name': 'cast_shell_resources',
213           'variables': {
214             'grit_grd_file': 'app/resources/shell_resources.grd',
215             'grit_resource_ids': 'app/resources/resource_ids',
216           },
217           'includes': [ '../build/grit_action.gypi' ],
218         },
219       ],
220       'includes': [ '../build/grit_target.gypi' ],
221     },
222     {
223       'target_name': 'cast_shell_pak',
224       'type': 'none',
225       'dependencies': [
226         'cast_shell_resources',
227         '../content/app/resources/content_resources.gyp:content_resources',
228         '../content/app/strings/content_strings.gyp:content_strings',
229         '../net/net.gyp:net_resources',
230         '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
231         '../ui/resources/ui_resources.gyp:ui_resources',
232         '../ui/strings/ui_strings.gyp:ui_strings',
233       ],
234       'actions': [
235         {
236           'action_name': 'repack_cast_shell_pak',
237           'variables': {
238             'pak_inputs': [
239               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
240               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_image_resources_100_percent.pak',
241               '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
242               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
243               '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
244               '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
245               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
246               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
247               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
248               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
249               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
250             ],
251             'conditions': [
252               ['chromecast_branding!="public" and use_chromecast_webui==1', {
253                 'pak_inputs': [
254                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
255                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
256                 ],
257               }],
258               ['chromecast_branding!="public"', {
259                 'pak_inputs': [
260                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/sound_resources.pak',
261                 ],
262               }],
263             ],
264             'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
265           },
266           'includes': [ '../build/repack_action.gypi' ],
267         },
268       ],
269       'conditions': [
270         ['chromecast_branding!="public" and use_chromecast_webui==1', {
271           'dependencies': [
272             'internal/chromecast_resources.gyp:chromecast_app_resources',
273             'internal/chromecast_resources.gyp:chromecast_webui_resources',
274           ],
275         }],
276         ['chromecast_branding!="public"', {
277           'dependencies': [
278             'internal/chromecast_resources.gyp:chromecast_sound_resources',
279           ],
280         }],
281       ],
282     },  # end of target 'cast_shell_pak'
283     # This target contains all content-embedder implementation that is
284     # non-platform-specific.
285     {
286       'target_name': 'cast_shell_common',
287       'type': '<(component)',
288       'dependencies': [
289         'cast_base',
290         'cast_crash_client',
291         'cast_net',
292         'cast_shell_pak',
293         'cast_shell_resources',
294         'cast_sys_info',
295         'cast_version_header',
296         'chromecast_locales.gyp:chromecast_locales_pak',
297         'chromecast_locales.gyp:chromecast_settings',
298         'media/media.gyp:media_base',
299         'media/media.gyp:media_cdm',
300         '../base/base.gyp:base',
301         '../components/components.gyp:breakpad_host',
302         '../components/components.gyp:cdm_renderer',
303         '../components/components.gyp:component_metrics_proto',
304         '../components/components.gyp:crash_component',
305         '../components/components.gyp:devtools_discovery',
306         '../components/components.gyp:devtools_http_handler',
307         '../components/components.gyp:network_hints_browser',
308         '../components/components.gyp:network_hints_renderer',
309         '../components/components.gyp:metrics',
310         '../components/components.gyp:metrics_gpu',
311         '../components/components.gyp:metrics_net',
312         '../components/components.gyp:metrics_profiler',
313         '../content/content.gyp:content',
314         '../content/content.gyp:content_app_both',
315         '../skia/skia.gyp:skia',
316         '../third_party/WebKit/public/blink.gyp:blink',
317         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
318       ],
319       'sources': [
320         'app/cast_main_delegate.cc',
321         'app/cast_main_delegate.h',
322         'browser/android/cast_window_android.cc',
323         'browser/android/cast_window_android.h',
324         'browser/android/cast_window_manager.cc',
325         'browser/android/cast_window_manager.h',
326         'browser/cast_browser_context.cc',
327         'browser/cast_browser_context.h',
328         'browser/cast_browser_main_parts.cc',
329         'browser/cast_browser_main_parts.h',
330         'browser/cast_browser_process.cc',
331         'browser/cast_browser_process.h',
332         'browser/cast_content_browser_client.cc',
333         'browser/cast_content_browser_client.h',
334         'browser/cast_content_window.cc',
335         'browser/cast_content_window.h',
336         'browser/cast_download_manager_delegate.cc',
337         'browser/cast_download_manager_delegate.h',
338         'browser/cast_http_user_agent_settings.cc',
339         'browser/cast_http_user_agent_settings.h',
340         'browser/cast_net_log.cc',
341         'browser/cast_net_log.h',
342         'browser/cast_network_delegate.cc',
343         'browser/cast_network_delegate.h',
344         'browser/cast_permission_manager.cc',
345         'browser/cast_permission_manager.h',
346         'browser/cast_quota_permission_context.cc',
347         'browser/cast_quota_permission_context.h',
348         'browser/cast_resource_dispatcher_host_delegate.cc',
349         'browser/cast_resource_dispatcher_host_delegate.h',
350         'browser/devtools/cast_dev_tools_delegate.cc',
351         'browser/devtools/cast_dev_tools_delegate.h',
352         'browser/devtools/remote_debugging_server.cc',
353         'browser/devtools/remote_debugging_server.h',
354         'browser/geolocation/cast_access_token_store.cc',
355         'browser/geolocation/cast_access_token_store.h',
356         'browser/media/cast_media_client_android.cc',
357         'browser/media/cast_media_client_android.h',
358         'browser/metrics/cast_metrics_prefs.cc',
359         'browser/metrics/cast_metrics_prefs.h',
360         'browser/metrics/cast_metrics_service_client.cc',
361         'browser/metrics/cast_metrics_service_client.h',
362         'browser/metrics/cast_stability_metrics_provider.cc',
363         'browser/metrics/cast_stability_metrics_provider.h',
364         'browser/pref_service_helper.cc',
365         'browser/pref_service_helper.h',
366         'browser/service/cast_service.cc',
367         'browser/service/cast_service.h',
368         'browser/url_request_context_factory.cc',
369         'browser/url_request_context_factory.h',
370         'common/cast_content_client.cc',
371         'common/cast_content_client.h',
372         'common/cast_resource_delegate.cc',
373         'common/cast_resource_delegate.h',
374         'common/media/cast_messages.h',
375         'common/media/cast_message_generator.cc',
376         'common/media/cast_message_generator.h',
377         'common/platform_client_auth.h',
378         'renderer/cast_content_renderer_client.cc',
379         'renderer/cast_content_renderer_client.h',
380         'renderer/cast_media_load_deferrer.cc',
381         'renderer/cast_media_load_deferrer.h',
382         'renderer/cast_render_process_observer.cc',
383         'renderer/cast_render_process_observer.h',
384         'renderer/key_systems_cast.cc',
385         'renderer/key_systems_cast.h',
386         'renderer/media/capabilities_message_filter.cc',
387         'renderer/media/capabilities_message_filter.h',
388       ],
389       'conditions': [
390         ['chromecast_branding!="public"', {
391           'dependencies': [
392             'internal/chromecast_internal.gyp:cast_shell_internal',
393           ],
394         }, {
395           'sources': [
396             'browser/cast_content_browser_client_simple.cc',
397             'browser/cast_network_delegate_simple.cc',
398             'browser/devtools/remote_debugging_server_simple.cc',
399             'browser/pref_service_helper_simple.cc',
400             'browser/service/cast_service_android.cc',
401             'browser/service/cast_service_android.h',
402             'common/platform_client_auth_simple.cc',
403             'renderer/cast_content_renderer_client_simple.cc',
404           ],
405           'conditions': [
406             ['OS!="android"', {
407               'sources': [
408                 'browser/media/cast_browser_cdm_factory_simple.cc',
409                 'browser/service/cast_service_simple.cc',
410                 'browser/service/cast_service_simple.h',
411               ],
412             }],
413           ],
414         }],
415         # ExternalMetrics not necessary on Android and (as of this writing) uses
416         # non-portable filesystem operations. Also webcrypto is not used on
417         # Android either.
418         ['OS=="linux"', {
419           'sources': [
420             'browser/metrics/external_metrics.cc',
421             'browser/metrics/external_metrics.h',
422             'graphics/cast_screen.cc',
423             'graphics/cast_screen.h',
424           ],
425           'dependencies': [
426             '../components/components.gyp:metrics_serialization',
427           ],
428         }],
429         ['OS=="android"', {
430           'dependencies': [
431             '../components/components.gyp:cdm_browser',
432             '../components/components.gyp:external_video_surface',
433             'cast_jni_headers',
434           ],
435         }],
436       ],
437     },
438     {
439       'target_name': 'cast_sys_info',
440       'type': '<(component)',
441       'dependencies': [
442         'cast_public_api',
443         '../base/base.gyp:base',
444       ],
445       'sources': [
446         'base/cast_sys_info_util.h',
447         'base/cast_sys_info_dummy.cc',
448         'base/cast_sys_info_dummy.h',
449         'base/cast_sys_info_android.cc',
450         'base/cast_sys_info_android.h',
451       ],
452       'conditions': [
453         ['OS=="android"', {
454           'dependencies': [
455             'cast_jni_headers',
456           ],
457         }],
458         ['chromecast_branding=="public" and OS!="android"', {
459           'sources': [
460             'base/cast_sys_info_util_simple.cc',
461           ],
462         }],
463       ],
464     },  # end of target 'cast_sys_info'
465     {
466       'target_name': 'cast_version_header',
467       'type': 'none',
468       'direct_dependent_settings': {
469         'include_dirs': [
470           '<(SHARED_INTERMEDIATE_DIR)',
471         ],
472       },
473       'actions': [
474         {
475           'action_name': 'version_header',
476           'message': 'Generating version header file: <@(_outputs)',
477           'inputs': [
478             '<(version_path)',
479             'base/version.h.in',
480           ],
481           'outputs': [
482             '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
483           ],
484           'action': [
485             'python',
486             '<(version_py_path)',
487             '-e', 'VERSION_FULL="<(version_full)"',
488             # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
489             # otherwise, a dev string is used.
490             '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
491             # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
492             # otherwise, a dev string is used.
493             '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
494             '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
495             '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
496             'base/version.h.in',
497             '<@(_outputs)',
498           ],
499           'includes': [
500             '../build/util/version.gypi',
501           ],
502         },
503       ],
504     },
505   ],  # end of targets
507   # Targets for Android receiver.
508   'conditions': [
509     ['OS=="android"', {
510       'targets': [
511         {
512           'target_name': 'cast_shell_icudata',
513           'type': 'none',
514           'dependencies': [
515             '../third_party/icu/icu.gyp:icudata',
516             '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
517           ],
518           'copies': [{
519             'destination': '<(PRODUCT_DIR)/assets',
520             'files': [
521               '<(PRODUCT_DIR)/icudtl.dat',
522               '<(PRODUCT_DIR)/natives_blob.bin',
523               '<(PRODUCT_DIR)/snapshot_blob.bin',
524             ],
525           }],
526         },
527         {
528           'target_name': 'libcast_shell_android',
529           'type': 'shared_library',
530           'dependencies': [
531             'cast_jni_headers',
532             'cast_shell_common',
533             'cast_shell_icudata',
534             'cast_shell_pak',
535             'cast_version_header',
536             '../base/base.gyp:base',
537             '../components/components.gyp:breakpad_host',
538             '../content/content.gyp:content',
539             '../skia/skia.gyp:skia',
540             '../ui/gfx/gfx.gyp:gfx',
541             '../ui/gl/gl.gyp:gl',
542           ],
543           'sources': [
544             'android/cast_jni_registrar.cc',
545             'android/cast_jni_registrar.h',
546             'android/cast_metrics_helper_android.cc',
547             'android/cast_metrics_helper_android.h',
548             'android/platform_jni_loader.h',
549             'app/android/cast_jni_loader.cc',
550           ],
551           'conditions': [
552             ['chromecast_branding!="public"', {
553               'dependencies': [
554                 'internal/chromecast_internal.gyp:cast_shell_android_internal'
555               ],
556             }, {
557               'sources': [
558                 'android/platform_jni_loader_stub.cc',
559               ],
560             }]
561           ],
562         },  # end of target 'libcast_shell_android'
563         {
564           'target_name': 'cast_base_java',
565           'type': 'none',
566           'dependencies': [
567             '../base/base.gyp:base_java',
568           ],
569           'variables': {
570             'android_manifest_path': 'android/AndroidManifest.xml',
571             'java_in_dir': 'base/java',
572           },
573           'includes': ['../build/java.gypi'],
574         },  # end of target 'cast_base_java'
575         {
576           'target_name': 'cast_shell_java',
577           'type': 'none',
578           'dependencies': [
579             '<(android_support_v13_target)',
580             'cast_base_java',
581             'cast_shell_manifest',
582             '../base/base.gyp:base_java',
583             '../components/components.gyp:external_video_surface_java',
584             '../content/content.gyp:content_java',
585             '../media/media.gyp:media_java',
586             '../net/net.gyp:net_java',
587             '../ui/android/ui_android.gyp:ui_java',
588           ],
589           'variables': {
590             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
591             'has_java_resources': 1,
592             'java_in_dir': 'browser/android/apk',
593             'resource_dir': 'browser/android/apk/res',
594             'R_package': 'org.chromium.chromecast.shell',
595           },
596           'includes': ['../build/java.gypi'],
597         },  # end of target 'cast_shell_java'
598         {
599           'target_name': 'cast_shell_manifest',
600           'type': 'none',
601           'variables': {
602             'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
603             'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
604           },
605           'includes': [ '../build/android/jinja_template.gypi' ],
606         },
607         {
608           'target_name': 'cast_shell_apk',
609           'type': 'none',
610           'dependencies': [
611             'cast_shell_java',
612             'libcast_shell_android',
613           ],
614           'variables': {
615             'apk_name': 'CastShell',
616             'manifest_package_name': 'org.chromium.chromecast.shell',
617             # Note(gunsch): there are no Java files in the android/ directory.
618             # Unfortunately, the java_apk.gypi target rigidly insists on having
619             # a java_in_dir directory, but complains about duplicate classes
620             # from the common cast_shell_java target (shared with internal APK)
621             # if the actual Java path is used.
622             # This will hopefully be removable after the great GN migration.
623             'java_in_dir': 'android',
624             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
625             'package_name': 'org.chromium.chromecast.shell',
626             'native_lib_target': 'libcast_shell_android',
627             'asset_location': '<(PRODUCT_DIR)/assets',
628             'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
629           },
630           'includes': [ '../build/java_apk.gypi' ],
631         },
632         {
633           'target_name': 'cast_jni_headers',
634           'type': 'none',
635           'sources': [
636             'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
637             'base/java/src/org/chromium/chromecast/base/DumpstateWriter.java',
638             'base/java/src/org/chromium/chromecast/base/SystemTimeChangeNotifierAndroid.java',
639             'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
640             'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
641             'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
642             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
643             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
644           ],
645           'direct_dependent_settings': {
646             'include_dirs': [
647               '<(SHARED_INTERMEDIATE_DIR)/chromecast',
648             ],
649           },
650           'variables': {
651             'jni_gen_package': 'chromecast',
652           },
653           'includes': [ '../build/jni_generator.gypi' ],
654         },
655       ],  # end of targets
656     }, {  # OS != "android"
657       'targets': [
658         {
659           'target_name': 'cast_shell_media',
660           'type': '<(component)',
661           'dependencies': [
662             'cast_public_api',
663             'media/media.gyp:cast_media',
664             '../content/content.gyp:content',
665             '../ipc/ipc.gyp:ipc',
666             '../media/media.gyp:media',
667           ],
668           'sources': [
669             'browser/media/cast_browser_cdm_factory.cc',
670             'browser/media/cast_browser_cdm_factory.h',
671             'browser/media/cma_message_filter_host.cc',
672             'browser/media/cma_message_filter_host.h',
673             'browser/media/media_pipeline_host.cc',
674             'browser/media/media_pipeline_host.h',
675             'common/media/cma_ipc_common.h',
676             'common/media/cma_messages.h',
677             'common/media/cma_message_generator.cc',
678             'common/media/cma_message_generator.h',
679             'common/media/cma_param_traits.cc',
680             'common/media/cma_param_traits.h',
681             'common/media/shared_memory_chunk.cc',
682             'common/media/shared_memory_chunk.h',
683             'renderer/media/audio_pipeline_proxy.cc',
684             'renderer/media/audio_pipeline_proxy.h',
685             'renderer/media/chromecast_media_renderer_factory.cc',
686             'renderer/media/chromecast_media_renderer_factory.h',
687             'renderer/media/cma_message_filter_proxy.cc',
688             'renderer/media/cma_message_filter_proxy.h',
689             'renderer/media/media_channel_proxy.cc',
690             'renderer/media/media_channel_proxy.h',
691             'renderer/media/media_pipeline_proxy.cc',
692             'renderer/media/media_pipeline_proxy.h',
693             'renderer/media/video_pipeline_proxy.cc',
694             'renderer/media/video_pipeline_proxy.h',
695           ],
696         },  # end of target 'cast_shell_media'
697         # This target contains all of the primary code of |cast_shell|, except
698         # for |main|. This allows end-to-end tests using |cast_shell|.
699         # This also includes all targets that cannot be built on Android.
700         {
701           'target_name': 'cast_shell_core',
702           'type': '<(component)',
703           'dependencies': [
704             'cast_shell_media',
705             'cast_shell_common',
706             'media/media.gyp:cast_media',
707           ],
708           'conditions': [
709             ['ozone_platform_egltest==1', {
710               'dependencies': [
711                 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
712               ],
713             }],
714           ],
715         },
716         {
717           'target_name': 'cast_shell',
718           'type': 'executable',
719           'dependencies': [
720             'cast_shell_core',
721           ],
722           'sources': [
723             'app/cast_main.cc',
724           ],
725           'ldflags': [
726             # Allow  OEMs to override default libraries that are shipped with
727             # cast receiver package by installed OEM-specific libraries in
728             # /oem_cast_shlib.
729             '-Wl,-rpath=/oem_cast_shlib',
730             # TODO(dougsteed): remove when Chromecast moves to boringssl.
731             # Allow the cast shell to find the NSS module in the same
732             # directory.
733             '-Wl,-rpath=\$$ORIGIN'
734           ],
735         },
736       ],  # end of targets
737     }],
738     ['enable_default_cast_graphics==1', {
739       'targets': [
740         {
741           'target_name': 'libcast_graphics_1.0',
742           'type': 'shared_library',
743           'dependencies': [
744             'cast_public_api'
745           ],
746           'sources': [
747             'graphics/cast_egl_platform_default.cc',
748             'graphics/graphics_properties_default.cc',
749             'graphics/osd_plane_default.cc'
750           ],
751         }
752       ]
753     }],
754   ],  # end of conditions