Cleanup: Pass std::string as const reference from pdf/
[chromium-blink-merge.git] / chrome / chrome.gyp
blob77f1d74e920fcfc4edf53a8a6222bf12e7d3a75d
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.
5   'variables': {
6     'chromium_code': 1,
8     # Define the common dependencies that contain all the actual
9     # Chromium functionality.  This list gets pulled in below by
10     # the link of the actual chrome (or chromium) executable on
11     # Linux or Mac, and into chrome.dll on Windows.
12     # NOTE: Most new includes should go in the OS!="ios" condition below.
13     #
14     # GN version is the group //chrome:browser_dependencies
15     'chromium_browser_dependencies': [
16       'common',
17       'browser',
18       '../sync/sync.gyp:sync',
19     ],
20     # GN version is the group //chrome:child_dependencies
21     'chromium_child_dependencies': [
22       'common',
23       '../sync/sync.gyp:sync',
24     ],
25     'allocator_target': '../base/allocator/allocator.gyp:allocator',
26     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
27     'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
28     'conditions': [
29       ['OS!="ios"', {
30         'chromium_browser_dependencies': [
31           'debugger',
32           '../ppapi/ppapi_internal.gyp:ppapi_host',
33         ],
34         'chromium_child_dependencies': [
35           'child',
36           'plugin',
37           'renderer',
38           'utility',
39           '../content/content.gyp:content_gpu',
40           '../content/content.gyp:content_ppapi_plugin',
41           '../third_party/WebKit/public/blink_devtools.gyp:blink_devtools_frontend_resources',
42         ],
43         'conditions': [
44           [ 'cld_version==0 or cld_version==2', {
45             'chromium_child_dependencies': [
46               # Use whatever CLD2 data access mode that the application
47               # embedder is using.
48               '<(DEPTH)/third_party/cld_2/cld_2.gyp:cld2_platform_impl', ],
49           }],
50           ['enable_plugins==1 and disable_nacl==0', {
51             'chromium_child_dependencies': [
52               '<(DEPTH)/components/nacl/renderer/plugin/plugin.gyp:nacl_trusted_plugin',
53             ],
54           }],
55         ],
56       }],
57       ['enable_basic_printing==1 or enable_print_preview==1', {
58         'chromium_browser_dependencies': [
59           '../printing/printing.gyp:printing',
60         ],
61       }],
62       ['enable_print_preview==1', {
63         'chromium_browser_dependencies': [
64           'service',
65         ],
66       }],
67       ['OS=="win"', {
68         'platform_locale_settings_grd':
69             'app/resources/locale_settings_win.grd',
70       },],
71       ['OS=="linux"', {
72         'conditions': [
73           ['chromeos==1', {
74             'platform_locale_settings_grd':
75                     'app/resources/locale_settings_<(branding_path_component)os.grd',
76           }, {  # chromeos==0
77             'platform_locale_settings_grd':
78                 'app/resources/locale_settings_linux.grd',
79           }],
80         ],
81       },],
82       ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
83         'platform_locale_settings_grd':
84             'app/resources/locale_settings_linux.grd',
85       },],
86       ['OS=="mac"', {
87         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
88         'platform_locale_settings_grd':
89             'app/resources/locale_settings_mac.grd',
90       }],  # OS=="mac"
91     ],  # conditions
92   },  # variables
93   'includes': [
94     # Place some targets in gypi files to reduce contention on this file.
95     # By using an include, we keep everything in a single xcodeproj file.
96     # Note on Win64 targets: targets that end with win64 be used
97     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
98     # by Native Client only.
99     # NOTE: Most new includes should go in the OS!="ios" condition below.
100     '../build/chrome_settings.gypi',
101     '../build/util/version.gypi',
102     '../build/win_precompile.gypi',
103     'chrome_browser.gypi',
104     'chrome_browser_ui.gypi',
105     'chrome_common.gypi',
106     'chrome_installer_util.gypi',
107   ],
108   'conditions': [
109     ['OS!="ios"', {
110       'includes': [
111         '../apps/apps.gypi',
112         'chrome_child.gypi',
113         'chrome_debugger.gypi',
114         'chrome_dll.gypi',
115         'chrome_exe.gypi',
116         'chrome_installer.gypi',
117         'chrome_plugin.gypi',
118         'chrome_renderer.gypi',
119         'chrome_tests.gypi',
120         'chrome_tests_unit.gypi',
121         'chrome_utility.gypi',
122         'policy_templates.gypi',
123       ],
124       'targets': [
125         {
126           # GN version: //chrome/browser/extensions/default_extensions
127           'target_name': 'default_extensions',
128           'type': 'none',
129           'conditions': [
130             ['OS=="win"', {
131               'copies': [
132                 {
133                   'destination': '<(PRODUCT_DIR)/extensions',
134                   'files': [
135                     'browser/extensions/default_extensions/external_extensions.json'
136                   ]
137                 }
138               ],
139             }]
140           ],
141         },
142       ],
143     }],  # OS!="ios"
144     ['OS=="mac"', {
145       'includes': [
146         'app_shim/app_shim.gypi',
147         'browser/apps/app_shim/browser_app_shim.gypi',
148       ],
149       'targets': [
150         {
151           'target_name': 'helper_app',
152           'type': 'executable',
153           'variables': { 'enable_wexit_time_destructors': 1, },
154           'product_name': '<(mac_product_name) Helper',
155           'mac_bundle': 1,
156           'dependencies': [
157             'chrome_dll',
158             'infoplist_strings_tool',
159           ],
160           'sources': [
161             # chrome_exe_main_mac.cc's main() is the entry point for
162             # the "chrome" (browser app) target.  All it does is jump
163             # to chrome_dll's ChromeMain.  This is appropriate for
164             # helper processes too, because the logic to discriminate
165             # between process types at run time is actually directed
166             # by the --type command line argument processed by
167             # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
168             # browser app will suffice for now.
169             'app/chrome_exe_main_mac.cc',
170             'app/helper-Info.plist',
171           ],
172           # TODO(mark): Come up with a fancier way to do this.  It should only
173           # be necessary to list helper-Info.plist once, not the three times it
174           # is listed here.
175           'mac_bundle_resources!': [
176             'app/helper-Info.plist',
177           ],
178           # TODO(mark): For now, don't put any resources into this app.  Its
179           # resources directory will be a symbolic link to the browser app's
180           # resources directory.
181           'mac_bundle_resources/': [
182             ['exclude', '.*'],
183           ],
184           'xcode_settings': {
185             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
186             'CHROMIUM_SHORT_NAME': '<(branding)',
187             'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
188             'INFOPLIST_FILE': 'app/helper-Info.plist',
189           },
190           'postbuilds': [
191             {
192               # The helper doesn't have real localizations, it just has
193               # empty .lproj directories, which is enough to convince Cocoa
194               # that anything running out of the helper .app supports those
195               # languages.
196               'postbuild_name': 'Make Empty Localizations',
197               'variables': {
198                 'locale_dirs': [
199                   '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
200                 ],
201               },
202               'action': [
203                 'tools/build/mac/make_locale_dirs.sh',
204                 '<@(locale_dirs)',
205               ],
206             },
207             {
208               # The framework (chrome_dll) defines its load-time path
209               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
210               # (chrome).  A different relative path needs to be used in
211               # helper_app.
212               'postbuild_name': 'Fix Framework Link',
213               'action': [
214                 'install_name_tool',
215                 '-change',
216                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
217                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
218                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
219               ],
220             },
221             {
222               # Modify the Info.plist as needed.  The script explains why this
223               # is needed.  This is also done in the chrome and chrome_dll
224               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
225               # are used because Breakpad, Keystone, and SCM keys are
226               # never placed into the helper.
227               'postbuild_name': 'Tweak Info.plist',
228               'action': ['<(tweak_info_plist_path)',
229                          '--breakpad=0',
230                          '--keystone=0',
231                          '--scm=0'],
232             },
233           ],
234           'conditions': [
235             ['mac_breakpad==1', {
236               'variables': {
237                 # A real .dSYM is needed for dump_syms to operate on.
238                 'mac_real_dsym': 1,
239               },
240               'xcode_settings': {
241                 # With mac_real_dsym set, strip_from_xcode won't be used.
242                 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
243                 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
244               },
245             }],
246             ['component=="shared_library"', {
247               'xcode_settings': {
248                 'LD_RUNPATH_SEARCH_PATHS': [
249                   # Get back from Chromium.app/Contents/Versions/V/
250                   #                                    Helper.app/Contents/MacOS
251                   '@loader_path/../../../../../../..',
252                 ],
253               },
254             }],
255           ],
256         },  # target helper_app
257         {
258           # A library containing the actual code for the app mode app, shared
259           # by unit tests.
260           # GN: //chrome/common:app_mode_app_support
261           'target_name': 'app_mode_app_support',
262           'type': 'static_library',
263           'variables': { 'enable_wexit_time_destructors': 1, },
264           'product_name': 'app_mode_app_support',
265           'dependencies': [
266             '../base/base.gyp:base',
267             'common_constants.gyp:common_constants',
268           ],
269           'sources': [
270             'common/mac/app_mode_chrome_locator.h',
271             'common/mac/app_mode_chrome_locator.mm',
272             'common/mac/app_mode_common.h',
273             'common/mac/app_mode_common.mm',
274           ],
275           'include_dirs': [
276             '..',
277           ],
278         },  # target app_mode_app_support
279         {
280           # Convenience target to build a disk image.
281           'target_name': 'build_app_dmg',
282           # Don't place this in the 'all' list; most won't want it.
283           # In GYP, booleans are 0/1, not True/False.
284           'suppress_wildcard': 1,
285           'type': 'none',
286           'dependencies': [
287             'chrome',
288           ],
289           'variables': {
290             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
291             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
293             'conditions': [
294               # This duplicates the output path from build_app_dmg.
295               ['branding=="Chrome"', {
296                 'dmg_name': 'GoogleChrome.dmg',
297               }, { # else: branding!="Chrome"
298                 'dmg_name': 'Chromium.dmg',
299               }],
300             ],
301           },
302           'actions': [
303             {
304               'inputs': [
305                 '<(build_app_dmg_script_path)',
306                 '<(pkg_dmg_script_path)',
307                 '<(PRODUCT_DIR)/<(mac_product_name).app',
308               ],
309               'outputs': [
310                 '<(PRODUCT_DIR)/<(dmg_name)',
311               ],
312               'action_name': 'build_app_dmg',
313               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
314             },
315           ],  # 'actions'
316         },
317         {
318           'target_name': 'infoplist_strings_tool',
319           'type': 'executable',
320           'variables': { 'enable_wexit_time_destructors': 1, },
321           'dependencies': [
322             'chrome_resources.gyp:chrome_strings',
323             '../base/base.gyp:base',
324             '../ui/base/ui_base.gyp:ui_base',
325             '../ui/gfx/gfx.gyp:gfx',
326             '../ui/gfx/gfx.gyp:gfx_geometry',
327           ],
328           'include_dirs': [
329             '<(grit_out_dir)',
330           ],
331           'sources': [
332             'tools/mac_helpers/infoplist_strings_util.mm',
333           ],
334         },
335       ],  # targets
336     }],  # OS=="mac"
337     ['OS=="linux"',
338       { 'targets': [
339         {
340           # GN version: //chrome:linux_symbols
341           'target_name': 'linux_symbols',
342           'type': 'none',
343           'conditions': [
344             ['linux_dump_symbols==1', {
345               'actions': [
346                 {
347                   'action_name': 'dump_symbols',
348                   'inputs': [
349                     '<(DEPTH)/build/linux/dump_app_syms.py',
350                     '<(PRODUCT_DIR)/dump_syms',
351                     '<(PRODUCT_DIR)/chrome',
352                   ],
353                   'outputs': [
354                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
355                   ],
356                   'action': ['python',
357                              '<(DEPTH)/build/linux/dump_app_syms.py',
358                              '<(PRODUCT_DIR)/dump_syms',
359                              '<(linux_strip_binary)',
360                              '<(PRODUCT_DIR)/chrome',
361                              '<@(_outputs)'],
362                   'message': 'Dumping breakpad symbols to <(_outputs)',
363                   'process_outputs_as_sources': 1,
364                 },
365               ],
366               'dependencies': [
367                 'chrome',
368                 '../breakpad/breakpad.gyp:dump_syms#host',
369               ],
370             }],
371           ],
372         },
373       ],
374     }],  # OS=="linux"
375     ['OS=="win"',
376       { 'targets': [
377         {
378           # For historical reasons, chrome/chrome.sln has been the entry point
379           # for new Chrome developers. To assist development, include several
380           # core unittests that are otherwise only accessible side-by-side with
381           # chrome via all/all.sln.
382           'target_name': 'test_targets',
383           'type': 'none',
384           'dependencies': [
385             '../base/base.gyp:base_unittests',
386             '../content/content_shell_and_tests.gyp:content_browsertests',
387             '../content/content_shell_and_tests.gyp:content_shell',
388             '../content/content_shell_and_tests.gyp:content_unittests',
389             '../net/net.gyp:net_unittests',
390             '../ui/base/ui_base_tests.gyp:ui_base_unittests',
391           ],
392         },
393         {
394           # GN version: //chrome:chrome_version_resources
395           'target_name': 'chrome_version_resources',
396           'type': 'none',
397           'variables': {
398             'output_dir': 'chrome_version',
399             'template_input_path': 'app/chrome_version.rc.version',
400             'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
401           },
402           'direct_dependent_settings': {
403             'include_dirs': [
404               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
405             ],
406           },
407           'sources': [
408             'app/chrome_exe.ver',
409             'app/chrome_dll.ver',
410             'app/nacl64_exe.ver',
411             'app/other.ver',
412           ],
413           'includes': [
414             'version_resource_rules.gypi',
415           ],
416         },
417         {
418           # GN version: //chrome:version_header
419           'target_name': 'chrome_version_header',
420           'type': 'none',
421           'hard_dependency': 1,
422           'actions': [
423             {
424               'action_name': 'version_header',
425               'variables': {
426                 'lastchange_path':
427                   '<(DEPTH)/build/util/LASTCHANGE',
428                 'branding_path': 'app/theme/<(branding_path_component)/BRANDING',
429               },
430               'inputs': [
431                 '<(version_path)',
432                 '<(branding_path)',
433                 '<(lastchange_path)',
434                 'version.h.in',
435               ],
436               'outputs': [
437                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
438               ],
439               'action': [
440                 'python',
441                 '<(version_py_path)',
442                 '-f', '<(version_path)',
443                 '-f', '<(branding_path)',
444                 '-f', '<(lastchange_path)',
445                 'version.h.in',
446                 '<@(_outputs)',
447               ],
448               'message': 'Generating version header file: <@(_outputs)',
449             },
450           ],
451         },
452         {
453           'target_name': 'crash_service',
454           'type': 'executable',
455           'dependencies': [
456             'installer_util',
457             '../base/base.gyp:base',
458             '../chrome/common_constants.gyp:common_constants',
459             '../components/components.gyp:breakpad_crash_service',
460           ],
461           'include_dirs': [
462             '..',
463           ],
464           'sources': [
465             'tools/crash_service/main.cc',
466           ],
467           'msvs_settings': {
468             'VCLinkerTool': {
469               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
470             },
471           },
472         },
473         {
474           'target_name': 'sb_sigutil',
475           'type': 'executable',
476           'dependencies': [
477             '../base/base.gyp:base',
478             '../crypto/crypto.gyp:crypto',
479             'safe_browsing_proto',
480           ],
481           'sources': [
482             'common/safe_browsing/binary_feature_extractor.cc',
483             'common/safe_browsing/binary_feature_extractor.h',
484             'common/safe_browsing/binary_feature_extractor_win.cc',
485             'common/safe_browsing/pe_image_reader_win.cc',
486             'common/safe_browsing/pe_image_reader_win.h',
487             'tools/safe_browsing/sb_sigutil.cc',
488           ],
489         },
490       ],  # 'targets'
491       'includes': [
492         'app_shim/app_shim_win.gypi',
493         'chrome_watcher/chrome_watcher.gypi',
494         'chrome_process_finder.gypi',
495         'metro_utils.gypi',
496       ],
497     }],  # OS=="win"
498     ['OS=="win" and target_arch=="ia32"',
499       { 'targets': [
500         {
501           'target_name': 'chrome_user32_delay_imports',
502           'type': 'none',
503           'variables': {
504             'lib_dir': '<(INTERMEDIATE_DIR)',
505           },
506           'sources': [
507               'chrome.user32.delay.imports'
508           ],
509           'includes': [
510               '../build/win/importlibs/create_import_lib.gypi',
511           ],
512           'direct_dependent_settings': {
513             'msvs_settings': {
514               'VCLinkerTool': {
515                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
516                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
517               },
518             },
519           },
520         },
521         {
522           'target_name': 'crash_service_win64',
523           'type': 'executable',
524           'product_name': 'crash_service64',
525           'dependencies': [
526             'installer_util_nacl_win64',
527             '../base/base.gyp:base_static_win64',
528             '../chrome/common_constants.gyp:common_constants_win64',
529             '../components/components.gyp:breakpad_crash_service_win64',
530           ],
531           'include_dirs': [
532             '..',
533           ],
534           'sources': [
535             '../content/public/common/content_switches.cc',
536             'tools/crash_service/main.cc',
537           ],
538           'defines': [
539             'COMPILE_CONTENT_STATICALLY',
540           ],
541           'msvs_settings': {
542             'VCLinkerTool': {
543               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
544             },
545           },
546           'configurations': {
547             'Common_Base': {
548               'msvs_target_platform': 'x64',
549             },
550           },
551         },
552       ]},  # 'targets'
553     ],  # OS=="win" and target_arch=="ia32"
554     ['chromeos==1', {
555       'includes': [ 'chrome_browser_chromeos.gypi' ],
556     }],  # chromeos==1
557     ['OS=="android"',
558       {
559       'targets': [
560         {
561           # GN: //chrome/android:chrome_java
562           'target_name': 'chrome_java',
563           'type': 'none',
564           'dependencies': [
565             'activity_type_ids_java',
566             'chrome_locale_paks',
567             'chrome_resources.gyp:chrome_strings',
568             'chrome_strings_grd',
569             'chrome_version_java',
570             'connection_security_levels_java',
571             'connectivity_check_result_java',
572             'document_tab_model_info_proto_java',
573             'infobar_action_type_java',
574             'profile_account_management_metrics_java',
575             'content_setting_java',
576             'content_settings_type_java',
577             'page_info_connection_type_java',
578             'resource_id_java',
579             'tab_load_status_java',
580             'shortcut_source_java',
581             '../base/base.gyp:base',
582             '../chrome/android/chrome_apk.gyp:custom_tabs_service_aidl',
583             '../components/components.gyp:bookmarks_java',
584             '../components/components.gyp:dom_distiller_core_java',
585             '../components/components.gyp:enhanced_bookmarks_java_enums_srcjar',
586             '../components/components.gyp:gcm_driver_java',
587             '../components/components.gyp:invalidation_java',
588             '../components/components.gyp:navigation_interception_java',
589             '../components/components.gyp:offline_pages_enums_java',
590             '../components/components.gyp:precache_java',
591             '../components/components.gyp:safe_json_java',
592             '../components/components.gyp:service_tab_launcher_java',
593             '../components/components.gyp:signin_core_browser_java',
594             '../components/components.gyp:variations_java',
595             '../components/components.gyp:web_contents_delegate_android_java',
596             '../content/content.gyp:content_java',
597             '../media/media.gyp:media_java',
598             '../printing/printing.gyp:printing_java',
599             '../sync/sync.gyp:sync_java',
600             '../third_party/android_data_chart/android_data_chart.gyp:android_data_chart_java',
601             '../third_party/android_media/android_media.gyp:android_media_java',
602             '../third_party/android_protobuf/android_protobuf.gyp:protobuf_nano_javalib',
603             '../third_party/android_swipe_refresh/android_swipe_refresh.gyp:android_swipe_refresh_java',
604             '../third_party/android_tools/android_tools.gyp:android_support_design_javalib',
605             '../third_party/android_tools/android_tools.gyp:android_support_v7_appcompat_javalib',
606             '../third_party/android_tools/android_tools.gyp:android_support_v7_mediarouter_javalib',
607             '../third_party/android_tools/android_tools.gyp:android_support_v7_recyclerview_javalib',
608             '../third_party/android_tools/android_tools.gyp:android_support_v13_javalib',
609             '../third_party/android_tools/android_tools.gyp:google_play_services_javalib',
610             '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib',
611             '../third_party/jsr-305/jsr-305.gyp:jsr_305_javalib',
612             '../ui/android/ui_android.gyp:ui_java',
613           ],
614           'variables': {
615             'variables': {
616               'android_branding_res_dirs%': ['<(java_in_dir)/res_chromium'],
617             },
618             'java_in_dir': '../chrome/android/java',
619             'has_java_resources': 1,
620             'R_package': 'org.chromium.chrome',
621             'R_package_relpath': 'org/chromium/chrome',
622             # Include channel-specific resources and xml string files generated
623             # from generated_resources.grd
624             'res_extra_dirs': [
625               '<@(android_branding_res_dirs)',
626               '<(SHARED_INTERMEDIATE_DIR)/chrome/java/res',
627             ],
628             'res_extra_files': [
629               '<!@(find <(android_branding_res_dirs) -type f)',
630               '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)',
631             ],
632           },
633           'conditions': [
634             ['configuration_policy == 1', {
635               'dependencies': [
636                 '../components/components.gyp:app_restrictions_resources',
637                 '../components/components.gyp:policy_java',
638               ],
639             }],
640           ],
641           'includes': [
642             '../build/java.gypi',
643           ],
644         },
645         {
646           # GN: //chrome/android:chrome_strings_grd
647           'target_name': 'chrome_strings_grd',
648           'type': 'none',
649           'variables': {
650             'grd_file': '../chrome/android/java/strings/android_chrome_strings.grd',
651           },
652           'includes': [
653             '../build/java_strings_grd.gypi',
654           ],
655         },
656         {
657           # GN: //chrome/android:chrome_locale_paks
658           'target_name': 'chrome_locale_paks',
659           'type': 'none',
660           'variables': {
661             'package_name': 'chrome_locale_paks',
662             'locale_pak_files': [ '<@(chrome_android_pak_locale_resources)' ],
663           },
664           'includes': [
665             'chrome_android_paks.gypi',
666             '../build/android/locale_pak_resources.gypi',
667           ],
668         },
669         {
670           # GN: //chrome:content_setting_javagen
671           'target_name': 'content_setting_java',
672           'type': 'none',
673           'variables': {
674             'source_file': '../components/content_settings/core/common/content_settings.h',
675           },
676           'includes': [ '../build/android/java_cpp_enum.gypi' ],
677         },
678         {
679           # GN: //chrome:content_settings_type_javagen
680           'target_name': 'content_settings_type_java',
681           'type': 'none',
682           'variables': {
683             'source_file': '../components/content_settings/core/common/content_settings_types.h',
684           },
685           'includes': [ '../build/android/java_cpp_enum.gypi' ],
686         },
687         {
688           # GN: //chrome:page_info_connection_type_javagen
689           'target_name': 'page_info_connection_type_java',
690           'type': 'none',
691           'variables': {
692             'source_file': 'browser/ui/android/website_settings_popup_android.h',
693           },
694           'includes': [ '../build/android/java_cpp_enum.gypi' ],
695         },
696       ], # 'targets'
697       'includes': [
698         'chrome_android.gypi',
699       ]}, # 'includes'
700     ],  # OS=="android"
701     ['configuration_policy==1 and OS!="android" and OS!="ios"', {
702       'includes': [ 'policy.gypi', ],
703     }],
704     ['enable_extensions==1', {
705       'includes': [
706         'chrome_browser_extensions.gypi',
707       ],
708     }],
709     ['enable_print_preview==1', {
710       'targets': [
711         {
712           # GN version: //chrome/service
713           'target_name': 'service',
714           'type': 'static_library',
715           'variables': { 'enable_wexit_time_destructors': 1, },
716           'dependencies': [
717             'chrome_resources.gyp:chrome_strings',
718             'common',
719             '../base/base.gyp:base',
720             '../components/components.gyp:cloud_devices_common',
721             '../google_apis/google_apis.gyp:google_apis',
722             '../jingle/jingle.gyp:notifier',
723             '../net/net.gyp:net',
724             '../printing/printing.gyp:printing',
725             '../skia/skia.gyp:skia',
726           ],
727           'sources': [
728             # Note: sources list duplicated in GN build.
729             'service/cloud_print/cdd_conversion_win.cc',
730             'service/cloud_print/cdd_conversion_win.h',
731             'service/cloud_print/cloud_print_auth.cc',
732             'service/cloud_print/cloud_print_auth.h',
733             'service/cloud_print/cloud_print_connector.cc',
734             'service/cloud_print/cloud_print_connector.h',
735             'service/cloud_print/cloud_print_message_handler.cc',
736             'service/cloud_print/cloud_print_message_handler.h',
737             'service/cloud_print/cloud_print_proxy.cc',
738             'service/cloud_print/cloud_print_proxy.h',
739             'service/cloud_print/cloud_print_proxy_backend.cc',
740             'service/cloud_print/cloud_print_proxy_backend.h',
741             'service/cloud_print/cloud_print_service_helpers.cc',
742             'service/cloud_print/cloud_print_service_helpers.h',
743             'service/cloud_print/cloud_print_token_store.cc',
744             'service/cloud_print/cloud_print_token_store.h',
745             'service/cloud_print/cloud_print_url_fetcher.cc',
746             'service/cloud_print/cloud_print_url_fetcher.h',
747             'service/cloud_print/cloud_print_wipeout.cc',
748             'service/cloud_print/cloud_print_wipeout.h',
749             'service/cloud_print/connector_settings.cc',
750             'service/cloud_print/connector_settings.h',
751             'service/cloud_print/job_status_updater.cc',
752             'service/cloud_print/job_status_updater.h',
753             'service/cloud_print/print_system.cc',
754             'service/cloud_print/print_system.h',
755             'service/cloud_print/print_system_win.cc',
756             'service/cloud_print/printer_job_handler.cc',
757             'service/cloud_print/printer_job_handler.h',
758             'service/cloud_print/printer_job_queue_handler.cc',
759             'service/cloud_print/printer_job_queue_handler.h',
760             'service/net/service_url_request_context_getter.cc',
761             'service/net/service_url_request_context_getter.h',
762             'service/service_ipc_server.cc',
763             'service/service_ipc_server.h',
764             'service/service_main.cc',
765             'service/service_process.cc',
766             'service/service_process.h',
767             'service/service_process_prefs.cc',
768             'service/service_process_prefs.h',
769             'service/service_utility_process_host.cc',
770             'service/service_utility_process_host.h',
771           ],
772           'include_dirs': [
773             '..',
774           ],
775           'conditions': [
776             ['use_cups==1', {
777               'dependencies': [
778                 '../printing/printing.gyp:cups',
779               ],
780               'sources': [
781                 'service/cloud_print/print_system_cups.cc',
782               ],
783             }],
784             ['OS!="win" and use_cups!=1', {
785               'sources': [
786                 'service/cloud_print/print_system_dummy.cc',
787               ],
788             }],
789             ['OS!="win"', {
790               'sources!': [
791                 'service/service_utility_process_host.cc',
792                 'service/service_utility_process_host.h',
793               ],
794             }],
795           ],
796         },
797       ],
798     }],
799     ['kasko==1', {
800       'variables': {
801         'kasko_exe_dir': '<(DEPTH)/third_party/kasko',
802       },
803       'targets': [
804         {
805           'target_name': 'kasko_dll',
806           'type': 'none',
807           'outputs': [
808             '<(PRODUCT_DIR)/kasko.dll',
809             '<(PRODUCT_DIR)/kasko.dll.pdb',
810           ],
811           'copies': [
812             {
813               'destination': '<(PRODUCT_DIR)',
814               'files': [
815                 '<(kasko_exe_dir)/kasko.dll',
816                 '<(kasko_exe_dir)/kasko.dll.pdb',
817               ],
818             },
819           ],
820           'direct_dependent_settings': {
821             'msvs_settings': {
822               'VCLinkerTool': {
823                 'AdditionalDependencies': [
824                   'kasko.dll.lib',
825                 ],
826                 'AdditionalLibraryDirectories': [
827                   '<(DEPTH)/third_party/kasko'
828                 ],
829               },
830             },
831           },
832         },
833       ],
834     }],
835   ],  # 'conditions'