Remove 1 ms rounding up of task delays on Windows
[chromium-blink-merge.git] / chromecast / chromecast.gyp
blob87ead52fecee3bb8c4e9ca748e570b94be18bea3
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             ],
259             'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
260           },
261           'includes': [ '../build/repack_action.gypi' ],
262         },
263       ],
264       'conditions': [
265         ['chromecast_branding!="public" and use_chromecast_webui==1', {
266           'dependencies': [
267             'internal/chromecast_resources.gyp:chromecast_app_resources',
268             'internal/chromecast_resources.gyp:chromecast_webui_resources',
269           ],
270         }],
271       ],
272     },  # end of target 'cast_shell_pak'
273     # This target contains all content-embedder implementation that is
274     # non-platform-specific.
275     {
276       'target_name': 'cast_shell_common',
277       'type': '<(component)',
278       'dependencies': [
279         'cast_base',
280         'cast_crash_client',
281         'cast_net',
282         'cast_shell_pak',
283         'cast_shell_resources',
284         'cast_sys_info',
285         'cast_version_header',
286         'chromecast_locales.gyp:chromecast_locales_pak',
287         'chromecast_locales.gyp:chromecast_settings',
288         'media/media.gyp:media_base',
289         'media/media.gyp:media_cdm',
290         '../base/base.gyp:base',
291         '../components/components.gyp:breakpad_host',
292         '../components/components.gyp:cdm_renderer',
293         '../components/components.gyp:component_metrics_proto',
294         '../components/components.gyp:crash_component',
295         '../components/components.gyp:devtools_discovery',
296         '../components/components.gyp:devtools_http_handler',
297         '../components/components.gyp:network_hints_browser',
298         '../components/components.gyp:network_hints_renderer',
299         '../components/components.gyp:metrics',
300         '../components/components.gyp:metrics_gpu',
301         '../components/components.gyp:metrics_net',
302         '../components/components.gyp:metrics_profiler',
303         '../content/content.gyp:content',
304         '../content/content.gyp:content_app_both',
305         '../skia/skia.gyp:skia',
306         '../third_party/WebKit/public/blink.gyp:blink',
307         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
308       ],
309       'sources': [
310         'app/cast_main_delegate.cc',
311         'app/cast_main_delegate.h',
312         'browser/android/cast_window_android.cc',
313         'browser/android/cast_window_android.h',
314         'browser/android/cast_window_manager.cc',
315         'browser/android/cast_window_manager.h',
316         'browser/cast_browser_context.cc',
317         'browser/cast_browser_context.h',
318         'browser/cast_browser_main_parts.cc',
319         'browser/cast_browser_main_parts.h',
320         'browser/cast_browser_process.cc',
321         'browser/cast_browser_process.h',
322         'browser/cast_content_browser_client.cc',
323         'browser/cast_content_browser_client.h',
324         'browser/cast_content_window.cc',
325         'browser/cast_content_window.h',
326         'browser/cast_download_manager_delegate.cc',
327         'browser/cast_download_manager_delegate.h',
328         'browser/cast_http_user_agent_settings.cc',
329         'browser/cast_http_user_agent_settings.h',
330         'browser/cast_net_log.cc',
331         'browser/cast_net_log.h',
332         'browser/cast_network_delegate.cc',
333         'browser/cast_network_delegate.h',
334         'browser/cast_permission_manager.cc',
335         'browser/cast_permission_manager.h',
336         'browser/cast_quota_permission_context.cc',
337         'browser/cast_quota_permission_context.h',
338         'browser/cast_resource_dispatcher_host_delegate.cc',
339         'browser/cast_resource_dispatcher_host_delegate.h',
340         'browser/devtools/cast_dev_tools_delegate.cc',
341         'browser/devtools/cast_dev_tools_delegate.h',
342         'browser/devtools/remote_debugging_server.cc',
343         'browser/devtools/remote_debugging_server.h',
344         'browser/geolocation/cast_access_token_store.cc',
345         'browser/geolocation/cast_access_token_store.h',
346         'browser/media/cast_media_client_android.cc',
347         'browser/media/cast_media_client_android.h',
348         'browser/metrics/cast_metrics_prefs.cc',
349         'browser/metrics/cast_metrics_prefs.h',
350         'browser/metrics/cast_metrics_service_client.cc',
351         'browser/metrics/cast_metrics_service_client.h',
352         'browser/metrics/cast_stability_metrics_provider.cc',
353         'browser/metrics/cast_stability_metrics_provider.h',
354         'browser/pref_service_helper.cc',
355         'browser/pref_service_helper.h',
356         'browser/service/cast_service.cc',
357         'browser/service/cast_service.h',
358         'browser/url_request_context_factory.cc',
359         'browser/url_request_context_factory.h',
360         'common/cast_content_client.cc',
361         'common/cast_content_client.h',
362         'common/cast_resource_delegate.cc',
363         'common/cast_resource_delegate.h',
364         'common/media/cast_messages.h',
365         'common/media/cast_message_generator.cc',
366         'common/media/cast_message_generator.h',
367         'common/platform_client_auth.h',
368         'renderer/cast_content_renderer_client.cc',
369         'renderer/cast_content_renderer_client.h',
370         'renderer/cast_media_load_deferrer.cc',
371         'renderer/cast_media_load_deferrer.h',
372         'renderer/cast_render_process_observer.cc',
373         'renderer/cast_render_process_observer.h',
374         'renderer/key_systems_cast.cc',
375         'renderer/key_systems_cast.h',
376         'renderer/media/capabilities_message_filter.cc',
377         'renderer/media/capabilities_message_filter.h',
378       ],
379       'conditions': [
380         ['chromecast_branding!="public"', {
381           'dependencies': [
382             'internal/chromecast_internal.gyp:cast_shell_internal',
383           ],
384         }, {
385           'sources': [
386             'browser/cast_content_browser_client_simple.cc',
387             'browser/cast_network_delegate_simple.cc',
388             'browser/devtools/remote_debugging_server_simple.cc',
389             'browser/pref_service_helper_simple.cc',
390             'browser/service/cast_service_android.cc',
391             'browser/service/cast_service_android.h',
392             'common/platform_client_auth_simple.cc',
393             'renderer/cast_content_renderer_client_simple.cc',
394           ],
395           'conditions': [
396             ['OS!="android"', {
397               'sources': [
398                 'browser/media/cast_browser_cdm_factory_simple.cc',
399                 'browser/service/cast_service_simple.cc',
400                 'browser/service/cast_service_simple.h',
401               ],
402             }],
403           ],
404         }],
405         # ExternalMetrics not necessary on Android and (as of this writing) uses
406         # non-portable filesystem operations. Also webcrypto is not used on
407         # Android either.
408         ['OS=="linux"', {
409           'sources': [
410             'browser/metrics/external_metrics.cc',
411             'browser/metrics/external_metrics.h',
412             'graphics/cast_screen.cc',
413             'graphics/cast_screen.h',
414           ],
415           'dependencies': [
416             '../components/components.gyp:metrics_serialization',
417           ],
418         }],
419         ['OS=="android"', {
420           'dependencies': [
421             '../components/components.gyp:cdm_browser',
422             '../components/components.gyp:external_video_surface',
423             'cast_jni_headers',
424           ],
425         }],
426       ],
427     },
428     {
429       'target_name': 'cast_sys_info',
430       'type': '<(component)',
431       'dependencies': [
432         'cast_public_api',
433         '../base/base.gyp:base',
434       ],
435       'sources': [
436         'base/cast_sys_info_util.h',
437         'base/cast_sys_info_dummy.cc',
438         'base/cast_sys_info_dummy.h',
439         'base/cast_sys_info_android.cc',
440         'base/cast_sys_info_android.h',
441       ],
442       'conditions': [
443         ['OS=="android"', {
444           'dependencies': [
445             'cast_jni_headers',
446           ],
447         }],
448         ['chromecast_branding=="public" and OS!="android"', {
449           'sources': [
450             'base/cast_sys_info_util_simple.cc',
451           ],
452         }],
453       ],
454     },  # end of target 'cast_sys_info'
455     {
456       'target_name': 'cast_version_header',
457       'type': 'none',
458       'direct_dependent_settings': {
459         'include_dirs': [
460           '<(SHARED_INTERMEDIATE_DIR)',
461         ],
462       },
463       'actions': [
464         {
465           'action_name': 'version_header',
466           'message': 'Generating version header file: <@(_outputs)',
467           'inputs': [
468             '<(version_path)',
469             'base/version.h.in',
470           ],
471           'outputs': [
472             '<(SHARED_INTERMEDIATE_DIR)/chromecast/base/version.h',
473           ],
474           'action': [
475             'python',
476             '<(version_py_path)',
477             '-e', 'VERSION_FULL="<(version_full)"',
478             # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
479             # otherwise, a dev string is used.
480             '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
481             # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
482             # otherwise, a dev string is used.
483             '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
484             '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" or <(cast_is_debug_build) == 1 else 0',
485             '-e', 'CAST_PRODUCT_TYPE=<(cast_product_type)',
486             'base/version.h.in',
487             '<@(_outputs)',
488           ],
489           'includes': [
490             '../build/util/version.gypi',
491           ],
492         },
493       ],
494     },
495   ],  # end of targets
497   # Targets for Android receiver.
498   'conditions': [
499     ['OS=="android"', {
500       'targets': [
501         {
502           'target_name': 'cast_shell_icudata',
503           'type': 'none',
504           'dependencies': [
505             '../third_party/icu/icu.gyp:icudata',
506             '../v8/tools/gyp/v8.gyp:v8_external_snapshot',
507           ],
508           'copies': [{
509             'destination': '<(PRODUCT_DIR)/assets',
510             'files': [
511               '<(PRODUCT_DIR)/icudtl.dat',
512               '<(PRODUCT_DIR)/natives_blob.bin',
513               '<(PRODUCT_DIR)/snapshot_blob.bin',
514             ],
515           }],
516         },
517         {
518           'target_name': 'libcast_shell_android',
519           'type': 'shared_library',
520           'dependencies': [
521             'cast_jni_headers',
522             'cast_shell_common',
523             'cast_shell_icudata',
524             'cast_shell_pak',
525             'cast_version_header',
526             '../base/base.gyp:base',
527             '../components/components.gyp:breakpad_host',
528             '../content/content.gyp:content',
529             '../skia/skia.gyp:skia',
530             '../ui/gfx/gfx.gyp:gfx',
531             '../ui/gl/gl.gyp:gl',
532           ],
533           'sources': [
534             'android/cast_jni_registrar.cc',
535             'android/cast_jni_registrar.h',
536             'android/cast_metrics_helper_android.cc',
537             'android/cast_metrics_helper_android.h',
538             'android/platform_jni_loader.h',
539             'app/android/cast_jni_loader.cc',
540           ],
541           'conditions': [
542             ['chromecast_branding!="public"', {
543               'dependencies': [
544                 'internal/chromecast_internal.gyp:cast_shell_android_internal'
545               ],
546             }, {
547               'sources': [
548                 'android/platform_jni_loader_stub.cc',
549               ],
550             }]
551           ],
552         },  # end of target 'libcast_shell_android'
553         {
554           'target_name': 'cast_base_java',
555           'type': 'none',
556           'dependencies': [
557             '../base/base.gyp:base_java',
558           ],
559           'variables': {
560             'android_manifest_path': 'android/AndroidManifest.xml',
561             'java_in_dir': 'base/java',
562           },
563           'includes': ['../build/java.gypi'],
564         },  # end of target 'cast_base_java'
565         {
566           'target_name': 'cast_shell_java',
567           'type': 'none',
568           'dependencies': [
569             '<(android_support_v13_target)',
570             'cast_base_java',
571             'cast_shell_manifest',
572             '../base/base.gyp:base_java',
573             '../components/components.gyp:external_video_surface_java',
574             '../content/content.gyp:content_java',
575             '../media/media.gyp:media_java',
576             '../net/net.gyp:net_java',
577             '../ui/android/ui_android.gyp:ui_java',
578           ],
579           'variables': {
580             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
581             'has_java_resources': 1,
582             'java_in_dir': 'browser/android/apk',
583             'resource_dir': 'browser/android/apk/res',
584             'R_package': 'org.chromium.chromecast.shell',
585           },
586           'includes': ['../build/java.gypi'],
587         },  # end of target 'cast_shell_java'
588         {
589           'target_name': 'cast_shell_manifest',
590           'type': 'none',
591           'variables': {
592             'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
593             'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
594           },
595           'includes': [ '../build/android/jinja_template.gypi' ],
596         },
597         {
598           'target_name': 'cast_shell_apk',
599           'type': 'none',
600           'dependencies': [
601             'cast_shell_java',
602             'libcast_shell_android',
603           ],
604           'variables': {
605             'apk_name': 'CastShell',
606             'manifest_package_name': 'org.chromium.chromecast.shell',
607             # Note(gunsch): there are no Java files in the android/ directory.
608             # Unfortunately, the java_apk.gypi target rigidly insists on having
609             # a java_in_dir directory, but complains about duplicate classes
610             # from the common cast_shell_java target (shared with internal APK)
611             # if the actual Java path is used.
612             # This will hopefully be removable after the great GN migration.
613             'java_in_dir': 'android',
614             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
615             'package_name': 'org.chromium.chromecast.shell',
616             'native_lib_target': 'libcast_shell_android',
617             'asset_location': '<(PRODUCT_DIR)/assets',
618             'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
619           },
620           'includes': [ '../build/java_apk.gypi' ],
621         },
622         {
623           'target_name': 'cast_jni_headers',
624           'type': 'none',
625           'sources': [
626             'base/java/src/org/chromium/chromecast/base/ChromecastConfigAndroid.java',
627             'base/java/src/org/chromium/chromecast/base/DumpstateWriter.java',
628             'base/java/src/org/chromium/chromecast/base/SystemTimeChangeNotifierAndroid.java',
629             'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
630             'browser/android/apk/src/org/chromium/chromecast/shell/CastMetricsHelper.java',
631             'browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java',
632             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
633             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
634           ],
635           'direct_dependent_settings': {
636             'include_dirs': [
637               '<(SHARED_INTERMEDIATE_DIR)/chromecast',
638             ],
639           },
640           'variables': {
641             'jni_gen_package': 'chromecast',
642           },
643           'includes': [ '../build/jni_generator.gypi' ],
644         },
645       ],  # end of targets
646     }, {  # OS != "android"
647       'targets': [
648         {
649           'target_name': 'cast_shell_media',
650           'type': '<(component)',
651           'dependencies': [
652             'cast_public_api',
653             'media/media.gyp:cast_media',
654             '../content/content.gyp:content',
655             '../ipc/ipc.gyp:ipc',
656             '../media/media.gyp:media',
657           ],
658           'sources': [
659             'browser/media/cast_browser_cdm_factory.cc',
660             'browser/media/cast_browser_cdm_factory.h',
661             'browser/media/cma_message_filter_host.cc',
662             'browser/media/cma_message_filter_host.h',
663             'browser/media/media_pipeline_host.cc',
664             'browser/media/media_pipeline_host.h',
665             'common/media/cma_ipc_common.h',
666             'common/media/cma_messages.h',
667             'common/media/cma_message_generator.cc',
668             'common/media/cma_message_generator.h',
669             'common/media/cma_param_traits.cc',
670             'common/media/cma_param_traits.h',
671             'common/media/shared_memory_chunk.cc',
672             'common/media/shared_memory_chunk.h',
673             'renderer/media/audio_pipeline_proxy.cc',
674             'renderer/media/audio_pipeline_proxy.h',
675             'renderer/media/chromecast_media_renderer_factory.cc',
676             'renderer/media/chromecast_media_renderer_factory.h',
677             'renderer/media/cma_message_filter_proxy.cc',
678             'renderer/media/cma_message_filter_proxy.h',
679             'renderer/media/media_channel_proxy.cc',
680             'renderer/media/media_channel_proxy.h',
681             'renderer/media/media_pipeline_proxy.cc',
682             'renderer/media/media_pipeline_proxy.h',
683             'renderer/media/video_pipeline_proxy.cc',
684             'renderer/media/video_pipeline_proxy.h',
685           ],
686         },  # end of target 'cast_shell_media'
687         # This target contains all of the primary code of |cast_shell|, except
688         # for |main|. This allows end-to-end tests using |cast_shell|.
689         # This also includes all targets that cannot be built on Android.
690         {
691           'target_name': 'cast_shell_core',
692           'type': '<(component)',
693           'dependencies': [
694             'cast_shell_media',
695             'cast_shell_common',
696             'media/media.gyp:cast_media',
697           ],
698           'conditions': [
699             ['ozone_platform_egltest==1', {
700               'dependencies': [
701                 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
702               ],
703             }],
704           ],
705         },
706         {
707           'target_name': 'cast_shell',
708           'type': 'executable',
709           'dependencies': [
710             'cast_shell_core',
711           ],
712           'sources': [
713             'app/cast_main.cc',
714           ],
715           'ldflags': [
716             # Allow  OEMs to override default libraries that are shipped with
717             # cast receiver package by installed OEM-specific libraries in
718             # /oem_cast_shlib.
719             '-Wl,-rpath=/oem_cast_shlib',
720             # TODO(dougsteed): remove when Chromecast moves to boringssl.
721             # Allow the cast shell to find the NSS module in the same
722             # directory.
723             '-Wl,-rpath=\$$ORIGIN'
724           ],
725         },
726       ],  # end of targets
727     }],
728     ['enable_default_cast_graphics==1', {
729       'targets': [
730         {
731           'target_name': 'libcast_graphics_1.0',
732           'type': 'shared_library',
733           'dependencies': [
734             'cast_public_api'
735           ],
736           'sources': [
737             'graphics/cast_egl_platform_default.cc',
738             'graphics/graphics_properties_default.cc',
739             'graphics/osd_plane_default.cc'
740           ],
741         }
742       ]
743     }],
744   ],  # end of conditions