Remove repaint callbacks from Viewport.
[chromium-blink-merge.git] / content / content.gyp
blobfbd3b7d332d9898c90c1256cd3527a4e11c0e154
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': '<!pymod_do_main(dir_exists ../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         'content_common_mojo_bindings.gypi',
28         '../build/win_precompile.gypi',
29       ],
30     }],
31     # In component mode, we build all of content as a single DLL.
32     # However, in the static mode, we need to build content as multiple
33     # targets in order to prevent dependencies from getting introduced
34     # upstream unnecessarily (e.g., content_renderer depends on allocator
35     # and chrome_exe depends on content_common but we don't want
36     # chrome_exe to have to depend on allocator).
37     ['component=="static_library"', {
38       'target_defines': [
39         'COMPILE_CONTENT_STATICALLY',
40       ],
41       'targets': [
42         {
43           'target_name': 'content',
44           'type': 'none',
45           'dependencies': [
46             'content_browser',
47             'content_common',
48           ],
49           'conditions': [
50             ['OS != "ios"', {
51               'dependencies': [
52                 'content_child',
53                 'content_gpu',
54                 'content_plugin',
55                 'content_ppapi_plugin',
56                 'content_renderer',
57                 'content_utility',
58                 'content_worker',
59               ],
60             }],
61           ],
62         },
63         {
64           'target_name': 'content_app_browser',
65           'type': 'static_library',
66           'variables': { 'enable_wexit_time_destructors': 1, },
67           'includes': [
68             'content_app.gypi',
69           ],
70           'dependencies': [
71             'content_common',
72           ],
73           'conditions': [
74             ['chrome_multiple_dll', {
75               'defines': [
76                 'CHROME_MULTIPLE_DLL_BROWSER',
77               ],
78             }],
79           ],
80         },
81         {
82           'target_name': 'content_app_child',
83           'type': 'static_library',
84           'variables': { 'enable_wexit_time_destructors': 1, },
85           'includes': [
86             'content_app.gypi',
87           ],
88           'dependencies': [
89             'content_common',
90           ],
91           'conditions': [
92             ['chrome_multiple_dll', {
93               'defines': [
94                 'CHROME_MULTIPLE_DLL_CHILD',
95               ],
96             }],
97           ],
98         },
99         {
100           'target_name': 'content_app_both',
101           'type': 'static_library',
102           'variables': { 'enable_wexit_time_destructors': 1, },
103           'includes': [
104             'content_app.gypi',
105           ],
106           'dependencies': [
107             'content_common',
108           ],
109           'export_dependent_settings': [
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             ['chromium_enable_vtune_jit_for_v8==1', {
265               'dependencies': [
266                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
267               ],
268             }],
269           ],
270           'includes': [
271             'content_app.gypi',
272             'content_browser.gypi',
273             'content_child.gypi',
274             'content_common.gypi',
275             'content_gpu.gypi',
276             'content_plugin.gypi',
277             'content_ppapi_plugin.gypi',
278             'content_renderer.gypi',
279             'content_utility.gypi',
280             'content_worker.gypi',
281           ],
282           'msvs_settings': {
283             'VCLinkerTool': {
284               'conditions': [
285                 ['incremental_chrome_dll==1', {
286                   'UseLibraryDependencyInputs': "true",
287                 }],
288               ],
289             },
290           },
291         },
292         {
293           'target_name': 'content_app_browser',
294           'type': 'none',
295           'dependencies': ['content', 'content_browser'],
296         },
297         {
298           'target_name': 'content_app_child',
299           'type': 'none',
300           'dependencies': ['content', 'content_child'],
301         },
302         {
303           'target_name': 'content_app_both',
304           'type': 'none',
305           'dependencies': ['content'],
306           'export_dependent_settings': ['content'],
307         },
308         {
309           'target_name': 'content_browser',
310           'type': 'none',
311           'dependencies': ['content'],
312           'export_dependent_settings': ['content'],
313         },
314         {
315           'target_name': 'content_common',
316           'type': 'none',
317           'dependencies': ['content', 'content_resources.gyp:content_resources'],
318           # Disable c4267 warnings until we fix size_t to int truncations.
319           'msvs_disabled_warnings': [ 4267, ],
320           'export_dependent_settings': ['content'],
321         },
322         {
323           'target_name': 'content_child',
324           'type': 'none',
325           'dependencies': ['content'],
326         },
327         {
328           'target_name': 'content_gpu',
329           'type': 'none',
330           'dependencies': ['content'],
331         },
332         {
333           'target_name': 'content_plugin',
334           'type': 'none',
335           'dependencies': ['content'],
336         },
337         {
338           'target_name': 'content_ppapi_plugin',
339           'type': 'none',
340           'dependencies': ['content'],
341           # Disable c4267 warnings until we fix size_t to int truncations.
342           'msvs_disabled_warnings': [ 4267, ],
343         },
344         {
345           'target_name': 'content_renderer',
346           'type': 'none',
347           'dependencies': ['content'],
348         },
349         {
350           'target_name': 'content_utility',
351           'type': 'none',
352           'dependencies': ['content'],
353           'export_dependent_settings': ['content'],
354         },
355         {
356           'target_name': 'content_worker',
357           'type': 'none',
358           'dependencies': ['content'],
359         },
360       ],
361     }],
362     ['OS == "android"', {
363       'targets': [
364         {
365           'target_name': 'common_aidl',
366           'type': 'none',
367           'variables': {
368             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
369             'aidl_import_include': 'public/android/java/src',
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_java',
379           'type': 'none',
380           'dependencies': [
381             '../base/base.gyp:base',
382             '../media/media.gyp:media_java',
383             '../net/net.gyp:net',
384             '../ui/android/ui_android.gyp:ui_java',
385             'common_aidl',
386             'content_common',
387             'content_strings_grd',
388             'content_gamepad_mapping',
389             'gesture_event_type_java',
390             'page_transition_types_java',
391             'popup_item_type_java',
392             'result_codes_java',
393             'speech_recognition_error_java',
394             'top_controls_state_java',
395             'screen_orientation_values_java',
396           ],
397           'variables': {
398             'java_in_dir': '../content/public/android/java',
399             'has_java_resources': 1,
400             'R_package': 'org.chromium.content',
401             'R_package_relpath': 'org/chromium/content',
402           },
403           'conditions': [
404             ['android_webview_build == 0', {
405               'dependencies': [
406                 '../third_party/eyesfree/eyesfree.gyp:eyesfree_java',
407                 '../third_party/guava/guava.gyp:guava_javalib',
408               ],
409             }],
410           ],
411           'includes': [ '../build/java.gypi' ],
412         },
413         {
414           'target_name': 'content_strings_grd',
415           # The android_webview/Android.mk file depends on this target directly.
416           'android_unmangled_name': 1,
417           'type': 'none',
418           'variables': {
419             'grd_file': '../content/public/android/java/strings/android_content_strings.grd',
420           },
421           'includes': [
422             '../build/java_strings_grd.gypi',
423           ],
424         },
425         {
426           'target_name': 'gesture_event_type_java',
427           'type': 'none',
428           'sources': [
429             'public/android/java/src/org/chromium/content/browser/GestureEventType.template',
430           ],
431           'variables': {
432             'package_name': 'org/chromium/content/browser',
433             'template_deps': ['browser/android/gesture_event_type_list.h'],
434           },
435           'includes': [ '../build/android/java_cpp_template.gypi' ],
436         },
437         {
438           'target_name': 'page_transition_types_java',
439           'type': 'none',
440           'sources': [
441             'public/android/java/src/org/chromium/content/browser/PageTransitionTypes.template',
442           ],
443           'variables': {
444             'package_name': 'org/chromium/content/browser',
445             'template_deps': ['public/common/page_transition_types_list.h'],
446           },
447           'includes': [ '../build/android/java_cpp_template.gypi' ],
448         },
449         {
450           'target_name': 'popup_item_type_java',
451           'type': 'none',
452           'sources': [
453             'public/android/java/src/org/chromium/content/browser/input/PopupItemType.template',
454           ],
455           'variables': {
456             'package_name': 'org/chromium/content/browser/input',
457             'template_deps': ['browser/android/popup_item_type_list.h'],
458           },
459           'includes': [ '../build/android/java_cpp_template.gypi' ],
460         },
461         {
462           'target_name': 'result_codes_java',
463           'type': 'none',
464           'sources': [
465             'public/android/java/src/org/chromium/content/common/ResultCodes.template',
466           ],
467           'variables': {
468             'package_name': 'org/chromium/content/common',
469             'template_deps': ['public/common/result_codes_list.h'],
470           },
471           'includes': [ '../build/android/java_cpp_template.gypi' ],
472         },
473         {
474           'target_name': 'speech_recognition_error_java',
475           'type': 'none',
476           'sources': [
477             'public/android/java/src/org/chromium/content/browser/SpeechRecognitionError.template',
478           ],
479           'variables': {
480             'package_name': 'org/chromium/content/browser',
481             'template_deps': ['public/common/speech_recognition_error_list.h'],
482           },
483           'includes': [ '../build/android/java_cpp_template.gypi' ],
484         },
485         {
486           'target_name': 'top_controls_state_java',
487           'type': 'none',
488           'sources': [
489             'public/android/java/src/org/chromium/content/common/TopControlsState.template',
490           ],
491           'variables': {
492             'package_name': 'org/chromium/content/common',
493             'template_deps': ['public/common/top_controls_state_list.h'],
494           },
495           'includes': [ '../build/android/java_cpp_template.gypi' ],
496         },
497         {
498           'target_name': 'screen_orientation_values_java',
499           'type': 'none',
500           'sources': [
501             'public/android/java/src/org/chromium/content/common/ScreenOrientationValues.template',
502           ],
503           'variables': {
504             'package_name': 'org/chromium/content/common',
505             'template_deps': ['public/common/screen_orientation_values_list.h'],
506           },
507           'includes': [ '../build/android/java_cpp_template.gypi' ],
508         },
509         {
510           'target_name': 'java_set_jni_headers',
511           'type': 'none',
512           'variables': {
513             'jni_gen_package': 'content',
514             'input_java_class': 'java/util/HashSet.class',
515           },
516           'includes': [ '../build/jar_file_jni_generator.gypi' ],
517         },
518         {
519           'target_name': 'motionevent_jni_headers',
520           'type': 'none',
521           'variables': {
522              'jni_gen_package': 'content',
523              'input_java_class': 'android/view/MotionEvent.class',
524            },
525           'includes': [ '../build/jar_file_jni_generator.gypi' ],
526         },
527         {
528           'target_name': 'content_jni_headers',
529           'type': 'none',
530           'dependencies': [
531             'java_set_jni_headers',
532             'motionevent_jni_headers'
533           ],
534           'includes': [ 'content_jni.gypi' ],
535         },
536         {
537           'target_name': 'content_icudata',
538           'type': 'none',
539           'conditions': [
540             ['icu_use_data_file_flag==1', {
541               'copies': [
542                 {
543                   'destination': '<(PRODUCT_DIR)/content_shell/assets',
544                   'files': [
545                     '<(PRODUCT_DIR)/icudtl.dat',
546                   ],
547                 },
548               ],
549             }],
550           ],
551         },
552         {
553           'target_name': 'content_gamepad_mapping',
554           'type': 'none',
555           'sources': [
556             'public/android/java/src/org/chromium/content/browser/input/CanonicalButtonIndex.template',
557             'public/android/java/src/org/chromium/content/browser/input/CanonicalAxisIndex.template',
558           ],
559           'variables': {
560             'package_name': 'org/chromium/content/browser/input',
561             'template_deps': [
562               'browser/gamepad/canonical_axis_index_list.h',
563               'browser/gamepad/canonical_button_index_list.h',
564             ],
565           },
566           'includes': [ '../build/android/java_cpp_template.gypi' ],
567         },
568       ],
569     }],  # OS == "android"
570   ],