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