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