Removed unused NeedKey callback from Decryptors.
[chromium-blink-merge.git] / chrome / chrome.gyp
blob4fced1bf88604a253a13cabaa879c3e86eb51aa2
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     'chromium_browser_dependencies': [
14       'common',
15       'browser',
16       '../content/content.gyp:content_app',
17       '../sync/sync.gyp:sync',
18     ],
19     'chromium_child_dependencies': [
20       'common',
21       '../content/content.gyp:content_app',
22       '../sync/sync.gyp:sync',
23     ],
24     'allocator_target': '../base/allocator/allocator.gyp:allocator',
25     'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
26     'protoc_out_dir': '<(SHARED_INTERMEDIATE_DIR)/protoc_out',
27     'repack_locales_cmd': ['python', 'tools/build/repack_locales.py'],
28     # TODO: remove this helper when we have loops in GYP
29     'apply_locales_cmd': ['python', '<(DEPTH)/build/apply_locales.py'],
30     'conditions': [
31       ['OS!="ios"', {
32         'chromium_browser_dependencies': [
33           'debugger',
34           '../content/content.gyp:content_ppapi_plugin',
35           '../printing/printing.gyp:printing',
36         ],
37         'chromium_child_dependencies': [
38           'debugger',
39           'plugin',
40           'renderer',
41           'utility',
42           '../content/content.gyp:content_gpu',
43           '../content/content.gyp:content_ppapi_plugin',
44           '../content/content.gyp:content_worker',
45           '../printing/printing.gyp:printing',
46           '../third_party/WebKit/Source/devtools/devtools.gyp:devtools_frontend_resources',
47         ],
48       }],
49       ['OS=="win"', {
50         'nacl_defines': [
51           'NACL_WINDOWS=1',
52           'NACL_LINUX=0',
53           'NACL_OSX=0',
54         ],
55         'platform_locale_settings_grd':
56             'app/resources/locale_settings_win.grd',
57       },],
58       ['OS!="android" and OS!="ios"', {
59         'chromium_browser_dependencies': [
60           # Android doesn't use the service process (only needed for print).
61           'service',
62         ],
63       }],
64       ['OS=="linux"', {
65         'nacl_defines': [
66           'NACL_WINDOWS=0',
67           'NACL_LINUX=1',
68           'NACL_OSX=0',
69         ],
70         'conditions': [
71           ['chromeos==1', {
72             'conditions': [
73               ['branding=="Chrome"', {
74                 'platform_locale_settings_grd':
75                     'app/resources/locale_settings_google_chromeos.grd',
76               }, {  # branding!=Chrome
77                 'platform_locale_settings_grd':
78                     'app/resources/locale_settings_chromiumos.grd',
79               }],
80             ]
81           }, {  # chromeos==0
82             'platform_locale_settings_grd':
83                 'app/resources/locale_settings_linux.grd',
84           }],
85         ],
86       },],
87       ['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "linux"', {
88         'platform_locale_settings_grd':
89             'app/resources/locale_settings_linux.grd',
90       },],
91       ['OS=="mac"', {
92         'tweak_info_plist_path': '../build/mac/tweak_info_plist.py',
93         'nacl_defines': [
94           'NACL_WINDOWS=0',
95           'NACL_LINUX=0',
96           'NACL_OSX=1',
97         ],
98         'platform_locale_settings_grd':
99             'app/resources/locale_settings_mac.grd',
100         'conditions': [
101           ['branding=="Chrome"', {
102             'mac_bundle_id': 'com.google.Chrome',
103             'mac_creator': 'rimZ',
104             # The policy .grd file also needs the bundle id.
105             'grit_defines': ['-D', 'mac_bundle_id=com.google.Chrome'],
106           }, {  # else: branding!="Chrome"
107             'mac_bundle_id': 'org.chromium.Chromium',
108             'mac_creator': 'Cr24',
109             # The policy .grd file also needs the bundle id.
110             'grit_defines': ['-D', 'mac_bundle_id=org.chromium.Chromium'],
111           }],  # branding
112         ],  # conditions
113       }],  # OS=="mac"
114       # TODO(mcgrathr): This duplicates native_client/build/common.gypi;
115       # we should figure out a way to unify the settings.
116       ['target_arch=="ia32"', {
117         'nacl_defines': [
118           'NACL_TARGET_SUBARCH=32',
119           'NACL_TARGET_ARCH=x86',
120           'NACL_BUILD_SUBARCH=32',
121           'NACL_BUILD_ARCH=x86',
122         ],
123       }],
124       ['target_arch=="x64"', {
125         'nacl_defines': [
126           'NACL_TARGET_SUBARCH=64',
127           'NACL_TARGET_ARCH=x86',
128           'NACL_BUILD_SUBARCH=64',
129           'NACL_BUILD_ARCH=x86',
130         ],
131       }],
132       ['target_arch=="arm"', {
133         'nacl_defines': [
134           'NACL_BUILD_ARCH=arm',
135           'NACL_BUILD_SUBARCH=32',
136           'NACL_TARGET_ARCH=arm',
137           'NACL_TARGET_SUBARCH=32',
138         ],
139       }],
140       ['target_arch=="mipsel"', {
141         'nacl_defines': [
142         ],
143       }],
144     ],  # conditions
145   },  # variables
146   'includes': [
147     # Place some targets in gypi files to reduce contention on this file.
148     # By using an include, we keep everything in a single xcodeproj file.
149     # Note on Win64 targets: targets that end with win64 be used
150     # on 64-bit Windows only. Targets that end with nacl_win64 should be used
151     # by Native Client only.
152     # NOTE: Most new includes should go in the OS!="ios" condition below.
153     '../build/win_precompile.gypi',
154     'chrome_browser.gypi',
155     'chrome_browser_ui.gypi',
156     'chrome_common.gypi',
157     'chrome_installer_util.gypi',
158     'chrome_tests_unit.gypi',
159     'version.gypi',
160   ],
161   'conditions': [
162     ['OS!="ios"', {
163       'includes': [
164         'app/policy/policy_templates.gypi',
165         'chrome_browser_extensions.gypi',
166         'chrome_dll.gypi',
167         'chrome_exe.gypi',
168         'chrome_installer.gypi',
169         'chrome_renderer.gypi',
170         'chrome_tests.gypi',
171         'nacl.gypi',
172         '../apps/apps.gypi',
173       ],
174       'targets': [
175         {
176           'target_name': 'default_extensions',
177           'type': 'none',
178           'conditions': [
179             ['OS=="win"', {
180               'copies': [
181                 {
182                   'destination': '<(PRODUCT_DIR)/extensions',
183                   'files': [
184                     'browser/extensions/default_extensions/external_extensions.json'
185                   ]
186                 }
187               ],
188             }],
189             ['OS=="linux" and chromeos==1 and branding=="Chrome"', {
190               'copies': [
191                 {
192                   'destination': '<(PRODUCT_DIR)',
193                   'files': [
194                     'browser/extensions/default_extensions/chromeos/extensions/'
195                   ]
196                 }
197               ],
198             }],
199           ],
200         },
201         {
202           'target_name': 'debugger',
203           'type': 'static_library',
204           'variables': { 'enable_wexit_time_destructors': 1, },
205           'dependencies': [
206             'chrome_resources.gyp:chrome_extra_resources',
207             'chrome_resources.gyp:chrome_resources',
208             'chrome_resources.gyp:chrome_strings',
209             'chrome_resources.gyp:theme_resources',
210             'common/extensions/api/api.gyp:api',
211             '../base/base.gyp:base',
212             '../content/content.gyp:content_browser',
213             '../net/net.gyp:http_server',
214             '../net/net.gyp:net',
215             '../skia/skia.gyp:skia',
216             '../third_party/icu/icu.gyp:icui18n',
217             '../third_party/icu/icu.gyp:icuuc',
218             '../third_party/leveldatabase/leveldatabase.gyp:leveldatabase',
219           ],
220           'include_dirs': [
221             '..',
222           ],
223           'sources': [
224             'browser/devtools/adb_client_socket.cc',
225             'browser/devtools/adb_client_socket.h',
226             'browser/devtools/browser_list_tabcontents_provider.cc',
227             'browser/devtools/browser_list_tabcontents_provider.h',
228             'browser/devtools/devtools_adb_bridge.cc',
229             'browser/devtools/devtools_adb_bridge.h',
230             'browser/devtools/devtools_file_helper.cc',
231             'browser/devtools/devtools_file_helper.h',
232             'browser/devtools/devtools_toggle_action.h',
233             'browser/devtools/devtools_window.cc',
234             'browser/devtools/devtools_window.h',
235             'browser/devtools/remote_debugging_server.cc',
236             'browser/devtools/remote_debugging_server.h',
237             'browser/devtools/tethering_adb_filter.cc',
238             'browser/devtools/tethering_adb_filter.h',
239           ],
240           'conditions': [
241             ['toolkit_uses_gtk == 1', {
242               'dependencies': [
243                 '../build/linux/system.gyp:gtk',
244               ],
245             }],
246             ['OS=="android"', {
247               'sources!': [
248                 'browser/devtools/browser_list_tabcontents_provider.cc',
249                 'browser/devtools/devtools_window.cc',
250                 'browser/devtools/remote_debugging_server.cc',
251               ],
252             }],
253             ['debug_devtools==1', {
254               'defines': [
255                 'DEBUG_DEVTOOLS=1',
256                ],
257             }],
258           ],
259           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
260           'msvs_disabled_warnings': [ 4267, ],
261         },
262         {
263           'target_name': 'plugin',
264           'type': 'static_library',
265           'variables': { 'enable_wexit_time_destructors': 1, },
266           'dependencies': [
267             'chrome_resources.gyp:chrome_strings',
268             '../base/base.gyp:base',
269             '../content/content.gyp:content_plugin',
270           ],
271           'sources': [
272             'plugin/chrome_content_plugin_client.cc',
273             'plugin/chrome_content_plugin_client.h',
274           ],
275           'include_dirs': [
276             '..',
277             '<(grit_out_dir)',
278           ],
279         },
280         {
281           'target_name': 'utility',
282           'type': 'static_library',
283           'variables': { 'enable_wexit_time_destructors': 1, },
284           'dependencies': [
285             '../base/base.gyp:base',
286             '../content/content.gyp:content_utility',
287             '../skia/skia.gyp:skia',
288             '../third_party/libxml/libxml.gyp:libxml',
289           ],
290           'sources': [
291             'utility/chrome_content_utility_client.cc',
292             'utility/chrome_content_utility_client.h',
293             'utility/itunes_pref_parser_win.cc',
294             'utility/itunes_pref_parser_win.h',
295             'utility/profile_import_handler.cc',
296             'utility/profile_import_handler.h',
297           ],
298           'include_dirs': [
299             '..',
300           ],
301           'conditions': [
302             ['toolkit_uses_gtk == 1', {
303               'dependencies': [
304                 '../build/linux/system.gyp:gtk',
305               ],
306             }],
307             ['OS=="android"', {
308               'sources!': [
309                 'utility/profile_import_handler.cc',
310               ],
311             }],
312           ],
313           # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
314           'msvs_disabled_warnings': [ 4267, ],
315         },
316         {
317           'target_name': 'service',
318           'type': 'static_library',
319           'variables': { 'enable_wexit_time_destructors': 1, },
320           'dependencies': [
321             'chrome_resources.gyp:chrome_strings',
322             'common',
323             'common_net',
324             '../base/base.gyp:base',
325             '../google_apis/google_apis.gyp:google_apis',
326             '../jingle/jingle.gyp:notifier',
327             '../net/net.gyp:net',
328             '../printing/printing.gyp:printing',
329             '../skia/skia.gyp:skia',
330             '../third_party/libjingle/libjingle.gyp:libjingle',
331           ],
332           'sources': [
333             'service/chrome_service_application_mac.h',
334             'service/chrome_service_application_mac.mm',
335             'service/service_ipc_server.cc',
336             'service/service_ipc_server.h',
337             'service/service_main.cc',
338             'service/service_process.cc',
339             'service/service_process.h',
340             'service/service_process_prefs.cc',
341             'service/service_process_prefs.h',
342             'service/service_utility_process_host.cc',
343             'service/service_utility_process_host.h',
344             'service/cloud_print/cloud_print_auth.cc',
345             'service/cloud_print/cloud_print_auth.h',
346             'service/cloud_print/cloud_print_connector.cc',
347             'service/cloud_print/cloud_print_connector.h',
348             'service/cloud_print/cloud_print_helpers.cc',
349             'service/cloud_print/cloud_print_helpers.h',
350             'service/cloud_print/cloud_print_proxy.cc',
351             'service/cloud_print/cloud_print_proxy.h',
352             'service/cloud_print/cloud_print_proxy_backend.cc',
353             'service/cloud_print/cloud_print_proxy_backend.h',
354             'service/cloud_print/cloud_print_token_store.cc',
355             'service/cloud_print/cloud_print_token_store.h',
356             'service/cloud_print/cloud_print_url_fetcher.cc',
357             'service/cloud_print/cloud_print_url_fetcher.h',
358             'service/cloud_print/cloud_print_wipeout.cc',
359             'service/cloud_print/cloud_print_wipeout.h',
360             'service/cloud_print/connector_settings.cc',
361             'service/cloud_print/connector_settings.h',
362             'service/cloud_print/job_status_updater.cc',
363             'service/cloud_print/job_status_updater.h',
364             'service/cloud_print/print_system_dummy.cc',
365             'service/cloud_print/print_system.cc',
366             'service/cloud_print/print_system.h',
367             'service/cloud_print/printer_job_handler.cc',
368             'service/cloud_print/printer_job_handler.h',
369             'service/cloud_print/printer_job_queue_handler.cc',
370             'service/cloud_print/printer_job_queue_handler.h',
371             'service/net/service_url_request_context.cc',
372             'service/net/service_url_request_context.h',
373           ],
374           'include_dirs': [
375             '..',
376           ],
377           'conditions': [
378             ['OS=="win"', {
379               'defines': [
380                 # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
381                 # of cloud print system, and allows to use custom implementaiton.
382                 'CP_PRINT_SYSTEM_AVAILABLE',
383               ],
384               'sources': [
385                 'service/cloud_print/print_system_win.cc',
386               ],
387             }],
388             ['toolkit_uses_gtk == 1', {
389               'dependencies': [
390                 '../build/linux/system.gyp:gtk',
391               ],
392             }],
393             ['use_cups==1', {
394               'dependencies': [
395                 '../printing/printing.gyp:cups',
396               ],
397               'defines': [
398                 # CP_PRINT_SYSTEM_AVAILABLE disables default dummy implementation
399                 # of cloud print system, and allows to use custom implementaiton.
400                 'CP_PRINT_SYSTEM_AVAILABLE',
401               ],
402               'sources': [
403                 'service/cloud_print/print_system_cups.cc',
404               ],
405             }],
406           ],
407         },
408         {
409           'target_name': 'ipclist',
410           'type': 'executable',
411           'variables': { 'enable_wexit_time_destructors': 1, },
412           'dependencies': [
413             'test_support_common',
414             '../skia/skia.gyp:skia',
415             '../sync/sync.gyp:sync',
416           ],
417           'include_dirs': [
418              '..',
419           ],
420           'sources': [
421             'tools/ipclist/ipclist.cc',
422           ],
423         },
424       ],
425     }],  # OS!="ios"
426     ['OS=="mac"',
427       { 'targets': [
428         {
429           'target_name': 'helper_app',
430           'type': 'executable',
431           'variables': { 'enable_wexit_time_destructors': 1, },
432           'product_name': '<(mac_product_name) Helper',
433           'mac_bundle': 1,
434           'dependencies': [
435             'chrome_dll',
436             'infoplist_strings_tool',
437           ],
438           'sources': [
439             # chrome_exe_main_mac.cc's main() is the entry point for
440             # the "chrome" (browser app) target.  All it does is jump
441             # to chrome_dll's ChromeMain.  This is appropriate for
442             # helper processes too, because the logic to discriminate
443             # between process types at run time is actually directed
444             # by the --type command line argument processed by
445             # ChromeMain.  Sharing chrome_exe_main_mac.cc with the
446             # browser app will suffice for now.
447             'app/chrome_exe_main_mac.cc',
448             'app/helper-Info.plist',
449           ],
450           # TODO(mark): Come up with a fancier way to do this.  It should only
451           # be necessary to list helper-Info.plist once, not the three times it
452           # is listed here.
453           'mac_bundle_resources!': [
454             'app/helper-Info.plist',
455           ],
456           # TODO(mark): For now, don't put any resources into this app.  Its
457           # resources directory will be a symbolic link to the browser app's
458           # resources directory.
459           'mac_bundle_resources/': [
460             ['exclude', '.*'],
461           ],
462           'xcode_settings': {
463             'CHROMIUM_BUNDLE_ID': '<(mac_bundle_id)',
464             'CHROMIUM_SHORT_NAME': '<(branding)',
465             'CHROMIUM_STRIP_SAVE_FILE': 'app/app.saves',
466             'INFOPLIST_FILE': 'app/helper-Info.plist',
467           },
468           'postbuilds': [
469             {
470               # The helper doesn't have real localizations, it just has
471               # empty .lproj directories, which is enough to convince Cocoa
472               # that anything running out of the helper .app supports those
473               # languages.
474               'postbuild_name': 'Make Empty Localizations',
475               'variables': {
476                 'locale_dirs': [
477                   '>!@(<(apply_locales_cmd) -d ZZLOCALE.lproj <(locales))',
478                 ],
479               },
480               'action': [
481                 'tools/build/mac/make_locale_dirs.sh',
482                 '<@(locale_dirs)',
483               ],
484             },
485             {
486               # The framework (chrome_dll) defines its load-time path
487               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
488               # (chrome).  A different relative path needs to be used in
489               # helper_app.
490               'postbuild_name': 'Fix Framework Link',
491               'action': [
492                 'install_name_tool',
493                 '-change',
494                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
495                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
496                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
497               ],
498             },
499             {
500               # Modify the Info.plist as needed.  The script explains why this
501               # is needed.  This is also done in the chrome and chrome_dll
502               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
503               # are used because Breakpad, Keystone, and SCM keys are
504               # never placed into the helper.
505               'postbuild_name': 'Tweak Info.plist',
506               'action': ['<(tweak_info_plist_path)',
507                          '--breakpad=0',
508                          '--keystone=0',
509                          '--scm=0'],
510             },
511             {
512               # Make sure there isn't any Objective-C in the helper app's
513               # executable.
514               'postbuild_name': 'Verify No Objective-C',
515               'action': [
516                 '../build/mac/verify_no_objc.sh',
517               ],
518             },
519           ],
520           'conditions': [
521             ['mac_breakpad==1', {
522               'variables': {
523                 # A real .dSYM is needed for dump_syms to operate on.
524                 'mac_real_dsym': 1,
525               },
526               'xcode_settings': {
527                 # With mac_real_dsym set, strip_from_xcode won't be used.
528                 # Specify CHROMIUM_STRIP_SAVE_FILE directly to Xcode.
529                 'STRIPFLAGS': '-s $(CHROMIUM_STRIP_SAVE_FILE)',
530               },
531             }],
532             ['asan==1', {
533               'xcode_settings': {
534                 # Override the outer definition of CHROMIUM_STRIP_SAVE_FILE.
535                 'CHROMIUM_STRIP_SAVE_FILE': 'app/app_asan.saves',
536               },
537             }],
538             ['component=="shared_library"', {
539               'xcode_settings': {
540                 'LD_RUNPATH_SEARCH_PATHS': [
541                   # Get back from Chromium.app/Contents/Versions/V/
542                   #                                    Helper.app/Contents/MacOS
543                   '@loader_path/../../../../../../..',
544                 ],
545               },
546             }],
547           ],
548         },  # target helper_app
549         {
550           # A library containing the actual code for the app mode app, shared
551           # by unit tests.
552           'target_name': 'app_mode_app_support',
553           'type': 'static_library',
554           'variables': { 'enable_wexit_time_destructors': 1, },
555           'product_name': 'app_mode_app_support',
556           'dependencies': [
557             '../base/base.gyp:base',
558             'common_constants.gyp:common_constants',
559           ],
560           'sources': [
561             'common/mac/app_mode_chrome_locator.h',
562             'common/mac/app_mode_chrome_locator.mm',
563             'common/mac/app_mode_common.h',
564             'common/mac/app_mode_common.mm',
565           ],
566           'include_dirs': [
567             '..',
568           ],
569         },  # target app_mode_app_support
570         {
571           # This produces the template for app mode loader bundles. It's a
572           # template in the sense that parts of it need to be "filled in" by
573           # Chrome before it can be executed.
574           'target_name': 'app_mode_app',
575           'type': 'executable',
576           'mac_bundle' : 1,
577           'variables': { 'enable_wexit_time_destructors': 1, },
578           'product_name': 'app_mode_loader',
579           'dependencies': [
580             'app_mode_app_support',
581             'infoplist_strings_tool',
582           ],
583           'sources': [
584             'app/app_mode_loader_mac.mm',
585             'app/app_mode-Info.plist',
586           ],
587           'include_dirs': [
588             '..',
589           ],
590           'link_settings': {
591             'libraries': [
592               '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
593               '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
594             ],
595           },
596           'mac_bundle_resources!': [
597             'app/app_mode-Info.plist',
598           ],
599           'mac_bundle_resources/': [
600             ['exclude', '.*'],
601           ],
602           'xcode_settings': {
603             'INFOPLIST_FILE': 'app/app_mode-Info.plist',
604             'APP_MODE_APP_BUNDLE_ID': '<(mac_bundle_id).app.@APP_MODE_SHORTCUT_ID@',
605           },
606           'postbuilds' : [
607             {
608               # Modify the Info.plist as needed.  The script explains why this
609               # is needed.  This is also done in the chrome and chrome_dll
610               # targets.  In this case, --breakpad=0, --keystone=0, and --scm=0
611               # are used because Breakpad, Keystone, and SCM keys are
612               # never placed into the app mode loader.
613               'postbuild_name': 'Tweak Info.plist',
614               'action': ['<(tweak_info_plist_path)',
615                          '--breakpad=0',
616                          '--keystone=0',
617                          '--scm=0'],
618             },
619           ],
620         },  # target app_mode_app
621         {
622           # Convenience target to build a disk image.
623           'target_name': 'build_app_dmg',
624           # Don't place this in the 'all' list; most won't want it.
625           # In GYP, booleans are 0/1, not True/False.
626           'suppress_wildcard': 1,
627           'type': 'none',
628           'dependencies': [
629             'chrome',
630           ],
631           'variables': {
632             'build_app_dmg_script_path': 'tools/build/mac/build_app_dmg',
633             'pkg_dmg_script_path': 'installer/mac/pkg-dmg',
635             'conditions': [
636               # This duplicates the output path from build_app_dmg.
637               ['branding=="Chrome"', {
638                 'dmg_name': 'GoogleChrome.dmg',
639               }, { # else: branding!="Chrome"
640                 'dmg_name': 'Chromium.dmg',
641               }],
642             ],
643           },
644           'actions': [
645             {
646               'inputs': [
647                 '<(build_app_dmg_script_path)',
648                 '<(pkg_dmg_script_path)',
649                 '<(PRODUCT_DIR)/<(mac_product_name).app',
650               ],
651               'outputs': [
652                 '<(PRODUCT_DIR)/<(dmg_name)',
653               ],
654               'action_name': 'build_app_dmg',
655               'action': ['<(build_app_dmg_script_path)', '<@(branding)'],
656             },
657           ],  # 'actions'
658         },
659         {
660           # Dummy target to allow chrome to require plugin_carbon_interpose to
661           # build without actually linking to the resulting library.
662           'target_name': 'interpose_dependency_shim',
663           'type': 'executable',
664           'variables': { 'enable_wexit_time_destructors': 1, },
665           'dependencies': [
666             'plugin_carbon_interpose',
667           ],
668           # In release, we end up with a strip step that is unhappy if there is
669           # no binary. Rather than check in a new file for this temporary hack,
670           # just generate a source file on the fly.
671           'actions': [
672             {
673               'action_name': 'generate_stub_main',
674               'process_outputs_as_sources': 1,
675               'inputs': [],
676               'outputs': [ '<(INTERMEDIATE_DIR)/dummy_main.c' ],
677               'action': [
678                 'bash', '-c',
679                 'echo "int main() { return 0; }" > <(INTERMEDIATE_DIR)/dummy_main.c'
680               ],
681             },
682           ],
683         },
684         {
685           # dylib for interposing Carbon calls in the plugin process.
686           'target_name': 'plugin_carbon_interpose',
687           'type': 'shared_library',
688           'variables': { 'enable_wexit_time_destructors': 1, },
689           # This target must not depend on static libraries, else the code in
690           # those libraries would appear twice in plugin processes: Once from
691           # Chromium Framework, and once from this dylib.
692           'dependencies': [
693             'chrome_dll',
694           ],
695           'conditions': [
696             ['component=="shared_library"', {
697               'dependencies': [
698                 '../webkit/support/webkit_support.gyp:glue',
699                 '../content/content.gyp:content_plugin',
700               ],
701               'xcode_settings': {
702                 'LD_RUNPATH_SEARCH_PATHS': [
703                   # Get back from Chromium.app/Contents/Versions/V
704                   '@loader_path/../../../..',
705                 ],
706               },
707             }],
708           ],
709           'sources': [
710             '../content/plugin/plugin_carbon_interpose_mac.cc',
711           ],
712           'include_dirs': [
713             '..',
714           ],
715           'link_settings': {
716             'libraries': [
717               '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
718             ],
719           },
720           'xcode_settings': {
721             'DYLIB_COMPATIBILITY_VERSION': '<(version_mac_dylib)',
722             'DYLIB_CURRENT_VERSION': '<(version_mac_dylib)',
723             'DYLIB_INSTALL_NAME_BASE': '@executable_path/../../..',
724           },
725           'postbuilds': [
726             {
727               # The framework (chrome_dll) defines its load-time path
728               # (DYLIB_INSTALL_NAME_BASE) relative to the main executable
729               # (chrome).  A different relative path needs to be used in
730               # plugin_carbon_interpose, which runs in the helper_app.
731               'postbuild_name': 'Fix Framework Link',
732               'action': [
733                 'install_name_tool',
734                 '-change',
735                 '@executable_path/../Versions/<(version_full)/<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
736                 '@executable_path/../../../<(mac_product_name) Framework.framework/<(mac_product_name) Framework',
737                 '${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}'
738               ],
739             },
740           ],
741         },
742         {
743           'target_name': 'infoplist_strings_tool',
744           'type': 'executable',
745           'variables': { 'enable_wexit_time_destructors': 1, },
746           'dependencies': [
747             'chrome_resources.gyp:chrome_strings',
748             '../base/base.gyp:base',
749             '../ui/ui.gyp:ui',
750           ],
751           'include_dirs': [
752             '<(grit_out_dir)',
753           ],
754           'sources': [
755             'tools/mac_helpers/infoplist_strings_util.mm',
756           ],
757         },
758       ],  # targets
759     }],  # OS=="mac"
760     ['OS!="mac" and OS!="ios"', {
761       'targets': [
762         {
763           'target_name': 'convert_dict',
764           'type': 'executable',
765           'variables': { 'enable_wexit_time_destructors': 1, },
766           'dependencies': [
767             '../base/base.gyp:base',
768             '../base/base.gyp:base_i18n',
769             'convert_dict_lib',
770             '../third_party/hunspell/hunspell.gyp:hunspell',
771           ],
772           'sources': [
773             'tools/convert_dict/convert_dict.cc',
774           ],
775         },
776         {
777           'target_name': 'convert_dict_lib',
778           'product_name': 'convert_dict',
779           'type': 'static_library',
780           'variables': { 'enable_wexit_time_destructors': 1, },
781           'include_dirs': [
782             '..',
783           ],
784           'dependencies': [
785             '../base/base.gyp:base',
786           ],
787           'sources': [
788             'tools/convert_dict/aff_reader.cc',
789             'tools/convert_dict/aff_reader.h',
790             'tools/convert_dict/dic_reader.cc',
791             'tools/convert_dict/dic_reader.h',
792             'tools/convert_dict/hunspell_reader.cc',
793             'tools/convert_dict/hunspell_reader.h',
794           ],
795         },
796         {
797           'target_name': 'flush_cache',
798           'type': 'executable',
799           'dependencies': [
800             '../base/base.gyp:base',
801             '../base/base.gyp:test_support_base',
802           ],
803           'sources': [
804             'tools/perf/flush_cache/flush_cache.cc',
805           ],
806         },
807       ],
808     }],  # OS!="mac" and OS!="ios"
809     ['OS=="linux"',
810       { 'targets': [
811         {
812           'target_name': 'linux_symbols',
813           'type': 'none',
814           'conditions': [
815             ['linux_dump_symbols==1', {
816               'actions': [
817                 {
818                   'action_name': 'dump_symbols',
819                   'inputs': [
820                     '<(DEPTH)/build/linux/dump_app_syms',
821                     '<(PRODUCT_DIR)/dump_syms',
822                     '<(PRODUCT_DIR)/chrome',
823                   ],
824                   'outputs': [
825                     '<(PRODUCT_DIR)/chrome.breakpad.<(target_arch)',
826                   ],
827                   'action': ['<(DEPTH)/build/linux/dump_app_syms',
828                              '<(PRODUCT_DIR)/dump_syms',
829                              '<(linux_strip_binary)',
830                              '<(PRODUCT_DIR)/chrome',
831                              '<@(_outputs)'],
832                   'message': 'Dumping breakpad symbols to <(_outputs)',
833                   'process_outputs_as_sources': 1,
834                 },
835               ],
836               'dependencies': [
837                 'chrome',
838                 '../breakpad/breakpad.gyp:dump_syms',
839               ],
840             }],
841             ['linux_strip_reliability_tests==1', {
842               'actions': [
843                 {
844                   'action_name': 'strip_reliability_tests',
845                   'inputs': [
846                     '<(PRODUCT_DIR)/automated_ui_tests',
847                     '<(PRODUCT_DIR)/reliability_tests',
848                     '<(PRODUCT_DIR)/_pyautolib.so',
849                   ],
850                   'outputs': [
851                     '<(PRODUCT_DIR)/strip_reliability_tests.stamp',
852                   ],
853                   'action': ['strip',
854                              '-g',
855                              '<@(_inputs)'],
856                   'message': 'Stripping reliability tests',
857                 },
858               ],
859               'dependencies': [
860                 'automated_ui_tests',
861                 'reliability_tests',
862               ],
863             }],
864           ],
865         },
866         {
867           'target_name': 'ipcfuzz',
868           'type': 'loadable_module',
869           'include_dirs': [
870             '..',
871           ],
872           'dependencies': [
873             'test_support_common',
874             '../skia/skia.gyp:skia',
875           ],
876           'sources': [
877             'tools/ipclist/ipcfuzz.cc',
878           ],
879         },
880       ],
881     }],  # OS=="linux"
882     ['OS=="win"',
883       { 'targets': [
884         {
885           # For historical reasons, chrome/chrome.sln has been the entry point
886           # for new Chrome developers. To assist development, include several
887           # core unittests that are otherwise only accessible side-by-side with
888           # chrome via all/all.sln.
889           'target_name': 'test_targets',
890           'type': 'none',
891           'dependencies': [
892             '../base/base.gyp:base_unittests',
893             '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
894             '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
895             '../content/content.gyp:content_browsertests',
896             '../content/content.gyp:content_shell',
897             '../content/content.gyp:content_unittests',
898             '../net/net.gyp:net_unittests',
899             '../ui/ui.gyp:ui_unittests',
900           ],
901           'conditions': [
902             ['use_aura==1 or target_arch=="x64"', {
903               'dependencies!': [
904                 '../chrome_frame/chrome_frame.gyp:chrome_frame_tests',
905                 '../chrome_frame/chrome_frame.gyp:chrome_frame_net_tests',
906               ],
907             }],
908           ],
909         },
910         {
911           'target_name': 'chrome_version_resources',
912           'type': 'none',
913           'conditions': [
914             ['branding == "Chrome"', {
915               'variables': {
916                  'branding_path': 'app/theme/google_chrome/BRANDING',
917               },
918             }, { # else branding!="Chrome"
919               'variables': {
920                  'branding_path': 'app/theme/chromium/BRANDING',
921               },
922             }],
923           ],
924           'variables': {
925             'output_dir': 'chrome_version',
926             'template_input_path': 'app/chrome_version.rc.version',
927           },
928           'direct_dependent_settings': {
929             'include_dirs': [
930               '<(SHARED_INTERMEDIATE_DIR)/<(output_dir)',
931             ],
932           },
933           'sources': [
934             'app/app_host_exe.ver',
935             'app/chrome_exe.ver',
936             'app/chrome_dll.ver',
937             'app/nacl64_exe.ver',
938             'app/other.ver',
939           ],
940           'includes': [
941             'version_resource_rules.gypi',
942           ],
943         },
944         {
945           'target_name': 'chrome_version_header',
946           'type': 'none',
947           'hard_dependency': 1,
948           'actions': [
949             {
950               'action_name': 'version_header',
951               'variables': {
952                 'lastchange_path':
953                   '<(DEPTH)/build/util/LASTCHANGE',
954               },
955               'conditions': [
956                 ['branding == "Chrome"', {
957                   'variables': {
958                      'branding_path': 'app/theme/google_chrome/BRANDING',
959                   },
960                 }, { # else branding!="Chrome"
961                   'variables': {
962                      'branding_path': 'app/theme/chromium/BRANDING',
963                   },
964                 }],
965               ],
966               'inputs': [
967                 '<(version_path)',
968                 '<(branding_path)',
969                 '<(lastchange_path)',
970                 'version.h.in',
971               ],
972               'outputs': [
973                 '<(SHARED_INTERMEDIATE_DIR)/version.h',
974               ],
975               'action': [
976                 'python',
977                 '<(version_py_path)',
978                 '-f', '<(version_path)',
979                 '-f', '<(branding_path)',
980                 '-f', '<(lastchange_path)',
981                 'version.h.in',
982                 '<@(_outputs)',
983               ],
984               'message': 'Generating version header file: <@(_outputs)',
985             },
986           ],
987         },
988         {
989           'target_name': 'automation',
990           'type': 'static_library',
991           'dependencies': [
992             'chrome_resources.gyp:theme_resources',
993             '../skia/skia.gyp:skia',
994           ],
995           'include_dirs': [
996             '..',
997           ],
998           'sources': [
999              'test/automation/automation_handle_tracker.cc',
1000              'test/automation/automation_handle_tracker.h',
1001              'test/automation/automation_json_requests.cc',
1002              'test/automation/automation_json_requests.h',
1003              'test/automation/automation_proxy.cc',
1004              'test/automation/automation_proxy.h',
1005              'test/automation/browser_proxy.cc',
1006              'test/automation/browser_proxy.h',
1007              'test/automation/tab_proxy.cc',
1008              'test/automation/tab_proxy.h',
1009              'test/automation/value_conversion_traits.cc',
1010              'test/automation/value_conversion_traits.h',
1011              'test/automation/value_conversion_util.h',
1012              'test/automation/window_proxy.cc',
1013              'test/automation/window_proxy.h',
1014           ],
1015         },
1016         {
1017           'target_name': 'crash_service',
1018           'type': 'executable',
1019           'dependencies': [
1020             'installer_util',
1021             '../base/base.gyp:base',
1022             '../breakpad/breakpad.gyp:breakpad_handler',
1023             '../breakpad/breakpad.gyp:breakpad_sender',
1024             '../chrome/common_constants.gyp:common_constants',
1025           ],
1026           'include_dirs': [
1027             '..',
1028           ],
1029           'sources': [
1030             'tools/crash_service/crash_service.cc',
1031             'tools/crash_service/crash_service.h',
1032             'tools/crash_service/main.cc',
1033           ],
1034           'msvs_settings': {
1035             'VCLinkerTool': {
1036               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1037             },
1038           },
1039         },
1040         {
1041           'target_name': 'sb_sigutil',
1042           'type': 'executable',
1043           'dependencies': [
1044             '../base/base.gyp:base',
1045             'safe_browsing_proto',
1046           ],
1047           'sources': [
1048             'browser/safe_browsing/signature_util.h',
1049             'browser/safe_browsing/signature_util_win.cc',
1050             'tools/safe_browsing/sb_sigutil.cc',
1051           ],
1052         },
1053       ],  # 'targets'
1054       'includes': [
1055         'chrome_process_finder.gypi',
1056         'metro_utils.gypi',
1057       ],
1058     }],  # OS=="win"
1059     ['OS=="win" and target_arch=="ia32"',
1060       { 'targets': [
1061         {
1062           'target_name': 'chrome_user32_delay_imports',
1063           'type': 'none',
1064           'variables': {
1065             'lib_dir': '<(INTERMEDIATE_DIR)',
1066           },
1067           'sources': [
1068               'chrome.user32.delay.imports'
1069           ],
1070           'includes': [
1071               '../build/win/importlibs/create_import_lib.gypi',
1072           ],
1073           'direct_dependent_settings': {
1074             'msvs_settings': {
1075               'VCLinkerTool': {
1076                 'AdditionalLibraryDirectories': ['<(lib_dir)', ],
1077                 'AdditionalDependencies': ['chrome.user32.delay.lib', ],
1078               },
1079             },
1080           },
1081         },
1082         {
1083           'target_name': 'crash_service_win64',
1084           'type': 'executable',
1085           'product_name': 'crash_service64',
1086           'dependencies': [
1087             'installer_util_nacl_win64',
1088             '../base/base.gyp:base_static_win64',
1089             '../breakpad/breakpad.gyp:breakpad_handler_win64',
1090             '../breakpad/breakpad.gyp:breakpad_sender_win64',
1091             '../chrome/common_constants.gyp:common_constants_win64',
1092           ],
1093           'include_dirs': [
1094             '..',
1095           ],
1096           'sources': [
1097             'tools/crash_service/crash_service.cc',
1098             'tools/crash_service/crash_service.h',
1099             'tools/crash_service/main.cc',
1100             '../content/public/common/content_switches.cc',
1101           ],
1102           'defines': [
1103             'COMPILE_CONTENT_STATICALLY',
1104           ],
1105           'msvs_settings': {
1106             'VCLinkerTool': {
1107               'SubSystem': '2',         # Set /SUBSYSTEM:WINDOWS
1108             },
1109           },
1110           'configurations': {
1111             'Common_Base': {
1112               'msvs_target_platform': 'x64',
1113             },
1114           },
1115         },
1116       ]},  # 'targets'
1117     ],  # OS=="win" and target_arch=="ia32"
1118     ['chromeos==1', {
1119       'includes': [ 'chrome_browser_chromeos.gypi' ],
1120     }],  # chromeos==1
1121     ['OS=="android"',
1122       {
1123       'targets': [
1124         {
1125           'target_name': 'chrome_java',
1126           'type': 'none',
1127           'dependencies': [
1128             'chrome_resources.gyp:chrome_strings',
1129             'profile_sync_service_model_type_selection_java',
1130             'resource_id_java',
1131             'toolbar_model_security_levels_java',
1132             '../base/base.gyp:base',
1133             '../components/components.gyp:autofill_java',
1134             '../components/components.gyp:navigation_interception_java',
1135             '../components/components.gyp:sessions',
1136             '../components/components.gyp:web_contents_delegate_android_java',
1137             '../content/content.gyp:content_java',
1138             '../sync/sync.gyp:sync_java',
1139             '../third_party/guava/guava.gyp:guava_javalib',
1140             '../ui/ui.gyp:ui_java',
1141           ],
1142           'variables': {
1143             'java_in_dir': '../chrome/android/java',
1144             'has_java_resources': 1,
1145             'R_package': 'org.chromium.chrome',
1146             'R_package_relpath': 'org/chromium/chrome',
1147             'java_strings_grd': 'android_chrome_strings.grd',
1148             # Include xml string files generated from generated_resources.grd
1149             'res_extra_dirs': ['<(SHARED_INTERMEDIATE_DIR)/chrome/java/res'],
1150             'res_extra_files': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(SHARED_INTERMEDIATE_DIR)/chrome" app/generated_resources.grd)'],
1151           },
1152           'includes': [
1153             '../build/java.gypi',
1154           ],
1155         },
1156       ], # 'targets'
1157       'includes': [
1158         'chrome_android.gypi',
1159       ]}, # 'includes'
1160     ],  # OS=="android"
1161     ['configuration_policy==1 and OS!="android"', {
1162       'includes': [ 'policy.gypi', ],
1163     }],
1164   ],  # 'conditions'