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