API wrappers created for rollback and CanRollback methods.
[chromium-blink-merge.git] / content / content.gyp
blob8aa3bfb3c98c0774028379b45cef0bba5854f7c2
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   'conditions': [
25     ['OS != "ios"', {
26       'includes': [
27         '../build/win_precompile.gypi',
28       ],
29       'targets': [
30         {
31           'target_name': 'webkit_version',
32           'type': 'none',
33           'actions': [
34             {
35               'action_name': 'generate_webkit_version',
36               'inputs': [
37                 '<(script)',
38                 '<(lastchange)',
39                 '<(template)',
40               ],
41               'outputs': [
42                 '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h',
43               ],
44               'action': ['python',
45                          '<(script)',
46                          '-f', '<(lastchange)',
47                          '<(template)',
48                          '<@(_outputs)',
49               ],
50               'variables': {
51                 'script': '<(DEPTH)/build/util/version.py',
52                 'lastchange': '<(DEPTH)/build/util/LASTCHANGE.blink',
53                 'template': 'webkit_version.h.in',
54               },
55             },
56           ],
57           'direct_dependent_settings': {
58             'include_dirs': [
59               '<(SHARED_INTERMEDIATE_DIR)',
60             ],
61           },
62           # Dependents may rely on files generated by this target or one of
63           # its own hard dependencies.
64           'hard_dependency': 1,
65         },
66       ],
67     }],
68     # In component mode, we build all of content as a single DLL.
69     # However, in the static mode, we need to build content as multiple
70     # targets in order to prevent dependencies from getting introduced
71     # upstream unnecessarily (e.g., content_renderer depends on allocator
72     # and chrome_exe depends on content_common but we don't want
73     # chrome_exe to have to depend on allocator).
74     ['component=="static_library"', {
75       'target_defines': [
76         'COMPILE_CONTENT_STATICALLY',
77       ],
78       'targets': [
79         {
80           'target_name': 'content',
81           'type': 'none',
82           'dependencies': [
83             'content_browser',
84             'content_common',
85           ],
86           'conditions': [
87             ['OS != "ios"', {
88               'dependencies': [
89                 'content_child',
90                 'content_gpu',
91                 'content_plugin',
92                 'content_ppapi_plugin',
93                 'content_renderer',
94                 'content_utility',
95                 'content_worker',
96               ],
97             }],
98           ],
99         },
100         {
101           'target_name': 'content_app_browser',
102           'type': 'static_library',
103           'variables': { 'enable_wexit_time_destructors': 1, },
104           'includes': [
105             'content_app.gypi',
106           ],
107           'dependencies': [
108             'content_common',
109           ],
110           'conditions': [
111             ['chrome_multiple_dll', {
112               'defines': [
113                 'CHROME_MULTIPLE_DLL_BROWSER',
114               ],
115             }],
116           ],
117         },
118         {
119           'target_name': 'content_app_child',
120           'type': 'static_library',
121           'variables': { 'enable_wexit_time_destructors': 1, },
122           'includes': [
123             'content_app.gypi',
124           ],
125           'dependencies': [
126             'content_common',
127           ],
128           'conditions': [
129             ['chrome_multiple_dll', {
130               'defines': [
131                 'CHROME_MULTIPLE_DLL_CHILD',
132               ],
133             }],
134           ],
135         },
136         {
137           'target_name': 'content_app_both',
138           'type': 'static_library',
139           'variables': { 'enable_wexit_time_destructors': 1, },
140           'includes': [
141             'content_app.gypi',
142           ],
143           'dependencies': [
144             'content_common',
145           ],
146           'export_dependent_settings': [
147             'content_common',
148           ],
149         },
150         {
151           'target_name': 'content_browser',
152           'type': 'static_library',
153           'variables': { 'enable_wexit_time_destructors': 1, },
154           'includes': [
155             'content_browser.gypi',
156           ],
157           'dependencies': [
158             'content_common',
159             'content_resources.gyp:content_resources',
160           ],
161           'conditions': [
162             ['java_bridge==1', {
163               'dependencies': [
164                 'content_child',
165               ]
166             }],
167             ['OS=="android"', {
168               'dependencies': [
169                 'content_gpu',
170                 'content_utility',
171               ],
172             }],
173           ],
174         },
175         {
176           'target_name': 'content_common',
177           'type': 'static_library',
178           'variables': { 'enable_wexit_time_destructors': 1, },
179           'includes': [
180             'content_common.gypi',
181           ],
182           'conditions': [
183             ['OS != "ios"', {
184               'dependencies': [
185                 'content_resources.gyp:content_resources',
186               ],
187             }],
188           ],
189           # Disable c4267 warnings until we fix size_t to int truncations.
190           'msvs_disabled_warnings': [ 4267, ],
191         },
192       ],
193       'conditions': [
194         ['OS != "ios"', {
195           'targets': [
196             {
197               'target_name': 'content_child',
198               'type': 'static_library',
199               'variables': { 'enable_wexit_time_destructors': 1, },
200               'includes': [
201                 'content_child.gypi',
202               ],
203               'dependencies': [
204                 'content_resources.gyp:content_resources',
205               ],
206               # Disable c4267 warnings until we fix size_t to int truncations.
207               'msvs_disabled_warnings': [ 4267, ],
208             },
209             {
210               'target_name': 'content_gpu',
211               'type': 'static_library',
212               'variables': { 'enable_wexit_time_destructors': 1, },
213               'includes': [
214                 'content_gpu.gypi',
215               ],
216               'dependencies': [
217                 'content_child',
218                 'content_common',
219               ],
220             },
221             {
222               'target_name': 'content_plugin',
223               'type': 'static_library',
224               'variables': { 'enable_wexit_time_destructors': 1, },
225               'includes': [
226                 'content_plugin.gypi',
227               ],
228               'dependencies': [
229                 'content_child',
230                 'content_common',
231               ],
232             },
233             {
234               'target_name': 'content_ppapi_plugin',
235               'type': 'static_library',
236               'variables': { 'enable_wexit_time_destructors': 1, },
237               'includes': [
238                 'content_ppapi_plugin.gypi',
239               ],
240               # Disable c4267 warnings until we fix size_t to int truncations.
241               'msvs_disabled_warnings': [ 4267, ],
242             },
243             {
244               'target_name': 'content_renderer',
245               'type': 'static_library',
246               'variables': { 'enable_wexit_time_destructors': 1, },
247               'includes': [
248                 'content_renderer.gypi',
249               ],
250               'dependencies': [
251                 'content_child',
252                 'content_common',
253                 'content_resources.gyp:content_resources',
254               ],
255               'conditions': [
256                 ['chromium_enable_vtune_jit_for_v8==1', {
257                   'dependencies': [
258                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
259                   ],
260                 }],
261               ],
262             },
263             {
264               'target_name': 'content_utility',
265               'type': 'static_library',
266               'variables': { 'enable_wexit_time_destructors': 1, },
267               'includes': [
268                 'content_utility.gypi',
269               ],
270               'dependencies': [
271                 'content_child',
272                 'content_common',
273               ],
274             },
275             {
276               'target_name': 'content_worker',
277               'type': 'static_library',
278               'variables': { 'enable_wexit_time_destructors': 1, },
279               'includes': [
280                 'content_worker.gypi',
281               ],
282               'dependencies': [
283                 'content_child',
284                 'content_common',
285               ],
286             },
287           ],
288         }],
289       ],
290     },
291     {  # component != static_library
292       'targets': [
293         {
294           'target_name': 'content',
295           'type': 'shared_library',
296           'variables': { 'enable_wexit_time_destructors': 1, },
297           'dependencies': [
298            'content_resources.gyp:content_resources',
299           ],
300           'conditions': [
301             ['chromium_enable_vtune_jit_for_v8==1', {
302               'dependencies': [
303                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
304               ],
305             }],
306           ],
307           'includes': [
308             'content_app.gypi',
309             'content_browser.gypi',
310             'content_child.gypi',
311             'content_common.gypi',
312             'content_gpu.gypi',
313             'content_plugin.gypi',
314             'content_ppapi_plugin.gypi',
315             'content_renderer.gypi',
316             'content_utility.gypi',
317             'content_worker.gypi',
318           ],
319           'msvs_settings': {
320             'VCLinkerTool': {
321               'conditions': [
322                 ['incremental_chrome_dll==1', {
323                   'UseLibraryDependencyInputs': "true",
324                 }],
325               ],
326             },
327           },
328         },
329         {
330           'target_name': 'content_app_browser',
331           'type': 'none',
332           'dependencies': ['content', 'content_browser'],
333         },
334         {
335           'target_name': 'content_app_child',
336           'type': 'none',
337           'dependencies': ['content', 'content_child'],
338         },
339         {
340           'target_name': 'content_app_both',
341           'type': 'none',
342           'dependencies': ['content'],
343           'export_dependent_settings': ['content'],
344         },
345         {
346           'target_name': 'content_browser',
347           'type': 'none',
348           'dependencies': ['content'],
349           'export_dependent_settings': ['content'],
350         },
351         {
352           'target_name': 'content_common',
353           'type': 'none',
354           'dependencies': ['content', 'content_resources.gyp:content_resources'],
355           # Disable c4267 warnings until we fix size_t to int truncations.
356           'msvs_disabled_warnings': [ 4267, ],
357           'export_dependent_settings': ['content'],
358         },
359         {
360           'target_name': 'content_child',
361           'type': 'none',
362           'dependencies': ['content'],
363         },
364         {
365           'target_name': 'content_gpu',
366           'type': 'none',
367           'dependencies': ['content'],
368         },
369         {
370           'target_name': 'content_plugin',
371           'type': 'none',
372           'dependencies': ['content'],
373         },
374         {
375           'target_name': 'content_ppapi_plugin',
376           'type': 'none',
377           'dependencies': ['content'],
378           # Disable c4267 warnings until we fix size_t to int truncations.
379           'msvs_disabled_warnings': [ 4267, ],
380         },
381         {
382           'target_name': 'content_renderer',
383           'type': 'none',
384           'dependencies': ['content'],
385         },
386         {
387           'target_name': 'content_utility',
388           'type': 'none',
389           'dependencies': ['content'],
390           'export_dependent_settings': ['content'],
391         },
392         {
393           'target_name': 'content_worker',
394           'type': 'none',
395           'dependencies': ['content'],
396         },
397       ],
398     }],
399     ['OS == "android"', {
400       'targets': [
401         {
402           'target_name': 'common_aidl',
403           'type': 'none',
404           'variables': {
405             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
406           },
407           'sources': [
408             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
409             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
410           ],
411           'includes': [ '../build/java_aidl.gypi' ],
412         },
413         {
414           'target_name': 'content_java',
415           'type': 'none',
416           'dependencies': [
417             '../base/base.gyp:base',
418             '../media/media.gyp:media_java',
419             '../net/net.gyp:net',
420             '../ui/android/ui_android.gyp:ui_java',
421             'common_aidl',
422             'content_common',
423             'gesture_event_type_java',
424             'page_transition_types_java',
425             'popup_item_type_java',
426             'result_codes_java',
427             'speech_recognition_error_java',
428             'top_controls_state_java',
429             'screen_orientation_values_java',
430           ],
431           'variables': {
432             'java_in_dir': '../content/public/android/java',
433             'has_java_resources': 1,
434             'R_package': 'org.chromium.content',
435             'R_package_relpath': 'org/chromium/content',
436             'java_strings_grd': 'android_content_strings.grd',
437           },
438           'conditions': [
439             ['android_webview_build == 0', {
440               'dependencies': [
441                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
442                 '../third_party/guava/guava.gyp:guava_javalib',
443               ],
444             }],
445           ],
446           'includes': [ '../build/java.gypi' ],
447         },
448         {
449           'target_name': 'gesture_event_type_java',
450           'type': 'none',
451           'sources': [
452             'public/android/java/src/org/chromium/content/browser/GestureEventType.template',
453           ],
454           'variables': {
455             'package_name': 'org/chromium/content/browser',
456             'template_deps': ['browser/android/gesture_event_type_list.h'],
457           },
458           'includes': [ '../build/android/java_cpp_template.gypi' ],
459         },
460         {
461           'target_name': 'page_transition_types_java',
462           'type': 'none',
463           'sources': [
464             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
465           ],
466           'variables': {
467             'package_name': 'org/chromium/content/browser',
468             'template_deps': ['public/common/page_transition_types_list.h'],
469           },
470           'includes': [ '../build/android/java_cpp_template.gypi' ],
471         },
472         {
473           'target_name': 'popup_item_type_java',
474           'type': 'none',
475           'sources': [
476             'public/android/java/src/org/chromium/content/browser/input/PopupItemType.template',
477           ],
478           'variables': {
479             'package_name': 'org/chromium/content/browser/input',
480             'template_deps': ['browser/android/popup_item_type_list.h'],
481           },
482           'includes': [ '../build/android/java_cpp_template.gypi' ],
483         },
484         {
485           'target_name': 'result_codes_java',
486           'type': 'none',
487           'sources': [
488             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
489           ],
490           'variables': {
491             'package_name': 'org/chromium/content/common',
492             'template_deps': ['public/common/result_codes_list.h'],
493           },
494           'includes': [ '../build/android/java_cpp_template.gypi' ],
495         },
496         {
497           'target_name': 'speech_recognition_error_java',
498           'type': 'none',
499           'sources': [
500             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
501           ],
502           'variables': {
503             'package_name': 'org/chromium/content/browser',
504             'template_deps': ['public/common/speech_recognition_error_list.h'],
505           },
506           'includes': [ '../build/android/java_cpp_template.gypi' ],
507         },
508         {
509           'target_name': 'top_controls_state_java',
510           'type': 'none',
511           'sources': [
512             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
513           ],
514           'variables': {
515             'package_name': 'org/chromium/content/common',
516             'template_deps': ['public/common/top_controls_state_list.h'],
517           },
518           'includes': [ '../build/android/java_cpp_template.gypi' ],
519         },
520         {
521           'target_name': 'screen_orientation_values_java',
522           'type': 'none',
523           'sources': [
524             'public/android/java/src/org/chromium/content/common/ScreenOrientationValues.template',
525           ],
526           'variables': {
527             'package_name': 'org/chromium/content/common',
528             'template_deps': ['public/common/screen_orientation_values_list.h'],
529           },
530           'includes': [ '../build/android/java_cpp_template.gypi' ],
531         },
532         {
533           'target_name': 'java_set_jni_headers',
534           'type': 'none',
535           'variables': {
536             'jni_gen_package': 'content',
537             'input_java_class': 'java/util/HashSet.class',
538           },
539           'includes': [ '../build/jar_file_jni_generator.gypi' ],
540         },
541         {
542           'target_name': 'motionevent_jni_headers',
543           'type': 'none',
544           'variables': {
545              'jni_gen_package': 'content',
546              'jni_generator_ptr_type': 'long',
547              'input_java_class': 'android/view/MotionEvent.class',
548            },
549           'includes': [ '../build/jar_file_jni_generator.gypi' ],
550         },
551         {
552           'target_name': 'content_jni_headers',
553           'type': 'none',
554           'dependencies': [
555             'java_set_jni_headers',
556             'motionevent_jni_headers'
557           ],
558           'includes': [ 'content_jni.gypi' ],
559         },
560         {
561           'target_name': 'content_icudata',
562           'type': 'none',
563           'conditions': [
564             ['icu_use_data_file_flag==1', {
565               'copies': [
566                 {
567                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
568                   'files': [
569                     '<(PRODUCT_DIR)/icudtl.dat',
570                   ],
571                 },
572               ],
573             }],
574           ],
575         },
576       ],
577     }],  # OS == "android"
578   ],