Report HTTPS links in MalwareDetails. This is only sent if
[chromium-blink-merge.git] / content / content.gyp
blob7bc40bfbc37e795809d9673d135d7542dcca910a
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_resources.gypi',
29       ],
30     }],
31     ['OS == "win"', {
32       'targets': [
33         {
34           'target_name': 'content_startup_helper_win',
35           'type': 'static_library',
36           'include_dirs': [
37             '..',
38           ],
39           'dependencies': [
40             '../base/base.gyp:base',
41             '../base/base.gyp:base_i18n',
42             '../sandbox/sandbox.gyp:sandbox',
43           ],
44           'sources': [
45             'app/startup_helper_win.cc',
46             'public/app/startup_helper_win.h',
47           ],
48         }
49       ],
50     }],
51     # In component mode, we build all of content as a single DLL.
52     # However, in the static mode, we need to build content as multiple
53     # targets in order to prevent dependencies from getting introduced
54     # upstream unnecessarily (e.g., content_renderer depends on allocator
55     # and chrome_exe depends on content_common but we don't want
56     # chrome_exe to have to depend on allocator).
57     ['component=="static_library"', {
58       'target_defines': [
59         'COMPILE_CONTENT_STATICALLY',
60       ],
61       'targets': [
62         {
63           # GN version: //content
64           'target_name': 'content',
65           'type': 'none',
66           'dependencies': [
67             'content_browser',
68             'content_common',
69           ],
70           'export_dependent_settings': [
71             'content_common',
72           ],
73           'conditions': [
74             ['OS != "ios"', {
75               'dependencies': [
76                 'content_child',
77                 'content_gpu',
78                 'content_plugin',
79                 'content_ppapi_plugin',
80                 'content_renderer',
81                 'content_utility',
82               ],
83             }],
84           ],
85         },
86         {
87           # GN version: //content/app:browser
88           'target_name': 'content_app_browser',
89           'type': 'static_library',
90           'variables': { 'enable_wexit_time_destructors': 1, },
91           'includes': [
92             'content_app.gypi',
93           ],
94           'dependencies': [
95             'content_common',
96           ],
97           'export_dependent_settings': [
98             'content_common',
99           ],
100           'conditions': [
101             ['chrome_multiple_dll', {
102               'defines': [
103                 'CHROME_MULTIPLE_DLL_BROWSER',
104               ],
105             }],
106           ],
107         },
108         {
109           # GN version: //content/app:child
110           'target_name': 'content_app_child',
111           'type': 'static_library',
112           'variables': { 'enable_wexit_time_destructors': 1, },
113           'includes': [
114             'content_app.gypi',
115           ],
116           'dependencies': [
117             'content_common',
118           ],
119           'export_dependent_settings': [
120             'content_common',
121           ],
122           'conditions': [
123             ['chrome_multiple_dll', {
124               'defines': [
125                 'CHROME_MULTIPLE_DLL_CHILD',
126               ],
127             }],
128           ],
129         },
130         {
131           # GN version: //content/app:both
132           'target_name': 'content_app_both',
133           'type': 'static_library',
134           'variables': { 'enable_wexit_time_destructors': 1, },
135           'includes': [
136             'content_app.gypi',
137           ],
138           'dependencies': [
139             'content_common',
140           ],
141           'export_dependent_settings': [
142             'content_common',
143           ],
144         },
145         {
146           # GN version: //content/browser and //content/public/browser
147           'target_name': 'content_browser',
148           'type': 'static_library',
149           'variables': { 'enable_wexit_time_destructors': 1, },
150           'includes': [
151             'content_browser.gypi',
152             # Disable LTO due to ELF section name out of range
153             # crbug.com/422251
154             '../build/android/disable_lto.gypi',
155           ],
156           'dependencies': [
157             'content_common',
158           ],
159           'export_dependent_settings': [
160             'content_common',
161           ],
162           'conditions': [
163             ['java_bridge==1', {
164               'dependencies': [
165                 'content_child',
166               ]
167             }],
168             ['OS=="android"', {
169               'dependencies': [
170                 'content_gpu',
171                 'content_utility',
172               ],
173             }],
174             ['OS != "ios"', {
175               'dependencies': [
176                 'content_resources',
177               ],
178             }],
179           ],
180         },
181         {
182           # GN version: //content/common and //content/public/common
183           'target_name': 'content_common',
184           'type': 'static_library',
185           'variables': { 'enable_wexit_time_destructors': 1, },
186           'includes': [
187             'content_common.gypi',
188           ],
189           'conditions': [
190             ['OS != "ios"', {
191               'dependencies': [
192                 'content_resources',
193               ],
194             }],
195           ],
196           # Disable c4267 warnings until we fix size_t to int truncations.
197           'msvs_disabled_warnings': [ 4267, ],
198         },
199       ],
200       'conditions': [
201         ['OS != "ios"', {
202           'targets': [
203             {
204               # GN version: //content/child and //content/public/child
205               'target_name': 'content_child',
206               'type': 'static_library',
207               'variables': { 'enable_wexit_time_destructors': 1, },
208               'includes': [
209                 'content_child.gypi',
210               ],
211               'dependencies': [
212                 'content_resources',
213               ],
214               # Disable c4267 warnings until we fix size_t to int truncations.
215               'msvs_disabled_warnings': [ 4267, ],
216             },
217             {
218               # GN version: //content/gpu
219               'target_name': 'content_gpu',
220               'type': 'static_library',
221               'variables': { 'enable_wexit_time_destructors': 1, },
222               'includes': [
223                 'content_gpu.gypi',
224               ],
225               'dependencies': [
226                 'content_child',
227                 'content_common',
228               ],
229             },
230             {
231               # GN version: //content/plugin and //content/public/plugin
232               'target_name': 'content_plugin',
233               'type': 'static_library',
234               'variables': { 'enable_wexit_time_destructors': 1, },
235               'includes': [
236                 'content_plugin.gypi',
237               ],
238               'dependencies': [
239                 'content_child',
240                 'content_common',
241               ],
242             },
243             {
244               # GN version: //content/ppapi_plugin
245               'target_name': 'content_ppapi_plugin',
246               'type': 'static_library',
247               'variables': { 'enable_wexit_time_destructors': 1, },
248               'includes': [
249                 'content_ppapi_plugin.gypi',
250               ],
251               # Disable c4267 warnings until we fix size_t to int truncations.
252               'msvs_disabled_warnings': [ 4267, ],
253             },
254             {
255               # GN version: //content/renderer and //content/public/renderer
256               'target_name': 'content_renderer',
257               'type': 'static_library',
258               'variables': { 'enable_wexit_time_destructors': 1, },
259               'includes': [
260                 'content_renderer.gypi',
261               ],
262               'dependencies': [
263                 'content_child',
264                 'content_common',
265                 'content_resources',
266               ],
267               'export_dependent_settings': [
268                 'content_common',
269               ],
270               'conditions': [
271                 ['chromium_enable_vtune_jit_for_v8==1', {
272                   'dependencies': [
273                     '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
274                   ],
275                 }],
276               ],
277             },
278             {
279               # GN version: //content/utility and //content/public/utility
280               'target_name': 'content_utility',
281               'type': 'static_library',
282               'variables': { 'enable_wexit_time_destructors': 1, },
283               'includes': [
284                 'content_utility.gypi',
285               ],
286               'dependencies': [
287                 'content_child',
288                 'content_common',
289               ],
290             },
291           ],
292         }],
293       ],
294     },
295     {  # component != static_library
296       'targets': [
297         {
298           # GN version: //content
299           'target_name': 'content',
300           'type': 'shared_library',
301           'variables': { 'enable_wexit_time_destructors': 1, },
302           'dependencies': [
303             'content_resources',
304           ],
305           'conditions': [
306             ['chromium_enable_vtune_jit_for_v8==1', {
307               'dependencies': [
308                 '../v8/src/third_party/vtune/v8vtune.gyp:v8_vtune',
309               ],
310             }],
311           ],
312           'includes': [
313             'content_app.gypi',
314             'content_browser.gypi',
315             'content_child.gypi',
316             'content_common.gypi',
317             'content_gpu.gypi',
318             'content_plugin.gypi',
319             'content_ppapi_plugin.gypi',
320             'content_renderer.gypi',
321             'content_utility.gypi',
322           ],
323           'msvs_settings': {
324             'VCLinkerTool': {
325               'conditions': [
326                 ['incremental_chrome_dll==1', {
327                   'UseLibraryDependencyInputs': "true",
328                 }],
329               ],
330             },
331           },
332         },
333         {
334           # GN version: //content/app:browser
335           'target_name': 'content_app_browser',
336           'type': 'none',
337           'dependencies': ['content', 'content_browser'],
338         },
339         {
340           # GN version: //content/app:child
341           'target_name': 'content_app_child',
342           'type': 'none',
343           'dependencies': ['content', 'content_child'],
344         },
345         {
346           # GN version: //content/app:both
347           'target_name': 'content_app_both',
348           'type': 'none',
349           'dependencies': ['content'],
350           'export_dependent_settings': ['content'],
351         },
352         {
353           # GN version: //content/browser and //content/public/browser
354           'target_name': 'content_browser',
355           'type': 'none',
356           'dependencies': ['content'],
357           'export_dependent_settings': ['content'],
358         },
359         {
360           # GN version: //content/common and //content/public/common
361           'target_name': 'content_common',
362           'type': 'none',
363           'dependencies': ['content', 'content_resources'],
364           # Disable c4267 warnings until we fix size_t to int truncations.
365           'msvs_disabled_warnings': [ 4267, ],
366           'export_dependent_settings': ['content'],
367         },
368         {
369           # GN Version: //content/child
370           'target_name': 'content_child',
371           'type': 'none',
372           'dependencies': ['content'],
373         },
374         {
375           # GN version: //content/gpu
376           'target_name': 'content_gpu',
377           'type': 'none',
378           'dependencies': ['content'],
379         },
380         {
381           # GN version: //content/plugin
382           'target_name': 'content_plugin',
383           'type': 'none',
384           'dependencies': ['content'],
385         },
386         {
387           # GN version: //content/ppapi_plugin
388           'target_name': 'content_ppapi_plugin',
389           'type': 'none',
390           'dependencies': ['content'],
391           # Disable c4267 warnings until we fix size_t to int truncations.
392           'msvs_disabled_warnings': [ 4267, ],
393         },
394         {
395           # GN version: //content/renderer and //content/public/renderer
396           'target_name': 'content_renderer',
397           'type': 'none',
398           'dependencies': ['content'],
399           'export_dependent_settings': ['content'],
400         },
401         {
402           # GN version: //content/utility
403           'target_name': 'content_utility',
404           'type': 'none',
405           'dependencies': ['content'],
406           'export_dependent_settings': ['content'],
407         },
408       ],
409     }],
410     ['OS == "android"', {
411       'targets': [
412         {
413           'target_name': 'common_aidl',
414           'type': 'none',
415           'variables': {
416             'aidl_interface_file': 'public/android/java/src/org/chromium/content/common/common.aidl',
417             'aidl_import_include': 'public/android/java/src',
418           },
419           'sources': [
420             'public/android/java/src/org/chromium/content/common/IChildProcessCallback.aidl',
421             'public/android/java/src/org/chromium/content/common/IChildProcessService.aidl',
422           ],
423           'includes': [ '../build/java_aidl.gypi' ],
424         },
425         {
426           'target_name': 'content_java',
427           'type': 'none',
428           'dependencies': [
429             '../base/base.gyp:base',
430             '../device/battery/battery.gyp:device_battery_java',
431             '../device/vibration/vibration.gyp:device_vibration_java',
432             '../media/media.gyp:media_java',
433             '../mojo/mojo_base.gyp:mojo_system_java',
434             '../net/net.gyp:net',
435             '../third_party/mojo/mojo_public.gyp:mojo_application_bindings',
436             '../third_party/mojo/mojo_public.gyp:mojo_bindings_java',
437             '../ui/android/ui_android.gyp:ui_java',
438             '../ui/touch_selection/ui_touch_selection.gyp:selection_event_type_java',
439             '../third_party/WebKit/public/blink_headers.gyp:blink_headers_java',
440             'common_aidl',
441             'console_message_level_java',
442             'content_common',
443             'content_strings_grd',
444             'content_gamepad_mapping',
445             'gesture_event_type_java',
446             'navigation_controller_java',
447             'popup_item_type_java',
448             'result_codes_java',
449             'speech_recognition_error_java',
450             'top_controls_state_java',
451             'screen_orientation_values_java',
452           ],
453           'variables': {
454             'java_in_dir': '../content/public/android/java',
455             'has_java_resources': 1,
456             'R_package': 'org.chromium.content',
457             'R_package_relpath': 'org/chromium/content',
458           },
459           'includes': [ '../build/java.gypi' ],
460         },
461         {
462           'target_name': 'console_message_level_java',
463           'type': 'none',
464           'variables': {
465             'source_file': 'public/common/console_message_level.h',
466           },
467           'includes': [ '../build/android/java_cpp_enum.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': 'navigation_controller_java',
499           'type': 'none',
500           'variables': {
501             'source_file': 'public/browser/navigation_controller.h',
502           },
503           'includes': [ '../build/android/java_cpp_enum.gypi' ],
504         },
505         {
506           'target_name': 'popup_item_type_java',
507           'type': 'none',
508           'variables': {
509             'source_file': 'browser/android/content_view_core_impl.cc',
510           },
511           'includes': [ '../build/android/java_cpp_enum.gypi' ],
512         },
513         {
514           'target_name': 'result_codes_java',
515           'type': 'none',
516           'variables': {
517             'source_file': 'public/common/result_codes.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   ],