Home | History | Annotate | Download | only in api
      1 # Copyright 2014 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   'sources': [
      7     '<@(schema_files)',
      8   ],
      9   'variables': {
     10     'main_schema_files': [
     11       'accessibility_private.json',
     12       'activity_log_private.json',
     13       'alarms.idl',
     14       'audio.idl',
     15       'automation.idl',
     16       'automation_internal.idl',
     17       'autotest_private.idl',
     18       'bookmark_manager_private.json',
     19       'bookmarks.json',
     20       'braille_display_private.idl',
     21       'browser.idl',
     22       'chrome_web_view_internal.json',
     23       'cloud_print_private.json',
     24       'command_line_private.json',
     25       'content_settings.json',
     26       'context_menus_internal.json',
     27       'context_menus.json',
     28       'cookies.json',
     29       'copresence.idl',
     30       'copresence_private.idl',
     31       'debugger.json',
     32       'developer_private.idl',
     33       'dial.idl',
     34       'downloads.idl',
     35       'downloads_internal.idl',
     36       'easy_unlock_private.idl',
     37       'echo_private.json',
     38       'enterprise_platform_keys_private.json',
     39       'experience_sampling_private.json',
     40       'feedback_private.idl',
     41       'file_manager_private.idl',
     42       'file_manager_private_internal.idl',
     43       'file_system.idl',
     44       'file_system_provider.idl',
     45       'file_system_provider_internal.idl',
     46       'font_settings.json',
     47       'gcd_private.idl',
     48       'gcm.json',
     49       'hangouts_private.idl',
     50       'history.json',
     51       'hotword_private.idl',
     52       'i18n.json',
     53       'identity.idl',
     54       'identity_private.idl',
     55       'idle.json',
     56       'image_writer_private.idl',
     57       'input_ime.json',
     58       'location.idl',
     59       'management.json',
     60       'manifest_types.json',
     61       'mdns.idl',
     62       'media_galleries.idl',
     63       'media_galleries_private.idl',
     64       'metrics_private.json',
     65       'networking_private.json',
     66       'notification_provider.idl',
     67       'notifications.idl',
     68       'omnibox.json',
     69       'page_capture.json',
     70       'permissions.json',
     71       'preferences_private.json',
     72       'push_messaging.idl',
     73       'reading_list_private.json',
     74       'screenlock_private.idl',
     75       'signed_in_devices.idl',
     76       'streams_private.idl',
     77       'synced_notifications_private.idl',
     78       'sync_file_system.idl',
     79       'system_indicator.idl',
     80       'system_private.json',
     81       'terminal_private.json',
     82       'types.json',
     83       'virtual_keyboard_private.json',
     84       'web_navigation.json',
     85       # Despite the name, this API does not rely on any
     86       # WebRTC-specific bits and as such does not belong in
     87       # the enable_webrtc==0 section below.
     88       'webrtc_audio_private.idl',
     89       'webrtc_logging_private.idl',
     90       'webstore_private.json',
     91     ],
     92     'main_schema_include_rules': [
     93       'extensions/common/api:extensions::core_api::%(namespace)s',
     94     ],
     95     'main_non_compiled_schema_files': [
     96       'browsing_data.json',
     97       'chromeos_info_private.json',
     98       'extension.json',
     99       'idltest.idl',
    100       'infobars.json',
    101       'media_player_private.json',
    102       'music_manager_private.idl',
    103       'principals_private.idl',
    104       'top_sites.json',
    105     ],
    106     # APIs that are causing crashes on athena.
    107     # TODO(oshima): Fix crashes and add them back. crbug.com/414340.
    108     'non_athena_schema_files': [
    109       'desktop_capture.json',
    110       'sessions.json',
    111       'tab_capture.idl',
    112       'tabs.json',
    113       'windows.json',
    114     ],
    115     # ChromeOS-specific schemas.
    116     'chromeos_schema_files': [
    117       'accessibility_features.json',
    118       'diagnostics.idl',
    119       'enterprise_platform_keys.idl',
    120       'enterprise_platform_keys_internal.idl',
    121       'file_browser_handler_internal.json',
    122       'first_run_private.json',
    123       'log_private.idl',
    124       'wallpaper.json',
    125       'wallpaper_private.json',
    126       'webcam_private.idl',
    127     ],
    128 
    129     'webrtc_schema_files': [
    130       'cast_streaming_rtp_stream.idl',
    131       'cast_streaming_session.idl',
    132       'cast_streaming_udp_transport.idl',
    133     ],
    134 
    135     'chromium_code': 1,
    136     # Disable schema compiler to generate model extension API code.
    137     # Only register the extension functions in extension system.
    138     'conditions': [
    139       # TODO(thestig): Remove this file from non-extensions build so the
    140       # conditional and else branch goes away.
    141       # Do the same for chrome/common/extensions/api/schemas.gni.
    142       ['enable_extensions==1', {
    143         'non_compiled_schema_files': [
    144           '<@(main_non_compiled_schema_files)',
    145         ],
    146         'schema_dependencies': [
    147           '<(DEPTH)/extensions/common/api/api.gyp:extensions_api',
    148         ],
    149         'schema_files': [
    150           '<@(main_schema_files)',
    151         ],
    152         'schema_include_rules': [
    153           '<@(main_schema_include_rules)',
    154         ],
    155       }, {  # enable_extensions==0
    156         'non_compiled_schema_files': [
    157         ],
    158         'schema_dependencies': [
    159         ],
    160         'schema_files': [
    161         ],
    162       }],
    163       ['chromeos==1', {
    164         'schema_files': [
    165           '<@(chromeos_schema_files)',
    166         ],
    167       }],
    168       ['use_athena==0', {
    169         'schema_files': [
    170           '<@(non_athena_schema_files)',
    171         ],
    172       }],
    173       ['enable_extensions==1 and enable_webrtc==1', {
    174         'schema_files': [
    175           '<@(webrtc_schema_files)',
    176         ],
    177       }],
    178     ],
    179     'cc_dir': 'chrome/common/extensions/api',
    180     'root_namespace': 'extensions::api::%(namespace)s',
    181     'impl_dir_': 'chrome/browser/extensions/api',
    182   },
    183 }
    184