Add InputEvent and EventPacket types for batched input delivery
[chromium-blink-merge.git] / content / content.gyp
blob221a1a53928a3e57c7edc508631022819b66a135
1 # Copyright (c) 2012 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,  # Use higher warning level.
8     'chromium_enable_vtune_jit_for_v8%': 0,  # enable the vtune support for V8 engine.
9     'directxsdk_exists': '<!(python <(DEPTH)/build/dir_exists.py ../third_party/directxsdk)',
10   },
11   'target_defaults': {
12     'defines': ['CONTENT_IMPLEMENTATION'],
13     'conditions': [
14       # TODO(jschuh): Remove this after crbug.com/173851 gets fixed.
15       ['OS=="win" and target_arch=="x64"', {
16         'msvs_settings': {
17           'VCCLCompilerTool': {
18             'AdditionalOptions': ['/bigobj'],
19           },
20         },
21       }],
22     ],
23   },
24   'includes': [
25     'content_tests.gypi',
26   ],
27   'conditions': [
28     ['OS != "ios"', {
29       'includes': [
30         '../build/win_precompile.gypi',
31         'content_shell.gypi',
32       ],
33     }],
34     # In component mode, we build all of content as a single DLL.
35     # However, in the static mode, we need to build content as multiple
36     # targets in order to prevent dependencies from getting introduced
37     # upstream unnecessarily (e.g., content_renderer depends on allocator
38     # and chrome_exe depends on content_common but we don't want
39     # chrome_exe to have to depend on allocator).
40     ['component=="static_library"', {
41       'target_defines': [
42         'COMPILE_CONTENT_STATICALLY',
43       ],
44       'targets': [
45         {
46           'target_name': 'content',
47           'type': 'none',
48           'dependencies': [
49             'content_browser',
50             'content_common',
51           ],
52           'conditions': [
53             ['OS != "ios"', {
54               'dependencies': [
55                 'content_child',
56                 'content_gpu',
57                 'content_plugin',
58                 'content_ppapi_plugin',
59                 'content_renderer',
60                 'content_utility',
61                 'content_worker',
62               ],
63             }],
64           ],
65         },
66         {
67           'target_name': 'content_app_browser',
68           'type': 'static_library',
69           'variables': { 'enable_wexit_time_destructors': 1, },
70           'includes': [
71             'content_app.gypi',
72           ],
73           'dependencies': [
74             'content_common',
75           ],
76           'conditions': [
77             ['chrome_multiple_dll', {
78               'defines': [
79                 'CHROME_MULTIPLE_DLL_BROWSER',
80               ],
81             }],
82           ],
83         },
84         {
85           'target_name': 'content_app_child',
86           'type': 'static_library',
87           'variables': { 'enable_wexit_time_destructors': 1, },
88           'includes': [
89             'content_app.gypi',
90           ],
91           'dependencies': [
92             'content_common',
93           ],
94           'conditions': [
95             ['chrome_multiple_dll', {
96               'defines': [
97                 'CHROME_MULTIPLE_DLL_CHILD',
98               ],
99             }],
100           ],
101         },
102         {
103           'target_name': 'content_app_both',
104           'type': 'static_library',
105           'variables': { 'enable_wexit_time_destructors': 1, },
106           'includes': [
107             'content_app.gypi',
108           ],
109           'dependencies': [
110             'content_common',
111           ],
112         },
113         {
114           'target_name': 'content_browser',
115           'type': 'static_library',
116           'variables': { 'enable_wexit_time_destructors': 1, },
117           'includes': [
118             'content_browser.gypi',
119           ],
120           'dependencies': [
121             'content_common',
122             'content_resources.gyp:content_resources',
123           ],
124           'conditions': [
125             ['java_bridge==1', {
126               'dependencies': [
127                 'content_child',
128               ]
129             }],
130             ['OS=="android"', {
131               'dependencies': [
132                 'content_gpu',
133                 'content_utility',
134               ],
135             }],
136           ],
137         },
138         {
139           'target_name': 'content_common',
140           'type': 'static_library',
141           'variables': { 'enable_wexit_time_destructors': 1, },
142           'includes': [
143             'content_common.gypi',
144           ],
145           'conditions': [
146             ['OS != "ios"', {
147               'dependencies': [
148                 'content_resources.gyp:content_resources',
149               ],
150             }],
151           ],
152           # Disable c4267 warnings until we fix size_t to int truncations.
153           'msvs_disabled_warnings': [ 4267, ],
154         },
155       ],
156       'conditions': [
157         ['OS != "ios"', {
158           'targets': [
159             {
160               'target_name': 'content_child',
161               'type': 'static_library',
162               'variables': { 'enable_wexit_time_destructors': 1, },
163               'includes': [
164                 'content_child.gypi',
165               ],
166               'dependencies': [
167                 'content_resources.gyp:content_resources',
168               ],
169               # Disable c4267 warnings until we fix size_t to int truncations.
170               'msvs_disabled_warnings': [ 4267, ],
171             },
172             {
173               'target_name': 'content_gpu',
174               'type': 'static_library',
175               'variables': { 'enable_wexit_time_destructors': 1, },
176               'includes': [
177                 'content_gpu.gypi',
178               ],
179               'dependencies': [
180                 'content_child',
181                 'content_common',
182               ],
183             },
184             {
185               'target_name': 'content_plugin',
186               'type': 'static_library',
187               'variables': { 'enable_wexit_time_destructors': 1, },
188               'includes': [
189                 'content_plugin.gypi',
190               ],
191               'dependencies': [
192                 'content_child',
193                 'content_common',
194               ],
195             },
196             {
197               'target_name': 'content_ppapi_plugin',
198               'type': 'static_library',
199               'variables': { 'enable_wexit_time_destructors': 1, },
200               'includes': [
201                 'content_ppapi_plugin.gypi',
202               ],
203               # Disable c4267 warnings until we fix size_t to int truncations.
204               'msvs_disabled_warnings': [ 4267, ],
205             },
206             {
207               'target_name': 'content_renderer',
208               'type': 'static_library',
209               'variables': { 'enable_wexit_time_destructors': 1, },
210               'includes': [
211                 'content_renderer.gypi',
212               ],
213               'dependencies': [
214                 'content_child',
215                 'content_common',
216                 'content_resources.gyp:content_resources',
217               ],
218               'conditions': [
219                 ['chromium_enable_vtune_jit_for_v8==1', {
220                   'dependencies': [
221                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
222                   ],
223                 }],
224               ],
225             },
226             {
227               'target_name': 'content_utility',
228               'type': 'static_library',
229               'variables': { 'enable_wexit_time_destructors': 1, },
230               'includes': [
231                 'content_utility.gypi',
232               ],
233               'dependencies': [
234                 'content_child',
235                 'content_common',
236               ],
237             },
238             {
239               'target_name': 'content_worker',
240               'type': 'static_library',
241               'variables': { 'enable_wexit_time_destructors': 1, },
242               'includes': [
243                 'content_worker.gypi',
244               ],
245               'dependencies': [
246                 'content_child',
247                 'content_common',
248               ],
249             },
250           ],
251         }],
252       ],
253     },
254     {  # component != static_library
255       'targets': [
256         {
257           'target_name': 'content',
258           'type': 'shared_library',
259           'variables': { 'enable_wexit_time_destructors': 1, },
260           'dependencies': [
261            'content_resources.gyp:content_resources',
262           ],
263           'conditions': [
264             ['OS=="mac"', {
265               'dependencies': [
266                 '<(DEPTH)/third_party/mach_override/mach_override.gyp:mach_override',
267               ],
268             }],
269             ['chromium_enable_vtune_jit_for_v8==1', {
270               'dependencies': [
271                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
272               ],
273             }],
274           ],
275           'includes': [
276             'content_app.gypi',
277             'content_browser.gypi',
278             'content_child.gypi',
279             'content_common.gypi',
280             'content_gpu.gypi',
281             'content_plugin.gypi',
282             'content_ppapi_plugin.gypi',
283             'content_renderer.gypi',
284             'content_utility.gypi',
285             'content_worker.gypi',
286           ],
287           'msvs_settings': {
288             'VCLinkerTool': {
289               'conditions': [
290                 ['incremental_chrome_dll==1', {
291                   'UseLibraryDependencyInputs': "true",
292                 }],
293               ],
294             },
295           },
296         },
297         {
298           'target_name': 'content_app_browser',
299           'type': 'none',
300           'dependencies': ['content', 'content_browser'],
301         },
302         {
303           'target_name': 'content_app_child',
304           'type': 'none',
305           'dependencies': ['content', 'content_child'],
306         },
307         {
308           'target_name': 'content_app_both',
309           'type': 'none',
310           'dependencies': ['content'],
311         },
312         {
313           'target_name': 'content_browser',
314           'type': 'none',
315           'dependencies': ['content'],
316         },
317         {
318           'target_name': 'content_common',
319           'type': 'none',
320           'dependencies': ['content', 'content_resources.gyp:content_resources'],
321           # Disable c4267 warnings until we fix size_t to int truncations.
322           'msvs_disabled_warnings': [ 4267, ],
323         },
324         {
325           'target_name': 'content_child',
326           'type': 'none',
327           'dependencies': ['content'],
328         },
329         {
330           'target_name': 'content_gpu',
331           'type': 'none',
332           'dependencies': ['content'],
333         },
334         {
335           'target_name': 'content_plugin',
336           'type': 'none',
337           'dependencies': ['content'],
338         },
339         {
340           'target_name': 'content_ppapi_plugin',
341           'type': 'none',
342           'dependencies': ['content'],
343           # Disable c4267 warnings until we fix size_t to int truncations.
344           'msvs_disabled_warnings': [ 4267, ],
345         },
346         {
347           'target_name': 'content_renderer',
348           'type': 'none',
349           'dependencies': ['content'],
350         },
351         {
352           'target_name': 'content_utility',
353           'type': 'none',
354           'dependencies': ['content'],
355         },
356         {
357           'target_name': 'content_worker',
358           'type': 'none',
359           'dependencies': ['content'],
360         },
361       ],
362     }],
363     ['OS == "android"', {
364       'targets': [
365         {
366           'target_name': 'common_aidl',
367           'type': 'none',
368           'variables': {
369             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
370           },
371           'sources': [
372             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
373             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
374           ],
375           'includes': [ '../build/java_aidl.gypi' ],
376         },
377         {
378           'target_name': 'content_native_libraries_gen',
379           'type': 'none',
380           'sources': [
381             'public/android/java/templates/NativeLibraries.template',
382           ],
383           'variables': {
384             'package_name': 'org/chromium/content/app',
385             'include_path': 'public/android/java/templates',
386             'template_deps': [
387               'public/android/java/templates/native_libraries_array.h'
388             ],
389           },
390           'includes': [ '../build/android/java_cpp_template.gypi' ],
391         },
392         {
393           'target_name': 'content_java',
394           'type': 'none',
395           'dependencies': [
396             '../base/base.gyp:base',
397             '../media/media.gyp:media_java',
398             '../net/net.gyp:net',
399             '../ui/ui.gyp:ui_java',
400             'common_aidl',
401             'content_common',
402             'page_transition_types_java',
403             'result_codes_java',
404             'speech_recognition_error_java',
405             'top_controls_state_java',
406             'content_native_libraries_gen',
407           ],
408           'variables': {
409             'java_in_dir': '../content/public/android/java',
410             'jar_excluded_classes': [ '*/NativeLibraries.class' ],
411             'has_java_resources': 1,
412             'R_package': 'org.chromium.content',
413             'R_package_relpath': 'org/chromium/content',
414             'java_strings_grd': 'android_content_strings.grd',
415           },
416           'conditions': [
417             ['android_webview_build == 0', {
418               'dependencies': [
419                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
420                 '../third_party/guava/guava.gyp:guava_javalib',
421               ],
422             }],
423           ],
424           'includes': [ '../build/java.gypi' ],
425         },
426         {
427           'target_name': 'page_transition_types_java',
428           'type': 'none',
429           'sources': [
430             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
431           ],
432           'variables': {
433             'package_name': 'org/chromium/content/browser',
434             'template_deps': ['public/common/page_transition_types_list.h'],
435           },
436           'includes': [ '../build/android/java_cpp_template.gypi' ],
437         },
438         {
439           'target_name': 'result_codes_java',
440           'type': 'none',
441           'sources': [
442             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
443           ],
444           'variables': {
445             'package_name': 'org/chromium/content/common',
446             'template_deps': ['public/common/result_codes_list.h'],
447           },
448           'includes': [ '../build/android/java_cpp_template.gypi' ],
449         },
450         {
451           'target_name': 'speech_recognition_error_java',
452           'type': 'none',
453           'sources': [
454             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
455           ],
456           'variables': {
457             'package_name': 'org/chromium/content/browser',
458             'template_deps': ['public/common/speech_recognition_error_list.h'],
459           },
460           'includes': [ '../build/android/java_cpp_template.gypi' ],
461         },
462         {
463           'target_name': 'top_controls_state_java',
464           'type': 'none',
465           'sources': [
466             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
467           ],
468           'variables': {
469             'package_name': 'org/chromium/content/common',
470             'template_deps': ['public/common/top_controls_state_list.h'],
471           },
472           'includes': [ '../build/android/java_cpp_template.gypi' ],
473         },
474         {
475           'target_name': 'java_set_jni_headers',
476           'type': 'none',
477           'variables': {
478             'jni_gen_package': 'content',
479             'input_java_class': 'java/util/HashSet.class',
480           },
481           'includes': [ '../build/jar_file_jni_generator.gypi' ],
482         },
484         {
485           'target_name': 'content_jni_headers',
486           'type': 'none',
487           'dependencies': [
488             'java_set_jni_headers',
489           ],
490           'direct_dependent_settings': {
491             'include_dirs': [
492               '<(SHARED_INTERMEDIATE_DIR)/content',
493             ],
494           },
495           'includes': [ 'content_jni.gypi' ],
496         },
497       ],
498     }],  # OS == "android"
499   ],