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