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