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   {
      7     "namespace":"webstorePrivate",
      8     "description": "none",
      9     "functions": [
     10       {
     11         "name": "install",
     12         "nocompile": true,
     13         "description": "Installs the extension corresponding to the given id",
     14         "parameters": [
     15           {
     16             "name": "expected_id",
     17             "type": "string",
     18             "description": "The id of the extension to install."
     19           },
     20           {
     21             "name": "callback",
     22             "type": "function",
     23             "optional": "true",
     24             "parameters": []
     25           }
     26         ]
     27       },
     28       {
     29         "name": "installBundle",
     30         "description": "Initiates the install process for the given bundle of extensions.",
     31         "parameters": [
     32           {
     33             "name": "details",
     34             "description": "An array of extension details to be installed.",
     35             "type": "array",
     36             "items": {
     37               "type": "object",
     38               "properties": {
     39                 "id": {
     40                   "type": "string",
     41                   "description": "The id of the extension to be installed.",
     42                   "minLength": 32,
     43                   "maxLength": 32
     44                 },
     45                 "manifest": {
     46                   "type": "string",
     47                   "description": "A string with the contents of the extension's manifest.json file. During the install process, the browser will check that the downloaded extension's manifest matches what was passed in here.",
     48                   "minLength": 1
     49                 },
     50                 "localizedName": {
     51                   "type": "string",
     52                   "description": "A string to use instead of the raw value of the 'name' key from manifest.json."
     53                 }
     54               }
     55             }
     56           },
     57           {
     58             "name": "callback",
     59             "type": "function",
     60             "description": "Called when the install process completes. Upon failures, chrome.runtime.lastError will be set to 'user_canceled' or 'unknown_error'.",
     61             "optional": "true",
     62             "parameters": []
     63           }
     64         ]
     65       },
     66       {
     67         "name": "beginInstallWithManifest3",
     68         "description": "Initiates the install process for the given extension.",
     69         "parameters": [
     70           {
     71             "name": "details",
     72             "type": "object",
     73             "properties": {
     74               "id": {
     75                 "type": "string",
     76                 "description": "The id of the extension to be installled.",
     77                 "minLength": 32,
     78                 "maxLength": 32
     79               },
     80               "manifest": {
     81                 "type": "string",
     82                 "description": "A string with the contents of the extension's manifest.json file. During the install process, the browser will check that the downloaded extension's manifest matches what was passed in here.",
     83                 "minLength": 1
     84               },
     85               "iconUrl": {
     86                 "type": "string",
     87                 "optional": true,
     88                 "desciption": "A URL for the image to display in the confirmation dialog"
     89               },
     90               "iconData": {
     91                 "type": "string",
     92                 "optional": true,
     93                 "description": "An icon as a base64-encoded image, displayed in a confirmation dialog."
     94               },
     95               "localizedName": {
     96                 "type": "string",
     97                 "optional": true,
     98                 "description": "A string to use instead of the raw value of the 'name' key from manifest.json."
     99               },
    100               "locale": {
    101                 "type": "string",
    102                 "optional": true,
    103                 "description": "The name of the locale used for generating localizedName. This should be the name of one of the directories in the _locales folder of the extension, or the default_locale setting from the manifest."
    104               },
    105               "appInstallBubble": {
    106                 "type": "boolean",
    107                 "optional": true,
    108                 "description": "A flag to change the UI we show when an app is installed - a value of true means to show a bubble pointing at the new tab button (instead of the default behavior of opening the new tab page and animating the app icon)."
    109               },
    110               "enableLauncher": {
    111                 "type": "boolean",
    112                 "optional": true,
    113                 "description": "A flag to cause the app launcher to be installed before installing the extension, if it isn't installed already."
    114               }
    115             },
    116             "additionalProperties": { "type": "any" }
    117           },
    118           {
    119             "name": "callback",
    120             "type": "function",
    121             "description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
    122             "optional": "true",
    123             "parameters": [
    124               {
    125                 "name": "result",
    126                 "type": "string",
    127                 "description": "A string result code, which will be empty upon success. The possible values in the case of errors include 'unknown_error', 'user_cancelled', 'manifest_error', 'icon_error', 'invalid_id', 'permission_denied', 'invalid_icon_url', 'signin_failed', and 'already_installed'."
    128               }
    129             ]
    130           }
    131         ]
    132 
    133       },
    134       {
    135         "name": "completeInstall",
    136         "description": "",
    137         "parameters": [
    138           {
    139             "name": "expected_id",
    140             "type": "string",
    141             "description": "The id of the extension to be installed. This should match a previous call to beginInstallWithManifest3."
    142           },
    143           {
    144             "name": "callback",
    145             "type": "function",
    146             "optional": "true",
    147             "parameters": []
    148           }
    149         ]
    150       },
    151       {
    152         "name": "enableAppLauncher",
    153         "description": "",
    154         "parameters": [
    155           {
    156             "name": "callback",
    157             "type": "function",
    158             "optional": "true",
    159             "parameters": []
    160           }
    161         ]
    162       },
    163       {
    164         "name": "getBrowserLogin",
    165         "description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.",
    166         "parameters": [
    167           {
    168             "name": "callback",
    169             "type": "function",
    170             "optional": "false",
    171             "parameters": [
    172               {
    173                 "name": "info",
    174                 "type": "object",
    175                 "properties": {
    176                   "login": { "type": "string" }
    177                 }
    178               }
    179             ]
    180           }
    181         ]
    182       },
    183       {
    184         "name": "getStoreLogin",
    185         "description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.",
    186         "parameters": [
    187           {
    188             "name": "callback",
    189             "type": "function",
    190             "optional": "false",
    191             "parameters": [
    192               { "name": "login", "type": "string" }
    193             ]
    194           }
    195         ]
    196       },
    197       {
    198         "name": "setStoreLogin",
    199         "description": "Sets a preference value with the store login.",
    200         "parameters": [
    201           { "name": "login", "type": "string" },
    202           {
    203             "name": "callback",
    204             "type": "function",
    205             "optional": "true",
    206             "parameters": []
    207           }
    208         ]
    209       },
    210       {
    211         "name": "getWebGLStatus",
    212         "description": "Invokes a callback that returns whether WebGL is blacklisted or not.",
    213         "parameters": [
    214           {
    215             "name": "callback",
    216             "type": "function",
    217             "optional": "false",
    218             "parameters": [
    219               {
    220                 "name": "webgl_status",
    221                 "type": "string",
    222                 "enum": ["webgl_allowed", "webgl_blocked"]
    223               }
    224             ]
    225           }
    226         ]
    227       },
    228       {
    229         "name": "getIsLauncherEnabled",
    230         "description": "Returns whether the apps launcher is enabled or not.",
    231         "parameters": [
    232           {
    233             "name": "callback",
    234             "type": "function",
    235             "optional": "false",
    236             "parameters": [
    237               { "name": "is_enabled", "type": "boolean" }
    238             ]
    239           }
    240         ]
    241       },
    242       {
    243         "name": "isInIncognitoMode",
    244         "description": "Returns whether the browser is in incognito mode or not.",
    245         "parameters": [
    246           {
    247             "name": "callback",
    248             "type": "function",
    249             "optional": "false",
    250             "parameters": [
    251               { "name": "is_incognito", "type": "boolean" }
    252             ]
    253           }
    254         ]
    255       }
    256     ]
    257   }
    258 ]
    259