Commit f06e4fb5 authored by brettw@chromium.org's avatar brettw@chromium.org

Rearrange the extensions API GYP file to be readable by GN.

There should be no behavior change.

R=miket@chromium.org

Review URL: https://codereview.chromium.org/344163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278729 0039d316-1c4b-4281-b951-d872f2087c98
parent 83649fbe
...@@ -3,40 +3,37 @@ ...@@ -3,40 +3,37 @@
# found in the LICENSE file. # found in the LICENSE file.
{ {
'targets': [ # All files are stored in these lists which are referenced in the target
{ # below so that the GN build of this target can read in this dictionary and
'target_name': 'chrome_api', # duplicate the same logic without the lists getting out-of-sync. The GN
'type': 'static_library', # .gypi reader can not process conditions and does not know about targets,
'sources': [ # etc., it just reads Python dictionaries.
'<@(schema_files)', #
], # In addition, the GN build treats .idl files and .json files separately,
# TODO(jschuh): http://crbug.com/167187 size_t -> int # since they run through different scripts. If you add a new category, also
'msvs_disabled_warnings': [ 4267 ], # add it to the BUILD.gn file in this directory.
'includes': [
'../../../../build/json_schema_bundle_compile.gypi',
'../../../../build/json_schema_compile.gypi',
],
'variables': { 'variables': {
'chromium_code': 1, # These duplicate other lists and are the only ones used on Android. They
# Disable schema compiler to generate model extension API code. # should be eliminated. See crbug.com/305852.
# Only register the extension functions in extension system. 'android_schema_files_idl': [
'conditions': [ 'file_system.idl',
['OS!="android"', { 'sync_file_system.idl',
'non_compiled_schema_files': [ 'tab_capture.idl',
'browsing_data.json',
'chromeos_info_private.json',
'extension.json',
'idltest.idl',
'infobars.json',
'media_player_private.json',
'music_manager_private.idl',
'principals_private.idl',
'top_sites.json',
'web_request_internal.json',
], ],
'schema_files': [ 'android_schema_files_json': [
'accessibility_private.json',
'activity_log_private.json', 'activity_log_private.json',
'events.json',
'manifest_types.json',
'permissions.json',
'tabs.json',
'types.json',
'webview.json',
'web_navigation.json',
'windows.json',
],
# These are used everywhere except Android.
'main_schema_files_idl': [
'alarms.idl', 'alarms.idl',
'app_current_window_internal.idl', 'app_current_window_internal.idl',
'app_window.idl', 'app_window.idl',
...@@ -46,67 +43,36 @@ ...@@ -46,67 +43,36 @@
'autotest_private.idl', 'autotest_private.idl',
'bluetooth.idl', 'bluetooth.idl',
'bluetooth_low_energy.idl', 'bluetooth_low_energy.idl',
'bluetooth_private.json',
'bluetooth_socket.idl', 'bluetooth_socket.idl',
'bookmark_manager_private.json',
'bookmarks.json',
'browser.idl', 'browser.idl',
'braille_display_private.idl', 'braille_display_private.idl',
'cast_channel.idl', 'cast_channel.idl',
'cloud_print_private.json',
'command_line_private.json',
'content_settings.json',
'context_menus.json',
'context_menus_internal.json',
'cookies.json',
'debugger.json',
'desktop_capture.json',
'developer_private.idl', 'developer_private.idl',
'dial.idl', 'dial.idl',
'downloads.idl', 'downloads.idl',
'downloads_internal.idl', 'downloads_internal.idl',
'echo_private.json',
'enterprise_platform_keys_private.json',
'events.json',
'feedback_private.idl', 'feedback_private.idl',
'file_browser_private.idl', 'file_browser_private.idl',
'file_browser_private_internal.idl', 'file_browser_private_internal.idl',
'file_system.idl', 'file_system.idl',
'file_system_provider.idl', 'file_system_provider.idl',
'file_system_provider_internal.idl', 'file_system_provider_internal.idl',
'font_settings.json',
'gcd_private.idl', 'gcd_private.idl',
'gcm.json',
'guest_view_internal.json',
'hangouts_private.idl', 'hangouts_private.idl',
'hid.idl', 'hid.idl',
'history.json',
'hotword_private.idl', 'hotword_private.idl',
'i18n.json',
'identity.idl', 'identity.idl',
'identity_private.idl', 'identity_private.idl',
'idle.json',
'image_writer_private.idl', 'image_writer_private.idl',
'input_ime.json',
'location.idl', 'location.idl',
'management.json',
'manifest_types.json',
'mdns.idl', 'mdns.idl',
'media_galleries.idl', 'media_galleries.idl',
'media_galleries_private.idl', 'media_galleries_private.idl',
'metrics_private.json',
'networking_private.json',
'notifications.idl', 'notifications.idl',
'omnibox.json',
'page_capture.json',
'permissions.json',
'preferences_private.json',
'power.idl', 'power.idl',
'push_messaging.idl', 'push_messaging.idl',
'reading_list_private.json',
'screenlock_private.idl', 'screenlock_private.idl',
'serial.idl', 'serial.idl',
'sessions.json',
'signed_in_devices.idl', 'signed_in_devices.idl',
'streams_private.idl', 'streams_private.idl',
'sync_file_system.idl', 'sync_file_system.idl',
...@@ -116,67 +82,149 @@ ...@@ -116,67 +82,149 @@
'system_indicator.idl', 'system_indicator.idl',
'system_memory.idl', 'system_memory.idl',
'system_network.idl', 'system_network.idl',
'system_private.json',
'system_storage.idl', 'system_storage.idl',
'tab_capture.idl', 'tab_capture.idl',
'tabs.json',
'terminal_private.json',
'types.json',
'virtual_keyboard_private.json',
'web_navigation.json',
'web_request.json',
# Despite the name, this API does not rely on any # Despite the name, this API does not rely on any
# WebRTC-specific bits and as such does not belong in # WebRTC-specific bits and as such does not belong in
# the enable_webrtc=0 section below. # the enable_webrtc=0 section below.
'webrtc_audio_private.idl', 'webrtc_audio_private.idl',
'webrtc_logging_private.idl', 'webrtc_logging_private.idl',
'webstore_private.json',
'webview.json',
'windows.json',
],
}, { # OS=="android"
'non_compiled_schema_files': [
], ],
'schema_files': [ 'main_schema_files_json': [
# These should be eliminated. See crbug.com/305852. 'accessibility_private.json',
'activity_log_private.json', 'activity_log_private.json',
'bluetooth_private.json',
'bookmark_manager_private.json',
'bookmarks.json',
'cloud_print_private.json',
'command_line_private.json',
'content_settings.json',
'context_menus.json',
'context_menus_internal.json',
'cookies.json',
'debugger.json',
'desktop_capture.json',
'echo_private.json',
'enterprise_platform_keys_private.json',
'events.json', 'events.json',
'file_system.idl', 'font_settings.json',
'gcm.json',
'guest_view_internal.json',
'history.json',
'i18n.json',
'idle.json',
'input_ime.json',
'management.json',
'manifest_types.json', 'manifest_types.json',
'metrics_private.json',
'networking_private.json',
'omnibox.json',
'page_capture.json',
'permissions.json', 'permissions.json',
'sync_file_system.idl', 'preferences_private.json',
'tab_capture.idl', 'reading_list_private.json',
'sessions.json',
'system_private.json',
'tabs.json', 'tabs.json',
'terminal_private.json',
'types.json', 'types.json',
'webview.json', 'virtual_keyboard_private.json',
'web_navigation.json', 'web_navigation.json',
'web_request.json',
'webstore_private.json',
'webview.json',
'windows.json', 'windows.json',
], ],
}], # The non-compiled shcema files don't need to be separated out by type
['chromeos==1', { # since they're only given to the bundle script which doesn't care about
'schema_files': [ # type.
'accessibility_features.json', 'main_non_compiled_schema_files': [
'browsing_data.json',
'chromeos_info_private.json',
'extension.json',
'idltest.idl',
'infobars.json',
'media_player_private.json',
'music_manager_private.idl',
'principals_private.idl',
'top_sites.json',
'web_request_internal.json',
],
# ChromeOS-specific schemas.
'chromeos_schema_files_idl': [
'diagnostics.idl', 'diagnostics.idl',
'enterprise_platform_keys.idl', 'enterprise_platform_keys.idl',
'enterprise_platform_keys_internal.idl', 'enterprise_platform_keys_internal.idl',
'log_private.idl',
'webcam_private.idl',
],
'chromeos_schema_files_json': [
'accessibility_features.json',
'file_browser_handler_internal.json', 'file_browser_handler_internal.json',
'first_run_private.json', 'first_run_private.json',
'log_private.idl',
'wallpaper.json', 'wallpaper.json',
'wallpaper_private.json', 'wallpaper_private.json',
'webcam_private.idl',
], ],
}], 'chromeos_branded_schema_files_idl': [
['enable_webrtc==1', { 'ledger/ledger.idl',
'schema_files': [ ],
'webrtc_schema_files_idl': [
'cast_streaming_rtp_stream.idl', 'cast_streaming_rtp_stream.idl',
'cast_streaming_session.idl', 'cast_streaming_session.idl',
'cast_streaming_udp_transport.idl', 'cast_streaming_udp_transport.idl',
], ],
},
'targets': [
{
'target_name': 'chrome_api',
'type': 'static_library',
'sources': [
'<@(schema_files)',
],
# TODO(jschuh): http://crbug.com/167187 size_t -> int
'msvs_disabled_warnings': [ 4267 ],
'includes': [
'../../../../build/json_schema_bundle_compile.gypi',
'../../../../build/json_schema_compile.gypi',
],
'variables': {
'chromium_code': 1,
# Disable schema compiler to generate model extension API code.
# Only register the extension functions in extension system.
'conditions': [
['OS!="android"', {
'non_compiled_schema_files': [
'<@(main_non_compiled_schema_files)',
],
'schema_files': [
'<@(main_schema_files_idl)',
'<@(main_schema_files_json)',
],
}, { # OS=="android"
'non_compiled_schema_files': [
],
'schema_files': [
# These should be eliminated. See crbug.com/305852.
'<@(android_schema_files_idl)',
'<@(android_schema_files_json)',
],
}],
['chromeos==1', {
'schema_files': [
'<@(chromeos_schema_files_idl)',
'<@(chromeos_schema_files_json)',
],
}],
['enable_webrtc==1', {
'schema_files': [
'<@(webrtc_schema_files_idl)',
],
}], }],
['branding=="Chrome" and chromeos==1', { ['branding=="Chrome" and chromeos==1', {
'schema_files': [ 'schema_files': [
'ledger/ledger.idl', '<@(chromeos_branded_schema_files_idl)',
], ],
}], }],
], ],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment