[Telemetry] Update facebook credential & re-record the facebook page in top_7_stress...
[chromium-blink-merge.git] / chromecast / chromecast.gyp
blobf5bf73d1b9d1bef1e239f2cdbe781fcf8d81f4c4
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     'chromium_code': 1,
11     'chromecast_branding%': 'Chromium',
12     'disable_display%': 0,
13     'use_chromecast_webui%': 0,
14   },
15   'includes': [
16     'chromecast_tests.gypi',
17   ],
18   'target_defaults': {
19     'include_dirs': [
20       '..',  # Root of Chromium checkout
21     ],
22     'conditions': [
23       ['disable_display==1', {
24         'defines': ['DISABLE_DISPLAY'],
25       }],
26     ],
27   },
28   'targets': [
29     # TODO(gunsch): Remove this fake target once it's either added or no
30     # longer referenced from internal code.
31     {'target_name': 'cast_media_audio', 'type': 'none'},
33     {
34       'target_name': 'cast_base',
35       'type': '<(component)',
36       'dependencies': [
37         '../base/base.gyp:base',
38       ],
39       'sources': [
40         'base/metrics/cast_histograms.h',
41         'base/metrics/cast_metrics_helper.cc',
42         'base/metrics/cast_metrics_helper.h',
43         'base/metrics/grouped_histogram.cc',
44         'base/metrics/grouped_histogram.h'
45       ],
46     },  # end of target 'cast_base'
47     {
48       'target_name': 'cast_crash_client',
49       'type': '<(component)',
50       'dependencies': [
51         '../breakpad/breakpad.gyp:breakpad_client',
52         '../components/components.gyp:crash_component',
53       ],
54       'sources': [
55         'crash/cast_crash_keys.cc',
56         'crash/cast_crash_keys.h',
57         'crash/cast_crash_reporter_client.cc',
58         'crash/cast_crash_reporter_client.h',
59       ],
60       'conditions': [
61         ['chromecast_branding=="Chrome"', {
62           'dependencies': [
63             '<(cast_internal_gyp):crash_internal',
64           ],
65         }, {
66           'sources': [
67             'crash/cast_crash_reporter_client_simple.cc',
68           ],
69         }],
70       ]
71     },  # end of target 'cast_crash_client'
72     {
73       'target_name': 'cast_net',
74       'type': '<(component)',
75       'sources': [
76         'net/connectivity_checker.cc',
77         'net/connectivity_checker.h',
78         'net/net_switches.cc',
79         'net/net_switches.h',
80         'net/network_change_notifier_cast.cc',
81         'net/network_change_notifier_cast.h',
82         'net/network_change_notifier_factory_cast.cc',
83         'net/network_change_notifier_factory_cast.h',
84       ],
85     },
86     {
87       'target_name': 'cast_shell_resources',
88       'type': 'none',
89       'variables': {
90         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
91       },
92       'actions': [
93         {
94           'action_name': 'cast_shell_resources',
95           'variables': {
96             'grit_grd_file': 'app/resources/shell_resources.grd',
97             'grit_resource_ids': 'app/resources/resource_ids',
98           },
99           'includes': [ '../build/grit_action.gypi' ],
100         },
101       ],
102       'includes': [ '../build/grit_target.gypi' ],
103     },
104     {
105       'target_name': 'cast_shell_pak',
106       'type': 'none',
107       'dependencies': [
108         'cast_shell_resources',
109         '../content/app/resources/content_resources.gyp:content_resources',
110         '../content/app/strings/content_strings.gyp:content_strings',
111         '../net/net.gyp:net_resources',
112         '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
113         '../ui/resources/ui_resources.gyp:ui_resources',
114         '../ui/strings/ui_strings.gyp:ui_strings',
115       ],
116       'actions': [
117         {
118           'action_name': 'repack_cast_shell_pak',
119           'variables': {
120             'pak_inputs': [
121               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
122               '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
123               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
124               '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
125               '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
126               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
127               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
128               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
129               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
130               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
131             ],
132             'conditions': [
133               ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
134                 'pak_inputs': [
135                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/app_resources.pak',
136                   '<(SHARED_INTERMEDIATE_DIR)/chromecast/cast_webui_resources.pak',
137                 ],
138               }],
139             ],
140             'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
141           },
142           'includes': [ '../build/repack_action.gypi' ],
143         },
144       ],
145       'conditions': [
146         ['chromecast_branding=="Chrome" and use_chromecast_webui==1', {
147           'dependencies': [
148             'internal/chromecast_resources.gyp:chromecast_app_resources',
149             'internal/chromecast_resources.gyp:chromecast_webui_resources',
150           ],
151         }],
152       ],
153     },  # end of target 'cast_shell_pak'
154     # This target contains all content-embedder implementation that is
155     # non-platform-specific.
156     {
157       'target_name': 'cast_shell_common',
158       'type': '<(component)',
159       'dependencies': [
160         'cast_base',
161         'cast_crash_client',
162         'cast_net',
163         'cast_shell_pak',
164         'cast_shell_resources',
165         'cast_version_header',
166         'chromecast_locales.gyp:chromecast_locales_pak',
167         'chromecast_locales.gyp:chromecast_settings',
168         'media/media.gyp:media_base',
169         '../base/base.gyp:base',
170         '../components/components.gyp:breakpad_host',
171         '../components/components.gyp:cdm_renderer',
172         '../components/components.gyp:component_metrics_proto',
173         '../components/components.gyp:crash_component',
174         '../components/components.gyp:network_hints_browser',
175         '../components/components.gyp:network_hints_renderer',
176         '../components/components.gyp:metrics',
177         '../components/components.gyp:metrics_gpu',
178         '../components/components.gyp:metrics_net',
179         '../components/components.gyp:metrics_profiler',
180         '../content/content.gyp:content',
181         '../content/content.gyp:content_app_browser',
182         '../skia/skia.gyp:skia',
183         '../third_party/WebKit/public/blink.gyp:blink',
184         '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h',
185       ],
186       'sources': [
187         'app/cast_main_delegate.cc',
188         'app/cast_main_delegate.h',
189         'browser/cast_browser_context.cc',
190         'browser/cast_browser_context.h',
191         'browser/cast_browser_main_parts.cc',
192         'browser/cast_browser_main_parts.h',
193         'browser/cast_browser_process.cc',
194         'browser/cast_browser_process.h',
195         'browser/cast_content_browser_client.cc',
196         'browser/cast_content_browser_client.h',
197         'browser/cast_content_window.cc',
198         'browser/cast_content_window.h',
199         'browser/cast_download_manager_delegate.cc',
200         'browser/cast_download_manager_delegate.h',
201         'browser/cast_http_user_agent_settings.cc',
202         'browser/cast_http_user_agent_settings.h',
203         'browser/cast_network_delegate.cc',
204         'browser/cast_network_delegate.h',
205         'browser/cast_resource_dispatcher_host_delegate.cc',
206         'browser/cast_resource_dispatcher_host_delegate.h',
207         'browser/devtools/cast_dev_tools_delegate.cc',
208         'browser/devtools/cast_dev_tools_delegate.h',
209         'browser/devtools/remote_debugging_server.cc',
210         'browser/devtools/remote_debugging_server.h',
211         'browser/geolocation/cast_access_token_store.cc',
212         'browser/geolocation/cast_access_token_store.h',
213         'browser/metrics/cast_metrics_prefs.cc',
214         'browser/metrics/cast_metrics_prefs.h',
215         'browser/metrics/cast_metrics_service_client.cc',
216         'browser/metrics/cast_metrics_service_client.h',
217         'browser/metrics/cast_stability_metrics_provider.cc',
218         'browser/metrics/cast_stability_metrics_provider.h',
219         'browser/metrics/platform_metrics_providers.h',
220         'browser/pref_service_helper.cc',
221         'browser/pref_service_helper.h',
222         'browser/service/cast_service.cc',
223         'browser/service/cast_service.h',
224         'browser/url_request_context_factory.cc',
225         'browser/url_request_context_factory.h',
226         'common/cast_content_client.cc',
227         'common/cast_content_client.h',
228         'common/cast_paths.cc',
229         'common/cast_paths.h',
230         'common/cast_resource_delegate.cc',
231         'common/cast_resource_delegate.h',
232         'common/chromecast_switches.cc',
233         'common/chromecast_switches.h',
234         'common/platform_client_auth.h',
235         'common/pref_names.cc',
236         'common/pref_names.h',
237         'renderer/cast_content_renderer_client.cc',
238         'renderer/cast_content_renderer_client.h',
239         'renderer/cast_media_load_deferrer.cc',
240         'renderer/cast_media_load_deferrer.h',
241         'renderer/cast_render_process_observer.cc',
242         'renderer/cast_render_process_observer.h',
243         'renderer/key_systems_cast.cc',
244         'renderer/key_systems_cast.h',
245       ],
246       'conditions': [
247         ['chromecast_branding=="Chrome"', {
248           'dependencies': [
249             '<(cast_internal_gyp):cast_shell_internal',
250           ],
251         }, {
252           'sources': [
253             'browser/cast_content_browser_client_simple.cc',
254             'browser/cast_network_delegate_simple.cc',
255             'browser/devtools/remote_debugging_server_simple.cc',
256             'browser/media/cast_browser_cdm_factory_simple.cc',
257             'browser/metrics/platform_metrics_providers_simple.cc',
258             'browser/pref_service_helper_simple.cc',
259             'common/platform_client_auth_simple.cc',
260             'renderer/cast_content_renderer_client_simple.cc',
261             'renderer/key_systems_cast_simple.cc',
262           ],
263           'conditions': [
264             ['OS=="android"', {
265               'sources': [
266                 'browser/service/cast_service_android.cc',
267                 'browser/service/cast_service_android.h',
268               ],
269             }, {
270               'sources': [
271                 'browser/service/cast_service_simple.cc',
272                 'browser/service/cast_service_simple.h',
273               ],
274             }],
275           ],
276         }],
277         # ExternalMetrics not necessary on Android and (as of this writing) uses
278         # non-portable filesystem operations. Also webcrypto is not used on
279         # Android either.
280         ['OS=="linux"', {
281           'sources': [
282             'browser/metrics/external_metrics.cc',
283             'browser/metrics/external_metrics.h',
284           ],
285           'dependencies': [
286             '../components/components.gyp:metrics_serialization',
287           ],
288         }],
289       ],
290     },
291     {
292       'target_name': 'cast_version_header',
293       'type': 'none',
294       'direct_dependent_settings': {
295         'include_dirs': [
296           '<(SHARED_INTERMEDIATE_DIR)',
297         ],
298       },
299       'actions': [
300         {
301           'action_name': 'version_header',
302           'message': 'Generating version header file: <@(_outputs)',
303           'inputs': [
304             '<(version_path)',
305             'common/version.h.in',
306           ],
307           'outputs': [
308             '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
309           ],
310           'action': [
311             'python',
312             '<(version_py_path)',
313             '-e', 'VERSION_FULL="<(version_full)"',
314             # CAST_BUILD_INCREMENTAL is taken from buildbot if available;
315             # otherwise, a dev string is used.
316             '-e', 'CAST_BUILD_INCREMENTAL="<!(echo ${CAST_BUILD_INCREMENTAL:="<!(date +%Y%m%d.%H%M%S)"})"',
317             # CAST_BUILD_RELEASE is taken from cast_build_release file if exist;
318             # otherwise, a dev string is used.
319             '-e', 'CAST_BUILD_RELEASE="<!(if test -f <(cast_build_release); then cat <(cast_build_release); else echo eng.${USER}; fi)"',
320             '-e', 'CAST_IS_DEBUG_BUILD=1 if "<(CONFIGURATION_NAME)" == "Debug" else 0',
321             'common/version.h.in',
322             '<@(_outputs)',
323           ],
324           'includes': [
325             '../build/util/version.gypi',
326           ],
327         },
328       ],
329     },
330   ],  # end of targets
332   # Targets for Android receiver.
333   'conditions': [
334     ['OS=="android"', {
335       'targets': [
336         {
337           'target_name': 'cast_shell_icudata',
338           'type': 'none',
339           'dependencies': [
340             '../third_party/icu/icu.gyp:icudata',
341           ],
342           'copies': [{
343             'destination': '<(PRODUCT_DIR)/assets',
344             'files': ['<(PRODUCT_DIR)/icudtl.dat'],
345           }],
346         },
347         {
348           'target_name': 'libcast_shell_android',
349           'type': 'shared_library',
350           'dependencies': [
351             'cast_jni_headers',
352             'cast_shell_common',
353             'cast_shell_icudata',
354             'cast_shell_pak',
355             'cast_version_header',
356             '../base/base.gyp:base',
357             '../breakpad/breakpad.gyp:breakpad_client',
358             '../components/components.gyp:breakpad_host',
359             '../components/components.gyp:crash_component',
360             '../content/content.gyp:content_app_browser',
361             '../content/content.gyp:content',
362             '../skia/skia.gyp:skia',
363             '../ui/gfx/gfx.gyp:gfx',
364             '../ui/gl/gl.gyp:gl',
365           ],
366           'include_dirs': [
367             '../breakpad/src',
368           ],
369           'sources': [
370             'android/cast_jni_registrar.cc',
371             'android/cast_jni_registrar.h',
372             'android/chromecast_config_android.cc',
373             'android/chromecast_config_android.h',
374             'android/platform_jni_loader.h',
375             'app/android/cast_jni_loader.cc',
376             'browser/android/cast_window_android.cc',
377             'browser/android/cast_window_android.h',
378             'browser/android/cast_window_manager.cc',
379             'browser/android/cast_window_manager.h',
380             'browser/android/external_video_surface_container_impl.cc',
381             'browser/android/external_video_surface_container_impl.h',
382             'crash/android/cast_crash_reporter_client_android.cc',
383             'crash/android/cast_crash_reporter_client_android.h',
384             'crash/android/crash_handler.cc',
385             'crash/android/crash_handler.h',
386           ],
387           'conditions': [
388             ['chromecast_branding=="Chrome"', {
389               'dependencies': [
390                 '<(cast_internal_gyp):cast_shell_android_internal'
391               ],
392             }, {
393               'sources': [
394                 'android/chromecast_config_android_stub.cc',
395                 'android/platform_jni_loader_stub.cc',
396               ],
397             }]
398           ],
399         },  # end of target 'libcast_shell_android'
400         {
401           'target_name': 'cast_shell_java',
402           'type': 'none',
403           'dependencies': [
404             '<(android_support_v13_target)',
405             '../base/base.gyp:base_java',
406             '../content/content.gyp:content_java',
407             '../media/media.gyp:media_java',
408             '../net/net.gyp:net_java',
409             '../ui/android/ui_android.gyp:ui_java',
410           ],
411           'variables': {
412             'has_java_resources': 1,
413             'java_in_dir': 'browser/android/apk',
414             'resource_dir': 'browser/android/apk/res',
415             'R_package': 'org.chromium.chromecast.shell',
416           },
417           'includes': ['../build/java.gypi'],
418         },  # end of target 'cast_shell_java'
419         {
420           'target_name': 'cast_shell_manifest',
421           'type': 'none',
422           'variables': {
423             'jinja_inputs': ['browser/android/apk/AndroidManifest.xml.jinja2'],
424             'jinja_output': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
425           },
426           'includes': [ '../build/android/jinja_template.gypi' ],
427         },
428         {
429           'target_name': 'cast_shell_apk',
430           'type': 'none',
431           'dependencies': [
432             'cast_shell_java',
433             'libcast_shell_android',
434           ],
435           'variables': {
436             'apk_name': 'CastShell',
437             'manifest_package_name': 'org.chromium.chromecast.shell',
438             # Note(gunsch): there are no Java files in the android/ directory.
439             # Unfortunately, the java_apk.gypi target rigidly insists on having
440             # a java_in_dir directory, but complains about duplicate classes
441             # from the common cast_shell_java target (shared with internal APK)
442             # if the actual Java path is used.
443             # This will hopefully be removable after the great GN migration.
444             'java_in_dir': 'android',
445             'android_manifest_path': '<(SHARED_INTERMEDIATE_DIR)/cast_shell_manifest/AndroidManifest.xml',
446             'package_name': 'org.chromium.chromecast.shell',
447             'native_lib_target': 'libcast_shell_android',
448             'asset_location': '<(PRODUCT_DIR)/assets',
449             'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
450           },
451           'includes': [ '../build/java_apk.gypi' ],
452         },
453         {
454           'target_name': 'cast_jni_headers',
455           'type': 'none',
456           'sources': [
457             'browser/android/apk/src/org/chromium/chromecast/shell/CastCrashHandler.java',
458             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
459             'browser/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
460             'browser/android/apk/src/org/chromium/chromecast/shell/ExternalVideoSurfaceContainer.java',
461           ],
462           'direct_dependent_settings': {
463             'include_dirs': [
464               '<(SHARED_INTERMEDIATE_DIR)/chromecast',
465             ],
466           },
467           'variables': {
468             'jni_gen_package': 'chromecast',
469           },
470           'includes': [ '../build/jni_generator.gypi' ],
471         },
472       ],  # end of targets
473     }, {  # OS != "android"
474       'targets': [
475         {
476           'target_name': 'cast_shell_media',
477           'type': '<(component)',
478           'dependencies': [
479             'media/media.gyp:cast_media',
480             '../content/content.gyp:content',
481             '../ipc/ipc.gyp:ipc',
482             '../media/media.gyp:media',
483           ],
484           'sources': [
485             'browser/media/cast_browser_cdm_factory.cc',
486             'browser/media/cast_browser_cdm_factory.h',
487             'browser/media/cma_message_filter_host.cc',
488             'browser/media/cma_message_filter_host.h',
489             'browser/media/cma_message_loop.cc',
490             'browser/media/cma_message_loop.h',
491             'browser/media/media_pipeline_host.cc',
492             'browser/media/media_pipeline_host.h',
493             'common/media/cma_ipc_common.h',
494             'common/media/cma_messages.h',
495             'common/media/cma_message_generator.cc',
496             'common/media/cma_message_generator.h',
497             'common/media/cma_param_traits.cc',
498             'common/media/cma_param_traits.h',
499             'common/media/shared_memory_chunk.cc',
500             'common/media/shared_memory_chunk.h',
501             'renderer/media/audio_pipeline_proxy.cc',
502             'renderer/media/audio_pipeline_proxy.h',
503             'renderer/media/cma_media_renderer_factory.cc',
504             'renderer/media/cma_media_renderer_factory.h',
505             'renderer/media/cma_message_filter_proxy.cc',
506             'renderer/media/cma_message_filter_proxy.h',
507             'renderer/media/media_channel_proxy.cc',
508             'renderer/media/media_channel_proxy.h',
509             'renderer/media/media_pipeline_proxy.cc',
510             'renderer/media/media_pipeline_proxy.h',
511             'renderer/media/video_pipeline_proxy.cc',
512             'renderer/media/video_pipeline_proxy.h',
513           ],
514         },  # end of target 'cast_shell_media'
515         # This target contains all of the primary code of |cast_shell|, except
516         # for |main|. This allows end-to-end tests using |cast_shell|.
517         # This also includes all targets that cannot be built on Android.
518         {
519           'target_name': 'cast_shell_core',
520           'type': '<(component)',
521           'dependencies': [
522             'cast_shell_media',
523             'cast_shell_common',
524             'media/media.gyp:cast_media',
525             '../ui/aura/aura.gyp:aura_test_support',
526           ],
527           'conditions': [
528             ['chromecast_branding=="Chrome"', {
529               'dependencies': [
530                 '<(cast_internal_gyp):cast_gfx_internal',
531               ],
532             }, {
533               'dependencies': [
534                 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
535               ],
536             }],
537           ],
538         },
539         {
540           'target_name': 'cast_shell',
541           'type': 'executable',
542           'dependencies': [
543             'cast_shell_core',
544           ],
545           'sources': [
546             'app/cast_main.cc',
547           ],
548           # TODO(dougsteed): remove when Chromecast moves to boringssl.
549           # Allow the cast shell to find the NSS module in the same directory.
550           'ldflags': [
551             '-Wl,-rpath=\$$ORIGIN'
552           ],
553         },
554       ],  # end of targets
555     }],
556   ],  # end of conditions