Do not create proxy hosts in the subtree of navigating frame.
[chromium-blink-merge.git] / chromecast / chromecast.gyp
blobee3520358bf34020819397cd9dadf0f1a0079374
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     'chromium_code': 1,
8     'chromecast_branding%': 'Chromium',
9   },
10   'target_defaults': {
11     'include_dirs': [
12       '..',  # Root of Chromium checkout
13     ],
14   },
15   'targets': [
16     {
17       'target_name': 'cast_common',
18       'type': '<(component)',
19       'dependencies': [
20         '../base/base.gyp:base',
21       ],
22       'sources': [
23         'common/cast_paths.cc',
24         'common/cast_paths.h',
25         'common/cast_resource_delegate.cc',
26         'common/cast_resource_delegate.h',
27         'common/chromecast_config.cc',
28         'common/chromecast_config.h',
29         'common/chromecast_switches.cc',
30         'common/chromecast_switches.h',
31         'common/pref_names.cc',
32         'common/pref_names.h',
33       ],
34       'conditions': [
35         ['chromecast_branding=="Chrome"', {
36           'dependencies': [
37             'internal/chromecast_internal.gyp:cast_common_internal',
38           ],
39         }, {
40           'sources': [
41             'common/chromecast_config_simple.cc',
42           ],
43         }],
44       ],
45     },
46     {
47       'target_name': 'cast_metrics',
48       'type': '<(component)',
49       'dependencies': [
50         'cast_common',
51         '../components/components.gyp:component_metrics_proto',
52         '../components/components.gyp:metrics',
53         '../components/components.gyp:metrics_net',
54       ],
55       'sources': [
56         'metrics/cast_metrics_prefs.cc',
57         'metrics/cast_metrics_prefs.h',
58         'metrics/cast_metrics_service_client.cc',
59         'metrics/cast_metrics_service_client.h',
60         'metrics/platform_metrics_providers.h',
61       ],
62       'conditions': [
63         ['chromecast_branding=="Chrome"', {
64           'dependencies': [
65             '<(cast_internal_gyp):cast_metrics_internal',
66           ],
67         }, {
68           'sources': [
69             'metrics/platform_metrics_providers_simple.cc',
70           ],
71         }],
72       ],
73     },
74     {
75       'target_name': 'cast_metrics_unittests',
76       'type': '<(gtest_target_type)',
77       'dependencies': [
78         'cast_metrics',
79         '../base/base.gyp:base_prefs_test_support',
80         '../base/base.gyp:run_all_unittests',
81         '../base/base.gyp:test_support_base',
82         '../components/components.gyp:component_metrics_proto',
83         '../testing/gtest.gyp:gtest',
84       ],
85       'sources': [
86         'metrics/cast_metrics_service_client_unittest.cc',
87       ],
88     },  # end of target 'cast_metrics_unittests'
89     {
90       'target_name': 'cast_net',
91       'type': '<(component)',
92       'sources': [
93         'net/network_change_notifier_cast.cc',
94         'net/network_change_notifier_cast.h',
95         'net/network_change_notifier_factory_cast.cc',
96         'net/network_change_notifier_factory_cast.h',
97       ],
98     },
99     {
100       'target_name': 'cast_service',
101       'type': '<(component)',
102       'dependencies': [
103         '../skia/skia.gyp:skia',
104       ],
105       'sources': [
106         'service/cast_service.cc',
107         'service/cast_service.h',
108       ],
109       'conditions': [
110         ['chromecast_branding=="Chrome"', {
111           'dependencies': [
112             'internal/chromecast_internal.gyp:cast_service_internal',
113           ],
114         }, {
115           'dependencies': [
116             '../base/base.gyp:base',
117             '../content/content.gyp:content',
118           ],
119           'conditions': [
120             ['OS=="android"', {
121               'sources': [
122                 'service/cast_service_android.cc',
123                 'service/cast_service_android.h',
124               ],
125             }, {
126               'sources': [
127                 'service/cast_service_simple.cc',
128                 'service/cast_service_simple.h',
129               ],
130             }],
131           ],
132         }],
133       ],
134     },
135     {
136       'target_name': 'cast_shell_resources',
137       'type': 'none',
138       'variables': {
139         'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chromecast',
140       },
141       'actions': [
142         {
143           'action_name': 'cast_shell_resources',
144           'variables': {
145             'grit_grd_file': 'shell/browser/resources/shell_resources.grd',
146             'grit_resource_ids': 'shell/browser/resources/resource_ids',
147           },
148           'includes': [ '../build/grit_action.gypi' ],
149         },
150       ],
151       'includes': [ '../build/grit_target.gypi' ],
152     },
153     {
154       'target_name': 'cast_shell_pak',
155       'type': 'none',
156       'dependencies': [
157         'cast_shell_resources',
158         '../content/app/resources/content_resources.gyp:content_resources',
159         '../content/app/strings/content_strings.gyp:content_strings',
160         '../content/browser/devtools/devtools_resources.gyp:devtools_resources',
161         '../net/net.gyp:net_resources',
162         '../third_party/WebKit/public/blink_resources.gyp:blink_resources',
163         '../ui/resources/ui_resources.gyp:ui_resources',
164         '../ui/strings/ui_strings.gyp:ui_strings',
165       ],
166       'actions': [
167         {
168           'action_name': 'repack_cast_shell_pack',
169           'variables': {
170             'pak_inputs': [
171               '<(SHARED_INTERMEDIATE_DIR)/blink/public/resources/blink_resources.pak',
172               '<(SHARED_INTERMEDIATE_DIR)/chromecast/shell_resources.pak',
173               '<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
174               '<(SHARED_INTERMEDIATE_DIR)/content/app/resources/content_resources_100_percent.pak',
175               '<(SHARED_INTERMEDIATE_DIR)/content/app/strings/content_strings_en-US.pak',
176               '<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
177               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/ui_resources_100_percent.pak',
178               '<(SHARED_INTERMEDIATE_DIR)/ui/resources/webui_resources.pak',
179               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/app_locale_settings_en-US.pak',
180               '<(SHARED_INTERMEDIATE_DIR)/ui/strings/ui_strings_en-US.pak',
181               '<(SHARED_INTERMEDIATE_DIR)/webkit/devtools_resources.pak',
182             ],
183             'pak_output': '<(PRODUCT_DIR)/assets/cast_shell.pak',
184           },
185           'includes': [ '../build/repack_action.gypi' ],
186         },
187       ],
188     },
189     # This target contains all content-embedder implementation that is
190     # non-platform-specific.
191     {
192       'target_name': 'cast_shell_common',
193       'type': '<(component)',
194       'dependencies': [
195         'cast_common',
196         'cast_metrics',
197         'cast_service',
198         'cast_shell_pak',
199         'cast_shell_resources',
200         'cast_version_header',
201         'chromecast_locales.gyp:chromecast_locales_pak',
202         'chromecast_locales.gyp:chromecast_settings',
203         '../components/components.gyp:component_metrics_proto',
204         '../content/content.gyp:content',
205         '../content/content.gyp:content_app_browser',
206         '../skia/skia.gyp:skia',
207       ],
208       'sources': [
209         'shell/app/cast_main_delegate.cc',
210         'shell/app/cast_main_delegate.h',
211         'shell/browser/cast_browser_context.cc',
212         'shell/browser/cast_browser_context.h',
213         'shell/browser/cast_browser_main_parts.cc',
214         'shell/browser/cast_browser_main_parts.h',
215         'shell/browser/cast_browser_process.cc',
216         'shell/browser/cast_browser_process.h',
217         'shell/browser/cast_content_browser_client.cc',
218         'shell/browser/cast_content_browser_client.h',
219         'shell/browser/cast_http_user_agent_settings.cc',
220         'shell/browser/cast_http_user_agent_settings.h',
221         'shell/browser/devtools/cast_dev_tools_delegate.cc',
222         'shell/browser/devtools/cast_dev_tools_delegate.h',
223         'shell/browser/devtools/remote_debugging_server.cc',
224         'shell/browser/devtools/remote_debugging_server.h',
225         'shell/browser/geolocation/cast_access_token_store.cc',
226         'shell/browser/geolocation/cast_access_token_store.h',
227         'shell/browser/url_request_context_factory.cc',
228         'shell/browser/url_request_context_factory.h',
229         'shell/browser/webui/webui_cast.h',
230         'shell/common/cast_content_client.cc',
231         'shell/common/cast_content_client.h',
232         'shell/renderer/cast_content_renderer_client.cc',
233         'shell/renderer/cast_content_renderer_client.h',
234       ],
235       'conditions': [
236         ['chromecast_branding=="Chrome"', {
237           'dependencies': [
238             'internal/chromecast_internal.gyp:cast_shell_internal',
239           ],
240         }, {
241           'sources': [
242             'shell/browser/devtools/remote_debugging_server_simple.cc',
243             'shell/browser/webui/webui_cast_simple.cc',
244           ],
245         }],
246       ],
247     },
248     {
249       'target_name': 'cast_version_header',
250       'type': 'none',
251       'direct_dependent_settings': {
252         'include_dirs': [
253           '<(SHARED_INTERMEDIATE_DIR)',
254         ],
255       },
256       'actions': [
257         {
258           'action_name': 'version_header',
259           'message': 'Generating version header file: <@(_outputs)',
260           'inputs': [
261             '<(version_path)',
262             'common/version.h.in',
263           ],
264           'outputs': [
265             '<(SHARED_INTERMEDIATE_DIR)/chromecast/common/version.h',
266           ],
267           'action': [
268             'python',
269             '<(version_py_path)',
270             '-e', 'VERSION_FULL="<(version_full)"',
271             'common/version.h.in',
272             '<@(_outputs)',
273           ],
274           'includes': [
275             '../build/util/version.gypi',
276           ],
277         },
278       ],
279     },
280     {
281       'target_name': 'cast_tests',
282       'type': 'none',
283       'dependencies': [
284         'media/media.gyp:cast_media_unittests',
285       ],
286     },
287   ],  # end of targets
289   # Targets for Android receiver.
290   'conditions': [
291     ['OS=="android"', {
292       'targets': [
293         {
294           'target_name': 'libcast_shell_android',
295           'type': 'shared_library',
296           'dependencies': [
297             'cast_common',
298             'cast_jni_headers',
299             'cast_shell_common',
300             'cast_shell_pak',
301             'cast_version_header',
302             '../base/base.gyp:base',
303             '../content/content.gyp:content_app_browser',
304             '../content/content.gyp:content',
305             '../skia/skia.gyp:skia',
306             '../ui/gfx/gfx.gyp:gfx',
307             '../ui/gl/gl.gyp:gl',
308           ],
309           'sources': [
310             'android/cast_jni_registrar.cc',
311             'android/cast_jni_registrar.h',
312             'android/chromecast_config_android.cc',
313             'android/chromecast_config_android.h',
314             'android/platform_jni_loader.h',
315             'shell/app/android/cast_jni_loader.cc',
316             'shell/browser/android/cast_window_manager.cc',
317             'shell/browser/android/cast_window_manager.h',
318             'shell/browser/android/cast_window_android.cc',
319             'shell/browser/android/cast_window_android.h',
320           ],
321           'conditions': [
322             ['chromecast_branding=="Chrome"', {
323               'dependencies': [
324                 '<(cast_internal_gyp):cast_shell_android_internal'
325               ],
326             }, {
327               'sources': [
328                 'android/platform_jni_loader_stub.cc',
329               ],
330             }]
331           ],
332         },  # end of target 'libcast_shell_android'
333         {
334           'target_name': 'cast_shell_java',
335           'type': 'none',
336           'dependencies': [
337             '../base/base.gyp:base_java',
338             '../content/content.gyp:content_java',
339             '../media/media.gyp:media_java',
340             '../net/net.gyp:net_java',
341             '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
342             '../ui/android/ui_android.gyp:ui_java',
343           ],
344           'variables': {
345             'has_java_resources': 1,
346             'java_in_dir': 'shell/android/apk',
347             'resource_dir': 'shell/android/apk/res',
348             'R_package': 'org.chromium.chromecast.shell',
349           },
350           'includes': ['../build/java.gypi'],
351         },  # end of target 'cast_shell_java'
352         {
353           'target_name': 'cast_shell_apk',
354           'type': 'none',
355           'dependencies': [
356             'cast_shell_java',
357             'libcast_shell_android',
358           ],
359           'variables': {
360             'apk_name': 'CastShell',
361             'manifest_package_name': 'org.chromium.chromecast.shell',
362             # Note(gunsch): there are no Java files in the android/ directory.
363             # Unfortunately, the java_apk.gypi target rigidly insists on having
364             # a java_in_dir directory, but complains about duplicate classes
365             # from the common cast_shell_java target (shared with internal APK)
366             # if the actual Java path is used.
367             # This will hopefully be removable after the great GN migration.
368             'java_in_dir': 'android',
369             'android_manifest_path': 'shell/android/apk/AndroidManifest.xml',
370             'package_name': 'org.chromium.chromecast.shell',
371             'native_lib_target': 'libcast_shell_android',
372             'asset_location': '<(PRODUCT_DIR)/assets',
373             'additional_input_paths': ['<(PRODUCT_DIR)/assets/cast_shell.pak'],
374           },
375           'includes': [ '../build/java_apk.gypi' ],
376         },
377         {
378           'target_name': 'cast_jni_headers',
379           'type': 'none',
380           'sources': [
381             'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowAndroid.java',
382             'shell/android/apk/src/org/chromium/chromecast/shell/CastWindowManager.java',
383           ],
384           'direct_dependent_settings': {
385             'include_dirs': [
386               '<(SHARED_INTERMEDIATE_DIR)/chromecast',
387             ],
388           },
389           'variables': {
390             'jni_gen_package': 'chromecast',
391           },
392           'includes': [ '../build/jni_generator.gypi' ],
393         },
394       ],  # end of targets
395     }, {  # OS != "android"
396       'targets': [
397         # This target includes all dependencies that cannot be built on Android.
398         {
399           'target_name': 'cast_shell',
400           'type': 'executable',
401           'dependencies': [
402             'cast_net',
403             'cast_shell_common',
404             'media/media.gyp:cast_media',
405             '../ui/aura/aura.gyp:aura_test_support',
406           ],
407           'sources': [
408             'shell/app/cast_main.cc',
409           ],
410           'conditions': [
411             ['chromecast_branding=="Chrome"', {
412               'dependencies': [
413                 'internal/chromecast_internal.gyp:cast_gfx_internal',
414               ],
415             }, {
416               'dependencies': [
417                 '../ui/ozone/ozone.gyp:eglplatform_shim_x11',
418               ],
419             }],
420           ],
421         },
422       ],  # end of targets
423     }],
424   ],  # end of conditions