Home | History | Annotate | Download | only in api
      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.
      4 
      5 {
      6   # All files are stored in these lists which are referenced in the target
      7   # below so that the GN build of this target can read in this dictionary and
      8   # duplicate the same logic without the lists getting out-of-sync. The GN
      9   # .gypi reader can not process conditions and does not know about targets,
     10   # etc., it just reads Python dictionaries.
     11   #
     12   # If you add a new category, also add it to the BUILD.gn file in this
     13   # directory.
     14   'variables': {
     15     # These duplicate other lists and are the only ones used on Android. They
     16     # should be eliminated. See crbug.com/305852.
     17     'android_schema_files': [
     18       'activity_log_private.json',
     19       'events.json',
     20       'file_system.idl',
     21       'manifest_types.json',
     22       'permissions.json',
     23       'sync_file_system.idl',
     24       'tab_capture.idl',
     25       'tabs.json',
     26       'types.json',
     27       'web_navigation.json',
     28       'webview.json',
     29       'windows.json',
     30     ],
     31 
     32     # These are used everywhere except Android.
     33     'main_schema_files': [
     34       'accessibility_private.json',
     35       'activity_log_private.json',
     36       'alarms.idl',
     37       'app_current_window_internal.idl',
     38       'app_window.idl',
     39       'audio.idl',
     40       'automation.idl',
     41       'automation_internal.idl',
     42       'autotest_private.idl',
     43       'bluetooth.idl',
     44       'bluetooth_low_energy.idl',
     45       'bluetooth_private.json',
     46       'bluetooth_socket.idl',
     47       'bookmark_manager_private.json',
     48       'bookmarks.json',
     49       'braille_display_private.idl',
     50       'browser.idl',
     51       'cast_channel.idl',
     52       'cloud_print_private.json',
     53       'command_line_private.json',
     54       'content_settings.json',
     55       'context_menus_internal.json',
     56       'context_menus.json',
     57       'cookies.json',
     58       'debugger.json',
     59       'desktop_capture.json',
     60       'developer_private.idl',
     61       'dial.idl',
     62       'downloads.idl',
     63       'downloads_internal.idl',
     64       'echo_private.json',
     65       'enterprise_platform_keys_private.json',
     66       'events.json',
     67       'feedback_private.idl',
     68       'file_browser_private.idl',
     69       'file_browser_private_internal.idl',
     70       'file_system.idl',
     71       'file_system_provider.idl',
     72       'file_system_provider_internal.idl',
     73       'font_settings.json',
     74       'gcd_private.idl',
     75       'gcm.json',
     76       'guest_view_internal.json',
     77       'hangouts_private.idl',
     78       'hid.idl',
     79       'history.json',
     80       'hotword_private.idl',
     81       'i18n.json',
     82       'identity.idl',
     83       'identity_private.idl',
     84       'idle.json',
     85       'image_writer_private.idl',
     86       'input_ime.json',
     87       'location.idl',
     88       'management.json',
     89       'manifest_types.json',
     90       'mdns.idl',
     91       'media_galleries.idl',
     92       'media_galleries_private.idl',
     93       'metrics_private.json',
     94       'networking_private.json',
     95       'notifications.idl',
     96       'omnibox.json',
     97       'page_capture.json',
     98       'permissions.json',
     99       'power.idl',
    100       'preferences_private.json',
    101       'push_messaging.idl',
    102       'reading_list_private.json',
    103       'screenlock_private.idl',
    104       'serial.idl',
    105       'sessions.json',
    106       'signed_in_devices.idl',
    107       'streams_private.idl',
    108       'synced_notifications_private.idl',
    109       'sync_file_system.idl',
    110       'system_cpu.idl',
    111       'system_display.idl',
    112       'system_indicator.idl',
    113       'system_memory.idl',
    114       'system_network.idl',
    115       'system_private.json',
    116       'system_storage.idl',
    117       'tab_capture.idl',
    118       'tabs.json',
    119       'terminal_private.json',
    120       'types.json',
    121       'virtual_keyboard_private.json',
    122       'web_navigation.json',
    123       'web_request.json',
    124       # Despite the name, this API does not rely on any
    125       # WebRTC-specific bits and as such does not belong in
    126       # the enable_webrtc=0 section below.
    127       'webrtc_audio_private.idl',
    128       'webrtc_logging_private.idl',
    129       'webstore_private.json',
    130       'webview.json',
    131       'windows.json',
    132     ],
    133     'main_non_compiled_schema_files': [
    134       'browsing_data.json',
    135       'chromeos_info_private.json',
    136       'extension.json',
    137       'idltest.idl',
    138       'infobars.json',
    139       'media_player_private.json',
    140       'music_manager_private.idl',
    141       'principals_private.idl',
    142       'top_sites.json',
    143       'web_request_internal.json',
    144     ],
    145 
    146     # ChromeOS-specific schemas.
    147     'chromeos_schema_files': [
    148       'accessibility_features.json',
    149       'diagnostics.idl',
    150       'enterprise_platform_keys.idl',
    151       'enterprise_platform_keys_internal.idl',
    152       'file_browser_handler_internal.json',
    153       'first_run_private.json',
    154       'log_private.idl',
    155       'wallpaper.json',
    156       'wallpaper_private.json',
    157       'webcam_private.idl',
    158     ],
    159     'chromeos_branded_schema_files': [
    160       'ledger/ledger.idl',
    161     ],
    162 
    163     'webrtc_schema_files': [
    164       'cast_streaming_rtp_stream.idl',
    165       'cast_streaming_session.idl',
    166       'cast_streaming_udp_transport.idl',
    167     ],
    168   },
    169   'targets': [
    170     {
    171       # GN version: //chrome/common/extensions/api:api
    172       'target_name': 'chrome_api',
    173       'type': 'static_library',
    174       'sources': [
    175         '<@(schema_files)',
    176       ],
    177       # TODO(jschuh): http://crbug.com/167187 size_t -> int
    178       'msvs_disabled_warnings': [ 4267 ],
    179       'includes': [
    180         '../../../../build/json_schema_bundle_compile.gypi',
    181         '../../../../build/json_schema_compile.gypi',
    182       ],
    183       'variables': {
    184         'chromium_code': 1,
    185         # Disable schema compiler to generate model extension API code.
    186         # Only register the extension functions in extension system.
    187         'conditions': [
    188           ['OS!="android"', {
    189             'non_compiled_schema_files': [
    190               '<@(main_non_compiled_schema_files)',
    191             ],
    192             'schema_files': [
    193               '<@(main_schema_files)',
    194             ],
    195           }, {  # OS=="android"
    196             'non_compiled_schema_files': [
    197             ],
    198             'schema_files': [
    199               # These should be eliminated. See crbug.com/305852.
    200               '<@(android_schema_files)',
    201             ],
    202           }],
    203           ['chromeos==1', {
    204             'schema_files': [
    205               '<@(chromeos_schema_files)',
    206             ],
    207           }],
    208           ['enable_webrtc==1', {
    209             'schema_files': [
    210               '<@(webrtc_schema_files)',
    211             ],
    212           }],
    213           ['branding=="Chrome" and chromeos==1', {
    214             'schema_files': [
    215               '<@(chromeos_branded_schema_files)',
    216             ],
    217           }],
    218         ],
    219         'cc_dir': 'chrome/common/extensions/api',
    220         'root_namespace': 'extensions::api',
    221       },
    222       'dependencies': [
    223         # Different APIs include some headers crom chrome/common that in turn
    224         # include generated headers from these targets.
    225         # TODO(brettw) this should be made unnecessary if possible.
    226         '<(DEPTH)/components/components.gyp:component_metrics_proto',
    227         '<(DEPTH)/device/serial/serial.gyp:device_serial',
    228 
    229         '<(DEPTH)/content/content.gyp:content_browser',
    230         '<(DEPTH)/skia/skia.gyp:skia',
    231         '<(DEPTH)/sync/sync.gyp:sync',
    232       ],
    233       'conditions': [
    234         ['chromeos==1', {
    235           'dependencies': [
    236             '<(DEPTH)/chrome/chrome.gyp:drive_proto',
    237           ],
    238         }],
    239       ],
    240     },
    241   ],
    242 }
    243