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