Home | History | Annotate | Download | only in api
      1 [
      2   {
      3     "namespace": "extension",
      4     "unprivileged": true,
      5     "types": [
      6       {
      7         "id": "MessageSender",
      8         "type": "object",
      9         "description": "An object containing information about the script context that sent a message or request.",
     10         "properties": {
     11           "tab": {"$ref": "Tab", "optional": true, "description":"This property will <b>only</b> be present when the connection was opened from a tab or content script."},
     12           "id": {"type": "string", "description": "The extension ID of the extension that opened the connection."}
     13         }
     14       },
     15       {
     16         "id": "Event",
     17         "type": "object",
     18         "description": "An object which allows the addition and removal of listeners for a Chrome event.",
     19         "properties": {
     20           "addListener": {"type": "function"},
     21           "removeListener": {"type": "function"},
     22           "hasListener": {"type": "function"},
     23           "hasListeners": {"type": "function"}
     24         },
     25         "additionalProperties": { "type": "any"}
     26       },
     27       {
     28         "id": "Port",
     29         "type": "object",
     30         "description": "An object which allows two way communication with other pages.",
     31         "properties": {
     32           "name": {"type": "string"},
     33           "onDisconnect": { "$ref": "Event" },
     34           "onMessage": { "$ref": "Event" },
     35           "postMessage": {"type": "function"},
     36           "sender": {
     37             "$ref": "MessageSender",
     38             "optional": true,
     39             "description": "This property will <b>only</b> be present on ports passed to onConnect/onConnectExternal listeners."
     40           }
     41         },
     42         "additionalProperties": { "type": "any"}
     43       }
     44     ],
     45     "properties": {
     46       "lastError": {
     47         "type": "object",
     48         "optional": true,
     49         "unprivileged": true,
     50         "description": "Set for the lifetime of a callback if an ansychronous extension api has resulted in an error. If no error has occured lastError will be <var>undefined</var>.",
     51         "properties": {
     52           "message": { "type": "string", "description": "Description of the error that has taken place." }
     53         }
     54       },
     55       "inIncognitoContext": {
     56         "type": "object",
     57         "optional": true,
     58         "unprivileged": true,
     59         "description": "True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.",
     60         "properties": {
     61           "message": { "type": "boolean", "description": "True if the page or script is in an incongito process." }
     62         }
     63       }
     64     },
     65     "functions": [
     66       {
     67         "name": "connect",
     68         "type": "function",
     69         "unprivileged": true,
     70         "description": "Attempts to connect to other listeners within the extension (such as the extension's background page). This is primarily useful for content scripts connecting to their extension processes. Extensions may connect to content scripts embedded in tabs via <a href='tabs.html#method-connect'><code>chrome.tabs.connect()</code></a>.",
     71         "parameters": [
     72           {"type": "string", "name": "extensionId", "optional": true, "description": "The extension ID of the extension you want to connect to. If omitted, default is your own extension."},
     73           {
     74             "type": "object",
     75             "name": "connectInfo",
     76             "properties": {
     77               "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for extension processes that are listening for the connection event." }
     78             },
     79             "optional": true
     80           }
     81         ],
     82         "returns": {
     83           "$ref": "Port",
     84           "description": "Port through which messages can be sent and received with the extension. The port's <a href='extension.html#type-Port'>onDisconnect</a> event is fired if extension does not exist. "
     85         }
     86       },
     87       {
     88         "name": "sendRequest",
     89         "type": "function",
     90         "unprivileged": true,
     91         "description": "Sends a single request to other listeners within the extension. Similar to chrome.extension.connect, but only sends a single request with an optional response. The <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event is fired in each page of the extension.",
     92         "parameters": [
     93           {"type": "string", "name": "extensionId", "optional": true, "description": "The extension ID of the extension you want to connect to. If omitted, default is your own extension."},
     94           { "type": "any", "name": "request" },
     95           {
     96             "type": "function",
     97             "name": "responseCallback",
     98             "optional": true,
     99             "parameters": [
    100               {
    101                 "name": "response",
    102                 "type": "any",
    103                 "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will be set to the error message."
    104               }
    105             ]
    106           }
    107         ]
    108       },
    109       {
    110         "name": "getURL",
    111         "type": "function",
    112         "unprivileged": true,
    113         "description": "Converts a relative path within an extension install directory to a fully-qualified URL.",
    114         "parameters": [
    115           {
    116             "type": "string",
    117             "name": "path",
    118             "description": "A path to a resource within an extension expressed relative to its install directory."
    119           }
    120         ],
    121         "returns": {
    122           "type": "string",
    123           "description": "The fully-qualified URL to the resource."
    124         }
    125       },
    126       {
    127         "name": "getViews",
    128         "type": "function",
    129         "description": "Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension.",
    130         "parameters": [
    131           {
    132             "type": "object",
    133             "name": "fetchProperties",
    134             "optional": true,
    135             "properties": {
    136               "type": {
    137                 "type": "string",
    138                 "enum": ["tab", "infobar", "notification", "popup"],
    139                 "optional": true,
    140                 "description": "The type of view to get. If omitted, returns all views (including background pages and tabs). Valid values: 'tab', 'infobar', 'notification', 'popup'."
    141               },
    142               "windowId": {
    143                 "type": "integer",
    144                 "optional": true,
    145                 "description": "The window to restrict the search to. If omitted, returns all views."
    146               }
    147             }
    148           }
    149         ],
    150         "returns": {
    151           "type": "array",
    152           "description": "Array of global objects",
    153           "items": { "type": "object", "isInstanceOf": "DOMWindow", "properties": {}, "additionalProperties": { "type": "any" } }
    154         }
    155       },
    156       {
    157         "name": "getBackgroundPage",
    158         "type": "function",
    159         "description": "Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page.",
    160         "parameters": [],
    161         "returns": {
    162           "type": "object", "isInstanceOf": "DOMWindow", "properties": {}, "additionalProperties": { "type": "any" }
    163          }
    164       },
    165       {
    166         "name": "getToolstrips",
    167         "nodoc": true,
    168         "type": "function",
    169         "description": "Deprecated. Please use getViews({type: 'TOOLSTRIP'}). Returns an array of the JavaScript 'window' objects for each of the toolstrip views running inside the current extension. If windowId is specified, returns only the 'window' objects of toolstrips attached to the specified window.",
    170         "parameters": [
    171           {"type": "integer", "name": "windowId", "optional": true}
    172         ],
    173         "returns": {
    174           "type": "array",
    175           "description": "Array of global window objects",
    176           "items": { "type": "object", "isInstanceOf": "DOMWindow", "properties": {}, "additionalProperties": { "type": "any" } }
    177         }
    178       },
    179       {
    180         "name": "getExtensionTabs",
    181         "nodoc": true,
    182         "type": "function",
    183         "description": "Deprecated. Please use getViews({type: 'TAB'}). Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.",
    184         "parameters": [
    185           {"type": "integer", "name": "windowId", "optional": true}
    186         ],
    187         "returns": {
    188           "type": "array",
    189           "description": "Array of global window objects",
    190           "items": { "type": "object", "isInstanceOf": "DOMWindow", "properties": {}, "additionalProperties": { "type": "any" } }
    191         }
    192       },
    193       {
    194         "name": "isAllowedIncognitoAccess",
    195         "type": "function",
    196         "description": "Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.",
    197         "min_version": "12.0.706.0",
    198         "parameters": [
    199           {
    200             "type": "function",
    201             "name": "callback",
    202             "parameters": [
    203               {
    204                 "name": "isAllowedAccess",
    205                 "type": "boolean",
    206                 "description": "True if the extension has access to Incognito mode, false otherwise."
    207               }
    208             ]
    209           }
    210         ]
    211       },
    212       {
    213         "name": "isAllowedFileSchemeAccess",
    214         "type": "function",
    215         "description": "Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.",
    216         "min_version": "12.0.706.0",
    217         "parameters": [
    218           {
    219             "type": "function",
    220             "name": "callback",
    221             "parameters": [
    222               {
    223                 "name": "isAllowedAccess",
    224                 "type": "boolean",
    225                 "description": "True if the extension can access the 'file://' scheme, false otherwise."
    226               }
    227             ]
    228           }
    229         ]
    230       },
    231       {
    232         "name": "setUpdateUrlData",
    233         "type": "function",
    234         "description": "Sets the value of the ap CGI parameter used in the extension's update URL.  This value is ignored for extensions that are hosted in the Chrome Extension Gallery.",
    235         "parameters": [
    236           {"type": "string", "name": "data", "maxLength": 1024}
    237         ]
    238       }
    239     ],
    240     "events": [
    241       {
    242         "name": "onConnect",
    243         "type": "function",
    244         "unprivileged": true,
    245         "description": "Fired when a connection is made from either an extension process or a content script.",
    246         "parameters": [
    247           {"$ref": "Port", "name": "port"}
    248         ]
    249       },
    250       {
    251         "name": "onConnectExternal",
    252         "type": "function",
    253         "description": "Fired when a connection is made from another extension.",
    254         "parameters": [
    255           {"$ref": "Port", "name": "port"}
    256         ]
    257       },
    258       {
    259         "name": "onRequest",
    260         "type": "function",
    261         "unprivileged": true,
    262         "description": "Fired when a request is sent from either an extension process or a content script.",
    263         "parameters": [
    264           {"name": "request", "type": "any", "description": "The request sent by the calling script."},
    265           {"name": "sender", "$ref": "MessageSender" },
    266           {"name": "sendResponse", "type": "function", "description": "Function to call when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response." }
    267         ]
    268       },
    269       {
    270         "name": "onRequestExternal",
    271         "type": "function",
    272         "description": "Fired when a request is sent from another extension.",
    273         "parameters": [
    274           {"name": "request", "type": "any", "description": "The request sent by the calling script."},
    275           {"name": "sender", "$ref": "MessageSender" },
    276           {"name": "sendResponse", "type": "function", "description": "Function to call when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response." }
    277         ]
    278       }
    279     ]
    280   },
    281   {
    282     "namespace": "experimental.accessibility",
    283     "nodoc": true,
    284     "types": [
    285       {
    286         "id": "AccessibilityObject",
    287         "type": "object",
    288         "description": "Parent class for accessibility information about an object.",
    289         "properties": {
    290           "type": {
    291             "type": "string",
    292             "description": "The type of this object, which determines the contents of 'details'.",
    293             "enum": ["button", "checkbox", "combobox", "link", "menu", "menuitem", "radiobutton", "tab", "textbox", "window"]
    294           },
    295           "name": {
    296             "type": "string",
    297             "description": "The localized name of the object, like OK or Password. Do not rely on an exact string match because the text will be in the user's language and may change in the future."
    298           },
    299           "details": {
    300             "description": "Other details like the state, depending on the type of object.",
    301             "optional": true,
    302             "choices": [
    303               { "$ref": "CheckboxDetails" },
    304               { "$ref": "ComboBoxDetails" },
    305               { "$ref": "MenuDetails" },
    306               { "$ref": "MenuItemDetails" },
    307               { "$ref": "RadioButtonDetails" },
    308               { "$ref": "TabDetails" },
    309               { "$ref": "TextBoxDetails" }
    310             ]
    311           }
    312         }
    313       },
    314       {
    315         "id": "CheckboxDetails",
    316         "type": "object",
    317         "description": "Information about the state of a checkbox.",
    318         "properties": {
    319           "isChecked": {"type": "boolean", "description": "True if this checkbox is checked."}
    320         }
    321       },
    322       {
    323         "id": "ComboBoxDetails",
    324         "type": "object",
    325         "description": "Information about the state of a combo box.",
    326         "properties": {
    327           "value": {"type": "string", "description": "The value of the combo box."},
    328           "itemCount": {"type": "integer", "description": "The number of items in the combo box's list."},
    329           "itemIndex": {"type": "integer", "description": "The 0-based index of the current value, or -1 if the user entered a value not from the list."}
    330         }
    331       },
    332       {
    333         "id": "ListBoxDetails",
    334         "type": "object",
    335         "description": "Information about the state of a list box.",
    336         "properties": {
    337           "value": {"type": "string", "description": "The value of the list box."},
    338           "itemCount": {"type": "integer", "description": "The number of items in the list."},
    339           "itemIndex": {"type": "integer", "description": "The 0-based index of the selected value, or -1 if no items are selected."}
    340         }
    341       },
    342       {
    343         "id": "MenuDetails",
    344         "type": "object",
    345         "description": "Information about the state of a drop-down menu.",
    346         "properties": {
    347         }
    348       },
    349       {
    350         "id": "MenuItemDetails",
    351         "type": "object",
    352         "description": "Information about a menu item.",
    353         "properties": {
    354           "hasSubmenu": {"type": "boolean", "description": "True if this item opens a submenu."},
    355           "itemCount": {"type": "integer", "description": "The number of items in the menu."},
    356           "itemIndex": {"type": "integer", "description": "The 0-based index of this menu item."}
    357         }
    358       },
    359       {
    360         "id": "RadioButtonDetails",
    361         "type": "object",
    362         "description": "Information about the state of a radio button.",
    363         "properties": {
    364           "isChecked": {"type": "boolean", "description": "True if this radio button is checked."},
    365           "itemCount": {"type": "integer", "description": "The number of radio buttons in this group."},
    366           "itemIndex": {"type": "integer", "description": "The 0-based index of this radio button in this group."}
    367         }
    368       },
    369       {
    370         "id": "TabDetails",
    371         "type": "object",
    372         "description": "Additional accessibility information about a tab.",
    373         "properties": {
    374           "itemCount": {"type": "integer", "description": "The number of tabs in this group."},
    375           "itemIndex": {"type": "integer", "description": "The 0-based index of this tab in this group."}
    376         }
    377       },
    378       {
    379         "id": "TextBoxDetails",
    380         "type": "object",
    381         "description": "Information about the state of a text box.",
    382         "properties": {
    383           "value": {"type": "string", "description": "The value of the text box - the entered text."},
    384           "isPassword": {"type": "boolean", "description": "True if this control contains password text whose contents should be obscured."},
    385           "selectionStart": {"type": "integer", "description": "The index of the character where the selection starts, if this control contains editable text."},
    386           "selectionEnd": {"type": "integer", "description": "The index of the character where the selection ends, if this control contains editable text."}
    387         }
    388       }
    389     ],
    390     "functions": [
    391       {
    392         "name": "setAccessibilityEnabled",
    393         "type": "function",
    394         "description": "Enable or disable the accessibility extension api. This must be set to true before event listeners or getFocusedControl will work.",
    395         "parameters": [
    396           {
    397             "type": "boolean",
    398             "name": "enabled",
    399             "description": "True if accessibility support should be enabled."
    400           }
    401         ]
    402       },
    403       {
    404         "name": "getFocusedControl",
    405         "type": "function",
    406         "description": "Get information about the currently focused control.",
    407         "parameters": [
    408           {
    409             "type": "function",
    410             "name": "callback",
    411             "parameters": [
    412               {
    413                 "name": "control",
    414                 "description": "Details of the currently focused control, or null if nothing is focused.",
    415                 "choices": [
    416                   { "$ref": "AccessibilityObject" },
    417                   { "type": "null" }
    418                 ]
    419               }
    420             ]
    421           }
    422         ]
    423       }
    424     ],
    425     "events": [
    426       {
    427         "name": "onWindowOpened",
    428         "type": "function",
    429         "description": "Fired when a window is opened.",
    430         "parameters": [
    431           {
    432             "$ref": "AccessibilityObject",
    433             "name": "window",
    434             "description": "Information about the window that was opened."
    435           }
    436         ]
    437       },
    438       {
    439         "name": "onWindowClosed",
    440         "type": "function",
    441         "description": "Fired when a window is closed.",
    442         "parameters": [
    443           {
    444             "$ref": "AccessibilityObject",
    445             "name": "window",
    446             "description": "Information about the window that was closed."
    447           }
    448         ]
    449       },
    450       {
    451         "name": "onControlFocused",
    452         "type": "function",
    453         "description": "Fired when a control is focused.",
    454         "parameters": [
    455           {
    456             "$ref": "AccessibilityObject",
    457             "name": "control",
    458             "description": "Details of the control that was focused."
    459           }
    460         ]
    461       },
    462       {
    463         "name": "onControlAction",
    464         "type": "function",
    465         "description": "Fired when a control's action is taken, like pressing a button or toggling a checkbox.",
    466         "parameters": [
    467           {
    468             "$ref": "AccessibilityObject",
    469             "name": "control",
    470             "description": "Details of the control whose action was taken."
    471           }
    472         ]
    473       },
    474       {
    475         "name": "onTextChanged",
    476         "type": "function",
    477         "description": "Fired when text changes in an editable text control.",
    478         "parameters": [
    479           {
    480             "$ref": "AccessibilityObject",
    481             "name": "control",
    482             "description": "Details of the control where the text changed."
    483           }
    484         ]
    485       },
    486       {
    487         "name": "onMenuOpened",
    488         "type": "function",
    489         "description": "Fired when a menu is opened.",
    490         "parameters": [
    491           {
    492             "$ref": "AccessibilityObject",
    493             "name": "menu",
    494             "description": "Information about the menu that was opened."
    495           }
    496         ]
    497       },
    498       {
    499         "name": "onMenuClosed",
    500         "type": "function",
    501         "description": "Fired when a menu is closed.",
    502         "parameters": [
    503           {
    504             "$ref": "AccessibilityObject",
    505             "name": "menu",
    506             "description": "Information about the menu that was closed."
    507           }
    508         ]
    509       }
    510     ]
    511   },
    512   {
    513     "namespace": "experimental.tts",
    514     "functions": [
    515       {
    516         "name": "speak",
    517         "type": "function",
    518         "description": "Speak text using a text-to-speech engine.",
    519         "parameters": [
    520           {
    521             "type": "string",
    522             "name": "utterance",
    523             "description": "The text to speak. May include SSML markup."
    524           },
    525           {
    526             "type": "object",
    527             "name": "options",
    528             "optional": true,
    529             "description": "The speech options.",
    530             "properties": {
    531               "enqueue": {
    532 	        "type": "boolean",
    533 		"optional": true,
    534 		"description": "If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance."
    535               },
    536 	      "voiceName": {
    537                 "type": "string",
    538                 "optional": true,
    539                 "description": "The name of the voice to use for synthesis. If empty, uses any available voice."
    540               },
    541 	      "locale": {
    542                 "type": "string",
    543                 "optional": true,
    544                 "description": "The language and optional region code that specify the language and dialect to be used for synthesis, in the form &lt;language&gt;-&lt;region&gt;. Examples: 'en', 'en-US', 'en-GB', 'zh-CN', etc."
    545               },
    546               "gender": {
    547                 "type": "string",
    548                 "optional": true,
    549                 "description": "Gender of voice for synthesized speech.",
    550                 "enum": ["male", "female"]
    551               },
    552               "rate": {
    553                 "type": "number",
    554                 "optional": true,
    555                 "minimum": 0,
    556                 "maximum": 1,
    557                 "description": "Speaking speed between 0 and 1 inclusive, with 0 being slowest and 1 being fastest, with a default of 0.5."
    558               },
    559               "pitch": {
    560                 "type": "number",
    561                 "optional": true,
    562                 "minimum": 0,
    563                 "maximum": 1,
    564                 "description": "Speaking pitch between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 0.5."
    565               },
    566               "volume": {
    567                 "type": "number",
    568                 "optional": true,
    569                 "minimum": 0,
    570                 "maximum": 1,
    571                 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest, with a default of 1.0."
    572               }
    573             }
    574           },
    575           {
    576             "type": "function",
    577             "name": "callback",
    578             "optional": true,
    579             "description": "This function is called when speaking is finished.",
    580             "parameters": []
    581           }
    582         ]
    583       },
    584       {
    585         "name": "stop",
    586         "type": "function",
    587         "description": "Stop any current speech.",
    588         "parameters": []
    589       },
    590       {
    591         "name": "isSpeaking",
    592         "type": "function",
    593         "description": "Check if the engine is currently speaking.",
    594         "parameters": [
    595           {
    596             "type": "function",
    597             "name": "callback",
    598             "optional": true,
    599             "parameters": [
    600               {
    601                 "name": "speaking",
    602                 "type": "boolean",
    603                 "description": "True if speaking, false otherwise."
    604               }
    605             ]
    606           }
    607         ]
    608       },
    609       {
    610         "name": "speakCompleted",
    611         "nodoc": true,
    612         "type": "function",
    613         "description": "A callback passed to the onSpeak event.",
    614         "parameters": [
    615           {
    616             "type": "integer",
    617             "name": "requestId"
    618           },
    619           {
    620             "type": "string",
    621 	    "optional": "true",
    622             "name": "errorMessage"
    623           }
    624         ]
    625       }
    626     ],
    627     "events": [
    628       {
    629         "name": "onSpeak",
    630         "type": "function",
    631         "description": "Called when the user makes a call to tts.speak and the options matches one of the tts_voices from this extension's manifest.",
    632         "parameters": [
    633           {
    634             "type": "string",
    635             "name": "utterance",
    636             "description": "The text to speak. This may include SSML, so if your engine does not support SSML, you should strip out all XML markup and synthesize only the underlying text content."
    637           },
    638           {
    639             "type": "object",
    640             "name": "options",
    641             "description": "The speak options.",
    642             "properties": {
    643 	      "voiceName": {
    644                 "type": "string",
    645                 "optional": true,
    646                 "description": "The name of the voice to use for synthesis."
    647               },
    648 	      "locale": {
    649                 "type": "string",
    650                 "optional": true,
    651                 "description": "The language and region code that specify the language and dialect to be used for synthesis, in the form <language>-<region>, e.g. en-US, en-GB, fr-CA, zh-CN, etc."
    652               },
    653               "gender": {
    654                 "type": "string",
    655                 "optional": true,
    656                 "description": "Gender of voice for synthesized speech.",
    657                 "enum": ["male", "female"]
    658               },
    659               "rate": {
    660                 "type": "number",
    661                 "optional": true,
    662                 "minimum": 0,
    663                 "maximum": 1,
    664                 "description": "Speaking speed between 0 and 1 inclusive, with 0 being slowest and 1 being fastest."
    665               },
    666               "pitch": {
    667                 "type": "number",
    668                 "optional": true,
    669                 "minimum": 0,
    670                 "maximum": 1,
    671                 "description": "Speaking pitch between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
    672               },
    673               "volume": {
    674                 "type": "number",
    675                 "optional": true,
    676                 "minimum": 0,
    677                 "maximum": 1,
    678                 "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
    679               }
    680             }
    681 	  },
    682           {
    683             "type": "function",
    684             "name": "callback",
    685             "description": "You must call this function when speaking is finished.",
    686             "parameters": [
    687               {
    688                 "type": "string",
    689                 "name": "error",
    690 		"optional": true,
    691                 "description": "Error message, which will be returned to the caller in chrome.extension.lastError."
    692               }
    693             ]
    694           }
    695         ]
    696       },
    697       {
    698         "name": "onStop",
    699         "type": "function",
    700         "description": "Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error)."
    701       }
    702     ]
    703   },
    704   {
    705     "namespace": "windows",
    706     "types": [
    707       {
    708         "id": "Window",
    709         "type": "object",
    710         "properties": {
    711           "id": {"type": "integer", "minimum": 0, "description": "The ID of the window. Window IDs are unique within a browser session."},
    712           "focused": {"type": "boolean", "description": "Whether the window is currently the focused window."},
    713           "top": {"type": "integer", "description": "The offset of the window from the top edge of the screen in pixels."},
    714           "left": {"type": "integer", "description": "The offset of the window from the left edge of the screen in pixels."},
    715           "width": {"type": "integer", "description": "The width of the window in pixels."},
    716           "height": {"type": "integer", "description": "The height of the window in pixels."},
    717           "tabs": {"type": "array", "items": { "$ref": "Tab" }, "optional": true, "description": "Array of $ref:Tab objects representing the current tabs in the window."},
    718           "incognito": {"type": "boolean", "description": "Whether the window is incognito."},
    719           "type": {
    720             "type": "string",
    721             "description": "The type of browser window this is. The 'panel' type requires the 'experimental' permission.",
    722             "enum": ["normal", "popup", "panel", "app"]
    723           }
    724         }
    725       }
    726     ],
    727     "properties": {
    728       "WINDOW_ID_NONE": {
    729         "type": "integer",
    730         "value": "-1",
    731         "description": "The windowId value that represents the absence of a chrome browser window."
    732       }
    733     },
    734     "functions": [
    735       {
    736         "name": "get",
    737         "type": "function",
    738         "description": "Gets details about a window.",
    739         "parameters": [
    740           {"type": "integer", "name": "windowId", "minimum": 0},
    741           {
    742             "type": "function",
    743             "name": "callback",
    744             "parameters": [
    745               {
    746                 "name": "window", "$ref": "Window"
    747               }
    748             ]
    749           }
    750         ]
    751       },
    752       {
    753         "name": "getCurrent",
    754         "type": "function",
    755         "description": "Gets the <a href='#current-window'>current window</a>.",
    756         "parameters": [
    757           {
    758             "type": "function",
    759             "name": "callback",
    760             "parameters": [
    761               {
    762                 "name": "window", "$ref": "Window"
    763               }
    764             ]
    765           }
    766         ]
    767       },
    768       {
    769         "name": "getLastFocused",
    770         "type": "function",
    771         "description": "Gets the window that was most recently focused &mdash; typically the window 'on top'.",
    772         "parameters": [
    773           {
    774             "type": "function",
    775             "name": "callback",
    776             "parameters": [
    777               {
    778                 "name": "window", "$ref": "Window"
    779               }
    780             ]
    781           }
    782         ]
    783       },
    784       {
    785         "name": "getAll",
    786         "type": "function",
    787         "description": "Gets all windows.",
    788         "parameters": [
    789           {
    790             "type": "object",
    791             "name": "getInfo",
    792             "optional": true,
    793             "description": "",
    794             "properties": {
    795               "populate": {"type": "boolean", "optional": true, "description": "If true, each window object will have a <var>tabs</var> property that contains a list of the $ref:Tab objects for that window." }
    796             }
    797           },
    798           {
    799             "type": "function",
    800             "name": "callback",
    801             "parameters": [
    802               {
    803                 "name": "windows", "type": "array", "items": { "$ref": "Window" }
    804               }
    805             ]
    806           }
    807         ]
    808       },
    809       {
    810         "name": "create",
    811         "type": "function",
    812         "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
    813         "parameters": [
    814           {
    815             "type": "object",
    816             "name": "createData",
    817             "properties": {
    818               "url": {
    819                 "type": "string",
    820                 "description": "A URL or list of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.",
    821                 "optional": true,
    822                 "choices": [
    823                   {"type": "string"},
    824                   {"type": "array", "items": {"type": "string"}}
    825                 ]
    826               },
    827               "tabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The id of the tab for which you want to adopt to the new window."},
    828               "left": {"type": "integer", "optional": true, "description": "The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focusd window."},
    829               "top": {"type": "integer", "optional": true, "description": "The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focusd window."},
    830               "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width in pixels of the new window. If not specified defaults to a natural width."},
    831               "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height in pixels of the new window. If not specified defaults to a natural height."},
    832 	      "focused": {"type": "boolean", "optional": true, "description": "If true, opens an active window. If false, opens an inactive window."},
    833               "incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."},
    834               "type": {
    835                 "type": "string",
    836                 "optional": true,
    837                 "description": "Specifies what type of browser window to create. The 'panel' type requires the 'experimental' permission.",
    838                 "enum": ["normal", "popup", "panel"]
    839               }
    840             },
    841             "optional": true
    842           },
    843           {
    844             "type": "function",
    845             "name": "callback",
    846             "optional": true,
    847             "parameters": [
    848               {
    849                 "name": "window", "$ref": "Window", "description": "Contains details about the created window.",
    850                 "optional": true
    851               }
    852             ]
    853           }
    854         ]
    855       },
    856       {
    857         "name": "update",
    858         "type": "function",
    859         "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
    860         "parameters": [
    861           {"type": "integer", "name": "windowId", "minimum": 0},
    862           {
    863             "type": "object",
    864             "name": "updateInfo",
    865             "properties": {
    866               "left": {"type": "integer", "optional": true, "description": "The offset from the left edge of the screen to move the window to in pixels."},
    867               "top": {"type": "integer", "optional": true, "description": "The offset from the top edge of the screen to move the window to in pixels."},
    868               "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width to resize the window to in pixels."},
    869               "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height to resize the window to in pixels."},
    870               "focused": {"type": "boolean", "optional": true, "description": "If true, brings the window to the front. If false, brings the next window in the z-order to the front."}
    871             }
    872           },
    873           {
    874             "type": "function",
    875             "name": "callback",
    876             "optional": true,
    877             "parameters": [
    878               {
    879                 "name": "window", "$ref": "Window"
    880               }
    881             ]
    882           }
    883         ]
    884       },
    885       {
    886         "name": "remove",
    887         "type": "function",
    888         "description": "Removes (closes) a window, and all the tabs inside it.",
    889         "parameters": [
    890           {"type": "integer", "name": "windowId", "minimum": 0},
    891           {"type": "function", "name": "callback", "optional": true, "parameters": []}
    892         ]
    893       }
    894     ],
    895     "events": [
    896       {
    897         "name": "onCreated",
    898         "type": "function",
    899         "description": "Fired when a window is created.",
    900         "parameters": [
    901           {
    902             "$ref": "Window",
    903             "name": "window",
    904             "description": "Details of the window that was created."
    905           }
    906         ]
    907       },
    908       {
    909         "name": "onRemoved",
    910         "type": "function",
    911         "description": "Fired when a window is removed (closed).",
    912         "parameters": [
    913           {"type": "integer", "name": "windowId", "minimum": 0, "description": "ID of the removed window."}
    914         ]
    915       },
    916       {
    917         "name": "onFocusChanged",
    918         "type": "function",
    919         "description": "Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus. Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.",
    920         "parameters": [
    921           {"type": "integer", "name": "windowId", "minimum": 0, "description": "ID of the newly focused window."}
    922         ]
    923       }
    924     ]
    925   },
    926   {
    927     "namespace": "tabs",
    928     "types": [
    929       {
    930         "id": "Tab",
    931         "type": "object",
    932         "properties": {
    933           "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."},
    934           "index": {"type": "integer", "minimum": 0, "description": "The zero-based index of the tab within its window."},
    935           "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."},
    936           "selected": {"type": "boolean", "description": "Whether the tab is selected."},
    937           "pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
    938           "url": {"type": "string", "description": "The URL the tab is displaying."},
    939           "title": {"type": "string", "optional": true, "description": "The title of the tab. This may not be available if the tab is loading."},
    940           "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."},
    941           "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
    942           "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
    943         }
    944       }
    945     ],
    946     "functions": [
    947       {
    948         "name": "get",
    949         "type": "function",
    950         "description": "Retrieves details about the specified tab.",
    951         "parameters": [
    952           {
    953             "type": "integer",
    954             "name": "tabId",
    955             "minimum": 0
    956           },
    957           {
    958             "type": "function",
    959             "name": "callback",
    960             "parameters": [
    961               {"name": "tab", "$ref": "Tab"}
    962             ]
    963           }
    964         ]
    965       },
    966       {
    967         "name": "getCurrent",
    968         "type": "function",
    969         "description": "Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view).",
    970         "parameters": [
    971           {
    972             "type": "function",
    973             "name": "callback",
    974             "parameters": [
    975               {
    976                 "name": "tab",
    977                 "$ref": "Tab",
    978                 "optional": true
    979               }
    980             ]
    981           }
    982         ]
    983       },
    984       {
    985         "name": "connect",
    986         "type": "function",
    987         "description": "Connects to the content script(s) in the specified tab. The <a href='extension.html#event-onConnect'>chrome.extension.onConnect</a> event is fired in each content script running in the specified tab for the current extension. For more details, see <a href='content_scripts.html#messaging'>Content Script Messaging</a>.",
    988         "parameters": [
    989           {
    990             "type": "integer",
    991             "name": "tabId",
    992             "minimum": 0
    993           },
    994           {
    995             "type": "object",
    996             "name": "connectInfo",
    997             "properties": {
    998               "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." }
    999             },
   1000             "optional": true
   1001           }
   1002         ],
   1003         "returns": {
   1004           "$ref": "Port",
   1005           "description": "A port that can be used to communicate with the content scripts running in the specified tab. The port's <a href='extension.html#type-Port'>onDisconnect</a> event is fired if the tab closes or does not exist. "
   1006         }
   1007       },
   1008       {
   1009         "name": "sendRequest",
   1010         "type": "function",
   1011         "description": "Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back.  The <a href='extension.html#event-onRequest'>chrome.extension.onRequest</a> event is fired in each content script running in the specified tab for the current extension.",
   1012         "parameters": [
   1013           {
   1014             "type": "integer",
   1015             "name": "tabId",
   1016             "minimum": 0
   1017           },
   1018           {
   1019             "type": "any",
   1020             "name": "request"
   1021           },
   1022           {
   1023             "type": "function",
   1024             "name": "responseCallback",
   1025             "optional": true,
   1026             "parameters": [
   1027               {
   1028                 "name": "response",
   1029                 "type": "any",
   1030                 "description": "The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will be set to the error message."
   1031               }
   1032             ]
   1033           }
   1034         ]
   1035       },
   1036       {
   1037         "name": "getSelected",
   1038         "type": "function",
   1039         "description": "Gets the tab that is selected in the specified window.",
   1040         "parameters": [
   1041           {
   1042             "type": "integer",
   1043             "name": "windowId",
   1044             "minimum": 0,
   1045             "optional": true,
   1046             "description": "Defaults to the <a href='windows.html#current-window'>current window</a>."
   1047           },
   1048           {
   1049             "type": "function",
   1050             "name": "callback",
   1051             "parameters": [
   1052               {"name": "tab", "$ref": "Tab"}
   1053             ]
   1054           }
   1055         ]
   1056       },
   1057       {
   1058         "name": "getAllInWindow",
   1059         "type": "function",
   1060         "description": "Gets details about all tabs in the specified window.",
   1061         "parameters": [
   1062           {
   1063             "type": "integer",
   1064             "name": "windowId",
   1065             "minimum": 0,
   1066             "optional": true,
   1067             "description": "Defaults to the <a href='windows.html#current-window'>current window</a>."
   1068             },
   1069           {
   1070             "type": "function",
   1071             "name": "callback",
   1072             "parameters": [
   1073               {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } }
   1074             ]
   1075           }
   1076         ]
   1077       },
   1078       {
   1079         "name": "create",
   1080         "type": "function",
   1081         "description": "Creates a new tab. Note: This function can be used without requesting the 'tabs' permission in the manifest.",
   1082         "parameters": [
   1083           {
   1084             "type": "object",
   1085             "name": "createProperties",
   1086             "properties": {
   1087               "windowId": {
   1088                 "type": "integer",
   1089                 "minimum": 0,
   1090                 "optional": true,
   1091                 "description": "The window to create the new tab in. Defaults to the <a href='windows.html#current-window'>current window</a>."
   1092               },
   1093               "index": {
   1094                 "type": "integer",
   1095                 "minimum": 0,
   1096                 "optional": true,
   1097                 "description": "The position the tab should take in the window. The provided value will be clamped to between zero and the number of tabs in the window."
   1098               },
   1099               "url": {
   1100                 "type": "string",
   1101                 "optional": true,
   1102                 "description": "The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page."
   1103               },
   1104               "selected": {
   1105                 "type": "boolean",
   1106                 "optional": true,
   1107                 "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
   1108               },
   1109               "pinned": {
   1110                 "type": "boolean",
   1111                 "optional": true,
   1112                 "description": "Whether the tab should be pinned. Defaults to <var>false</var>"
   1113               }
   1114             }
   1115           },
   1116           {
   1117             "type": "function",
   1118             "name": "callback",
   1119             "optional": true,
   1120             "parameters": [
   1121               {
   1122                 "name": "tab",
   1123                 "$ref": "Tab",
   1124                 "description": "Details about the created tab. Will contain the ID of the new tab."
   1125               }
   1126             ]
   1127           }
   1128         ]
   1129       },
   1130       {
   1131         "name": "update",
   1132         "type": "function",
   1133         "description": "Modifies the properties of a tab. Properties that are not specified in <var>updateProperties</var> are not modified. Note: This function can be used without requesting the 'tabs' permission in the manifest.",
   1134         "parameters": [
   1135           {"type": "integer", "name": "tabId", "minimum": 0},
   1136           {
   1137             "type": "object",
   1138             "name": "updateProperties",
   1139             "properties": {
   1140               "url": {
   1141                 "optional": true,
   1142                 "description": "A URL to navigate the tab to."
   1143               },
   1144               "selected": {
   1145                 "type": "boolean", 
   1146                 "optional": true,
   1147                 "description": "Whether the tab should be selected."
   1148               },
   1149               "pinned": {
   1150                 "type": "boolean", 
   1151                 "optional": true,
   1152                 "description": "Whether the tab should be pinned."
   1153               }
   1154             }
   1155           },
   1156           {
   1157             "type": "function",
   1158             "name": "callback",
   1159             "optional": true,
   1160             "parameters": [
   1161               {
   1162                 "name": "tab",
   1163                 "$ref": "Tab",
   1164                 "description": "Details about the updated tab."
   1165               }
   1166             ]
   1167           }
   1168         ]
   1169       },
   1170       {
   1171         "name": "move",
   1172         "type": "function",
   1173         "description": "Moves a tab to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === \"normal\") windows.",
   1174         "parameters": [
   1175           {"type": "integer", "name": "tabId", "minimum": 0},
   1176           {
   1177             "type": "object",
   1178             "name": "moveProperties",
   1179             "properties": {
   1180               "windowId": {
   1181                 "type": "integer",
   1182                 "minimum": 0,
   1183                 "optional": true,
   1184                 "description": "Defaults to the window the tab is currently in."
   1185               },
   1186               "index": {
   1187                 "type": "integer",
   1188                 "minimum": 0,
   1189                 "description": "The position to move the window to. The provided value will be clamped to between zero and the number of tabs in the window."
   1190               }
   1191             }
   1192           },
   1193           {
   1194             "type": "function",
   1195             "name": "callback",
   1196             "optional": true,
   1197             "parameters": [
   1198               {
   1199                 "name": "tab",
   1200                 "$ref": "Tab",
   1201                 "description": "Details about the moved tab."
   1202               }
   1203             ]
   1204           }
   1205         ]
   1206       },
   1207       {
   1208         "name": "remove",
   1209         "type": "function",
   1210         "description": "Closes a tab.",
   1211         "parameters": [
   1212           {"type": "integer", "name": "tabId", "minimum": 0},
   1213           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   1214         ]
   1215       },
   1216       {
   1217         "name": "detectLanguage",
   1218         "type": "function",
   1219         "description": "Detects the primary language of the content in a tab.",
   1220         "parameters": [
   1221           {
   1222             "type": "integer",
   1223             "name": "tabId",
   1224             "minimum": 0,
   1225             "optional": true,
   1226             "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   1227           },
   1228           {
   1229             "type": "function",
   1230             "name": "callback",
   1231             "parameters": [
   1232               {
   1233                 "type": "string",
   1234                 "name": "language",
   1235                 "description": "An ISO language code such as <code>en</code> or <code>fr</code>. For a complete list of languages supported by this method, see <a href='http://src.chromium.org/viewvc/chrome/trunk/src/third_party/cld/languages/internal/languages.cc'>kLanguageInfoTable</a>. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, <code>und</code> will be returned."
   1236               }
   1237             ]
   1238           }
   1239         ]
   1240       },
   1241       {
   1242         "name": "captureVisibleTab",
   1243         "type": "function",
   1244         "description": "Captures the visible area of the currently selected tab in the specified window. You must have <a href='manifest.html#permissions'>host permission</a> for the URL displayed by the tab.",
   1245         "parameters": [
   1246           {
   1247             "type": "integer",
   1248             "name": "windowId",
   1249             "minimum": 0,
   1250             "optional": true,
   1251             "description": "The target window. Defaults to the <a href='windows.html#current-window'>current window</a>."
   1252           },
   1253           {
   1254             "type": "object",
   1255             "name": "options",
   1256             "optional": true,
   1257             "description": "Set parameters of image capture, such as the format of the resulting image.",
   1258             "properties": {
   1259               "format": {
   1260                 "type": "string",
   1261                 "optional": true,
   1262                 "enum": ["jpeg", "png"],
   1263                 "description": "The format of the resulting image.  Default is jpeg."
   1264               },
   1265               "quality": {
   1266                 "type": "integer",
   1267                 "name": "quality",
   1268                 "optional": true,
   1269                 "minimum": 0,
   1270                 "maximum": 100,
   1271                 "description": "When format is 'jpeg', controls the quality of the resulting image.  This value is ignored for PNG images.  As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease."
   1272               }
   1273             }
   1274           },
   1275           {
   1276             "type": "function", "name": "callback", "parameters": [
   1277               {"type": "string", "name": "dataUrl", "description": "A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display."}
   1278             ]
   1279           }
   1280         ]
   1281       },
   1282       {
   1283         "name": "executeScript",
   1284         "type": "function",
   1285         "description": "Injects JavaScript code into a page. For details, see the <a href='content_scripts.html#pi'>programmatic injection</a> section of the content scripts doc.",
   1286         "parameters": [
   1287           {"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to run the script; defaults to the selected tab of the current window."},
   1288           {
   1289             "type": "object",
   1290             "name": "details",
   1291             "description": "Details of the script to run. Either the code or the file property must be set, but both may not be set at the same time.",
   1292             "properties": {
   1293               "code": {"type": "string", "optional": true, "description": "JavaScript code to execute."},
   1294               "file": {"type": "string", "optional": true, "description": "JavaScript file to execute."},
   1295               "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects script into all frames of current page. By default, it's false and script is injected only into the top main frame."}
   1296             }
   1297           },
   1298           {
   1299             "type": "function",
   1300             "name": "callback",
   1301             "optional": true,
   1302             "description": "Called after all the JavaScript has been executed.",
   1303             "parameters": []
   1304           }
   1305         ]
   1306       },
   1307       {
   1308         "name": "insertCSS",
   1309         "type": "function",
   1310         "description": "Injects CSS into a page. For details, see the <a href='content_scripts.html#pi'>programmatic injection</a> section of the content scripts doc.",
   1311         "parameters": [
   1312           {"type": "integer", "name": "tabId", "optional": true, "description": "The ID of the tab in which to insert the CSS; defaults to the selected tab of the current window."},
   1313           {
   1314             "type": "object",
   1315             "name": "details",
   1316             "description": "Details of the CSS text to insert. Either the code or the file property must be set, but both may not be set at the same time.",
   1317             "properties": {
   1318               "code": {"type": "string", "optional": true, "description": "CSS code to be injected."},
   1319               "file": {"type": "string", "optional": true, "description": "CSS file to be injected."},
   1320               "allFrames": {"type": "boolean", "optional": true, "description": "If allFrames is true, this function injects CSS text into all frames of current page. By default, it's false and CSS is injected only into the top main frame."}
   1321             }
   1322           },
   1323           {
   1324             "type": "function",
   1325             "name": "callback",
   1326             "optional": true,
   1327             "description": "Called when all the CSS has been inserted.",
   1328             "parameters": []
   1329           }
   1330         ]
   1331       }
   1332     ],
   1333     "events": [
   1334       {
   1335         "name": "onCreated",
   1336         "type": "function",
   1337         "description": "Fires when a tab is created. Note that the tab's URL may not be set at the time this event fires, but you can listen to onUpdated events to be notified when a URL is set.",
   1338         "parameters": [
   1339           {
   1340             "$ref": "Tab",
   1341             "name": "tab",
   1342             "description": "Details of the tab that was created."
   1343           }
   1344         ]
   1345       },
   1346       {
   1347         "name": "onUpdated",
   1348         "type": "function",
   1349         "description": "Fires when a tab is updated.",
   1350         "parameters": [
   1351           {"type": "integer", "name": "tabId", "minimum": 0},
   1352           {
   1353             "type": "object",
   1354             "name": "changeInfo",
   1355             "description": "Lists the changes to the state of the tab that was updated.",
   1356             "properties": {
   1357               "status": {
   1358                 "type": "string",
   1359                 "optional": true,
   1360                 "description": "The status of the tab. Can be either <em>loading</em> or <em>complete</em>."
   1361               },
   1362               "url": {
   1363                 "type": "string",
   1364                 "optional": true,
   1365                 "description": "The tab's URL if it has changed."
   1366               },
   1367               "pinned": {
   1368                 "type": "boolean",
   1369                 "optional": true,
   1370                 "description": "The tab's new pinned state."
   1371               }
   1372             }
   1373           },
   1374           {
   1375             "$ref": "Tab",
   1376             "name": "tab",
   1377             "description": "Gives the state of the tab that was updated."
   1378           }
   1379         ]
   1380       },
   1381       {
   1382         "name": "onMoved",
   1383         "type": "function",
   1384         "description": "Fires when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see <a href='#event-onDetached'>onDetached</a>.",
   1385         "parameters": [
   1386           {"type": "integer", "name": "tabId", "minimum": 0},
   1387           {
   1388             "type": "object",
   1389             "name": "moveInfo",
   1390             "properties": {
   1391               "windowId": {"type": "integer", "minimum": 0},
   1392               "fromIndex": {"type": "integer", "minimum": 0},
   1393               "toIndex": {"type": "integer", "minimum": 0}
   1394             }
   1395           }
   1396         ]
   1397       },
   1398       {
   1399         "name": "onSelectionChanged",
   1400         "type": "function",
   1401         "description": "Fires when the selected tab in a window changes.",
   1402         "parameters": [
   1403           {
   1404             "type": "integer",
   1405             "name": "tabId",
   1406             "minimum": 0,
   1407             "description": "The ID of the tab that has become selected."
   1408           },
   1409           {
   1410             "type": "object",
   1411             "name": "selectInfo",
   1412             "properties": {
   1413               "windowId": {
   1414                 "type": "integer",
   1415                 "minimum": 0,
   1416                 "description": "The ID of the window the selected tab changed inside of."
   1417               }
   1418             }
   1419           }
   1420         ]
   1421       },
   1422       {
   1423         "name": "onDetached",
   1424         "type": "function",
   1425         "description": "Fired when a tab is detached from a window, for example because it is being moved between windows.",
   1426         "parameters": [
   1427           {"type": "integer", "name": "tabId", "minimum": 0},
   1428           {
   1429             "type": "object",
   1430             "name": "detachInfo",
   1431             "properties": {
   1432               "oldWindowId": {"type": "integer", "minimum": 0},
   1433               "oldPosition": {"type": "integer", "minimum": 0}
   1434             }
   1435           }
   1436         ]
   1437       },
   1438       {
   1439         "name": "onAttached",
   1440         "type": "function",
   1441         "description": "Fired when a tab is attached to a window, for example because it was moved between windows.",
   1442         "parameters": [
   1443           {"type": "integer", "name": "tabId", "minimum": 0},
   1444           {
   1445             "type": "object",
   1446             "name": "attachInfo",
   1447             "properties": {
   1448               "newWindowId": {"type": "integer", "minimum": 0},
   1449               "newPosition": {"type": "integer", "minimum": 0}
   1450             }
   1451           }
   1452         ]
   1453       },
   1454       {
   1455         "name": "onRemoved",
   1456         "type": "function",
   1457         "description": "Fires when a tab is closed.",
   1458         "parameters": [
   1459           {"type": "integer", "name": "tabId", "minimum": 0},
   1460           { 
   1461             "type": "object",
   1462             "name": "removeInfo",
   1463             "properties": {
   1464               "isWindowClosing": {"type": "boolean", "description": "True when the tab is being closed because its window is being closed." }
   1465             }            
   1466           }          
   1467         ]
   1468       }
   1469     ]
   1470   },
   1471   {
   1472     "namespace": "pageActions",
   1473     "nodoc": true,
   1474     "types": [],
   1475     "functions": [
   1476       {
   1477         "name": "enableForTab",
   1478         "type": "function",
   1479         "description": "Enables a page action for a particular tab+URL combination (makes its icon visible in the OmniBox when a certain URL is active in a given tab). The page action will automatically be disabled (its icon hidden) if the user navigates to a new URL or closes the tab. The action will also automatically be enabled/disabled as the user switches tabs.",
   1480         "parameters": [
   1481           {"type": "string", "name": "pageActionId", "description": "An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to enable (and must match a page action id declared in the manifest)."},
   1482           {
   1483             "type": "object",
   1484             "name": "action",
   1485             "description": "An object specifing what action should be applied to the page action. Contains the following properties:",
   1486             "properties": {
   1487               "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to enable the page action."},
   1488               "url": {"type": "string", "description": "The URL of the page you want the page action to apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken."},
   1489               "title": {"type": "string", "optional": true, "description": "Specifying <b>title</b> allows you to change the tooltip that appears when you hover over the page action icon in the OmniBox. This parameter is optional and if omitted then the page action <b>name</b> property declared in the manifest is used."},
   1490               "iconId": {"type": "integer", "minimum": 0, "optional": true, "description": "A zero-based index into the <b>icons</b> vector specified in the manifest. This parameter is optional and if omitted then the first icon in the <b>icons</b> vector of the page action is used. This id is useful to represent different page action states. Example: An RSS feed icon could have a 'subscribe now' icon and an 'already subscribed' icon."}
   1491             },
   1492             "optional": false
   1493           }
   1494         ]
   1495       },
   1496       {
   1497         "name": "disableForTab",
   1498         "type": "function",
   1499         "description": "Disables a page action for a particular tab+URL combination (makes its OmniBox page action icon hidden when a certain URL is active in a given tab). This can be useful to disable a page action before the user navigates away from a page containing an enabled page action.",
   1500         "parameters": [
   1501           {"type": "string", "name": "pageActionId", "description": "An extension can have multiple page actions specified in the manifest, each with a unique identifier. This string identifies which page action you want to disable (and must match a page action id declared in the manifest)."},
   1502           {
   1503             "type": "object",
   1504             "name": "action",
   1505             "description": "An object specifying what action should be applied to the page action. Contains the following properties:",
   1506             "properties": {
   1507               "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to disable the page action."},
   1508               "url": {"type": "string", "description": "The URL of the page you want the page action to not apply to. If the URL specified does not match the currently navigated URL (user has navigated to another page) then no action is taken."}
   1509             },
   1510             "optional": false
   1511           }
   1512         ]
   1513       }
   1514     ],
   1515     "events": []
   1516   },
   1517   {
   1518     "namespace": "pageAction",
   1519     "types": [],
   1520     "functions": [
   1521       {
   1522         "name": "show",
   1523         "type": "function",
   1524         "description": "Shows the page action. The page action is shown whenever the tab is selected.",
   1525         "parameters": [
   1526           {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
   1527         ]
   1528       },
   1529       {
   1530         "name": "hide",
   1531         "type": "function",
   1532         "description": "Hides the page action.",
   1533         "parameters": [
   1534           {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
   1535         ]
   1536       },
   1537       {
   1538         "name": "setTitle",
   1539         "type": "function",
   1540         "description": "Sets the title of the page action. This is displayed in a tooltip over the page action.",
   1541         "parameters": [
   1542           {
   1543             "name": "details",
   1544             "type": "object",
   1545             "properties": {
   1546               "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
   1547               "title": {"type": "string", "description": "The tooltip string."}
   1548             }
   1549           }
   1550         ]
   1551       },
   1552       {
   1553         "name": "setIcon",
   1554         "type": "function",
   1555         "description": "Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
   1556         "parameters": [
   1557           {
   1558             "name": "details",
   1559             "type": "object",
   1560             "properties": {
   1561               "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
   1562               "imageData": {
   1563                 "type": "object",
   1564                 "isInstanceOf": "ImageData",
   1565                 "properties": {},
   1566                 "additionalProperties": { "type": "any" },
   1567                 "description": "Pixel data for an image. Must be an ImageData object (for example, from a canvas element).",
   1568                 "optional": true
   1569               },
   1570               "path": {
   1571                 "type": "string",
   1572                 "description": "Relative path to an image in the extension to show in the browser action.",
   1573                 "optional": true
   1574               },
   1575               "iconIndex": {
   1576                 "type": "integer",
   1577                 "minimum": 0,
   1578                 "description": "<b>Deprecated.</b> The zero-based index into the <b>icons</b> vector specified in the manifest.",
   1579                 "optional": true
   1580               }
   1581             }
   1582           }
   1583         ]
   1584       },
   1585       {
   1586         "name": "setPopup",
   1587         "type": "function",
   1588         "description": "Sets the html document to be opened as a popup when the user clicks on the page action's icon.",
   1589         "min_version": "5.0.308.0",
   1590         "parameters": [
   1591           {
   1592             "name": "details",
   1593             "type": "object",
   1594             "properties": {
   1595               "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
   1596               "popup": {
   1597                 "type": "string",
   1598                 "description": "The html file to show in a popup.  If set to the empty string (''), no popup is shown."
   1599               }
   1600             }
   1601           }
   1602         ]
   1603       }
   1604     ],
   1605     "events": [
   1606       {
   1607         "name": "onClicked",
   1608         "type": "function",
   1609         "description": "Fired when a page action icon is clicked.  This event will not fire if the page action has a popup.",
   1610         "parameters": [
   1611           {
   1612             "name": "tab",
   1613             "$ref": "Tab"
   1614           }
   1615         ]
   1616       }
   1617     ]
   1618   },
   1619   {
   1620     "namespace": "browserAction",
   1621     "types": [],
   1622     "functions": [
   1623       {
   1624         "name": "setTitle",
   1625         "type": "function",
   1626         "description": "Sets the title of the browser action. This shows up in the tooltip.",
   1627         "parameters": [
   1628           {
   1629             "name": "details",
   1630             "type": "object",
   1631             "properties": {
   1632               "title": {
   1633                 "type": "string",
   1634                 "description": "The string the browser action should display when moused over."
   1635               },
   1636               "tabId": {
   1637                 "type": "integer",
   1638                 "optional": true,
   1639                 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
   1640               }
   1641             }
   1642           }
   1643         ]
   1644       },
   1645       {
   1646         "name": "setIcon",
   1647         "type": "function",
   1648         "description": "Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element. Either the <b>path</b> or the <b>imageData</b> property must be specified.",
   1649         "parameters": [
   1650           {
   1651             "name": "details",
   1652             "type": "object",
   1653             "properties": {
   1654               "imageData": {
   1655                 "type": "object",
   1656                 "isInstanceOf": "ImageData",
   1657                 "properties": {},
   1658                 "additionalProperties": { "type": "any" },
   1659                 "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).",
   1660                 "optional": true
   1661               },
   1662               "path": {
   1663                 "type": "string",
   1664                 "description": "Relative path to an image in the extension to show in the browser action.",
   1665                 "optional": true
   1666               },
   1667               "tabId": {
   1668                 "type": "integer",
   1669                 "optional": true,
   1670                 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
   1671               }
   1672             }
   1673           }
   1674         ]
   1675       },
   1676       {
   1677         "name": "setPopup",
   1678         "type": "function",
   1679         "min_version": "5.0.316.0",
   1680         "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
   1681         "parameters": [
   1682           {
   1683             "name": "details",
   1684             "type": "object",
   1685             "properties": {
   1686               "tabId": {
   1687                 "type": "integer",
   1688                 "optional": true,
   1689                 "minimum": 0,
   1690                 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
   1691               },
   1692               "popup": {
   1693                 "type": "string",
   1694                 "description": "The html file to show in a popup.  If set to the empty string (''), no popup is shown."
   1695               }
   1696             }
   1697           }
   1698         ]
   1699       },
   1700       {
   1701         "name": "setBadgeText",
   1702         "type": "function",
   1703         "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
   1704         "parameters": [
   1705           {
   1706             "name": "details",
   1707             "type": "object",
   1708             "properties": {
   1709               "text": {
   1710                 "type": "string",
   1711                 "description": "Any number of characters can be passed, but only about four can fit in the space."
   1712               },
   1713               "tabId": {
   1714                 "type": "integer",
   1715                 "optional": true,
   1716                 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
   1717               }
   1718             }
   1719           }
   1720         ]
   1721       },
   1722       {
   1723         "name": "setBadgeBackgroundColor",
   1724         "type": "function",
   1725         "description": "Sets the background color for the badge.",
   1726         "parameters": [
   1727           {
   1728             "name": "details",
   1729             "type": "object",
   1730             "properties": {
   1731               "color": {
   1732                 "type": "array",
   1733                 "description": "An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is <code>[255, 0, 0, 255]</code>.",
   1734                 "items": {
   1735                   "type": "integer",
   1736                   "minimum": 0,
   1737                   "maximum": 255
   1738                 },
   1739                 "minItems": 4,
   1740                 "maxItems": 4
   1741               },
   1742               "tabId": {
   1743                 "type": "integer",
   1744                 "optional": true,
   1745                 "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
   1746               }
   1747             }
   1748           }
   1749         ]
   1750       }
   1751     ],
   1752     "events": [
   1753       {
   1754         "name": "onClicked",
   1755         "type": "function",
   1756         "description": "Fired when a browser action icon is clicked.  This event will not fire if the browser action has a popup.",
   1757         "parameters": [
   1758           {
   1759             "name": "tab",
   1760             "$ref": "Tab"
   1761           }
   1762         ]
   1763       }
   1764     ]
   1765   },
   1766   {
   1767     "namespace": "experimental.infobars",
   1768     "types": [],
   1769     "functions": [
   1770       {
   1771         "name": "show",
   1772         "type": "function",
   1773         "description": "Shows an infobar in the specified tab. The infobar will be closed automatically when the tab navigates. Use window.close() to close the infobar before then.",
   1774         "parameters": [
   1775           {
   1776             "name": "details",
   1777             "type": "object",
   1778             "properties": {
   1779               "tabId": {
   1780                 "type": "integer",
   1781                 "description": "The tab id for the tab to display the infobar in."
   1782               },
   1783               "path": {
   1784                 "type": "string",
   1785                 "description": "The html file that contains the infobar."
   1786               }
   1787             }
   1788           },
   1789           {
   1790             "type": "function",
   1791             "name": "callback",
   1792             "optional": true,
   1793             "parameters": [
   1794               {
   1795                 "name": "window", "$ref": "Window", "description": "Contains details about the window in which the infobar was created."
   1796               }
   1797             ]
   1798           }
   1799         ]
   1800       }
   1801     ]
   1802   },
   1803   {
   1804     "namespace": "bookmarks",
   1805     "types": [
   1806       {
   1807         "id": "BookmarkTreeNode",
   1808         "type": "object",
   1809         "description": "A node (either a bookmark or a folder) in the bookmark tree.  Child nodes are ordered within their parent folder.",
   1810         "properties": {
   1811           "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the node. IDs are unique within the current profile, and they remain valid even after the browser is restarted."},
   1812           "parentId": {"type": "string", "minimum": 0, "optional": true, "description": "The <code>id</code> of the parent folder.  Omitted for the root node."},
   1813           "index": {"type": "integer", "optional": true, "description": "The 0-based position of this node within its parent folder."},
   1814           "url": {"type": "string", "optional": true, "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders."},
   1815           "title": {"type": "string", "description": "The text displayed for the node."},
   1816           "dateAdded": {"type": "number", "optional": true, "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)."},
   1817           "dateGroupModified": {"type": "number", "optional": true, "description": "When the contents of this folder last changed, in milliseconds since the epoch."},
   1818           "children": {"type": "array", "optional": true, "items": {"$ref": "BookmarkTreeNode"}, "description": "An ordered list of children of this node."}
   1819         }
   1820       }
   1821     ],
   1822     "functions": [
   1823       {
   1824         "name": "get",
   1825         "type": "function",
   1826         "description": "Retrieves the specified BookmarkTreeNode(s).",
   1827         "parameters": [
   1828           {
   1829             "name": "idOrIdList",
   1830             "description": "A single string-valued id, or an array of string-valued ids",
   1831             "choices": [
   1832               {"type": "string"},
   1833               {"type": "array", "items": {"type": "string"}, "minItems": 1}
   1834             ]
   1835           },
   1836           {
   1837             "type": "function",
   1838             "name": "callback",
   1839             "parameters": [
   1840               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   1841             ]
   1842           }
   1843         ]
   1844       },
   1845       {
   1846         "name": "getChildren",
   1847         "type": "function",
   1848         "description": "Retrieves the children of the specified BookmarkTreeNode id.",
   1849         "parameters": [
   1850           {"type": "string", "name": "id"},
   1851           {
   1852             "type": "function",
   1853             "name": "callback",
   1854             "parameters": [
   1855               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   1856             ]
   1857           }
   1858         ]
   1859       },
   1860       {
   1861         "name": "getRecent",
   1862         "type": "function",
   1863         "description": "Retrieves the recently added bookmarks.",
   1864         "parameters": [
   1865           {
   1866             "type": "integer",
   1867             "minimum": 1,
   1868             "name": "numberOfItems",
   1869             "description": "The maximum number of items to return."
   1870           },
   1871           {
   1872             "type": "function",
   1873             "name": "callback",
   1874             "parameters": [
   1875               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   1876             ]
   1877           }
   1878         ]
   1879       },
   1880       {
   1881         "name": "getTree",
   1882         "type": "function",
   1883         "description": "Retrieves the entire Bookmarks hierarchy.",
   1884         "parameters": [
   1885           {
   1886             "type": "function",
   1887             "name": "callback",
   1888             "parameters": [
   1889               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   1890             ]
   1891           }
   1892         ]
   1893       },
   1894       {
   1895         "name": "search",
   1896         "type": "function",
   1897         "description": "Searches for BookmarkTreeNodes matching the given query.",
   1898         "parameters": [
   1899           {"type": "string", "name": "query"},
   1900           {
   1901             "type": "function",
   1902             "name": "callback",
   1903             "parameters": [
   1904               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   1905             ]
   1906           }
   1907         ]
   1908       },
   1909       {
   1910         "name": "create",
   1911         "type": "function",
   1912         "description": "Creates a bookmark or folder under the specified parentId.  If url is NULL or missing, it will be a folder.",
   1913         "parameters": [
   1914           {
   1915             "type": "object",
   1916             "name": "bookmark",
   1917             "properties": {
   1918               "parentId": {"type": "string"},
   1919               "index": {"type": "integer", "minimum": 0, "optional": true},
   1920               "title": {"type": "string", "optional": true},
   1921               "url": {"type": "string", "optional": true}
   1922             }
   1923           },
   1924           {
   1925             "type": "function",
   1926             "name": "callback",
   1927             "optional": true,
   1928             "parameters": [
   1929               {"name": "result", "$ref": "BookmarkTreeNode" }
   1930             ]
   1931           }
   1932         ]
   1933       },
   1934       {
   1935         "name": "move",
   1936         "type": "function",
   1937         "description": "Moves the specified BookmarkTreeNode to the provided location.",
   1938         "parameters": [
   1939           {"type": "string", "name": "id"},
   1940           {
   1941             "type": "object",
   1942             "name": "destination",
   1943             "properties": {
   1944               "parentId": {"type": "string"},
   1945               "index": {"type": "integer", "minimum": 0, "optional": true}
   1946             }
   1947           },
   1948           {
   1949             "type": "function",
   1950             "name": "callback",
   1951             "optional": true,
   1952             "parameters": [
   1953               {"name": "result", "$ref": "BookmarkTreeNode" }
   1954             ]
   1955           }
   1956         ]
   1957       },
   1958       {
   1959         "name": "update",
   1960         "type": "function",
   1961         "description": "Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged.  <b>Note:</b> Currently, only 'title' and 'url' are supported.",
   1962         "parameters": [
   1963           {"type": "string", "name": "id"},
   1964           {
   1965             "type": "object",
   1966             "name": "changes",
   1967             "properties": {
   1968               "title": {"type": "string", "optional": true},
   1969               "url": {"type": "string", "optional": true}
   1970             }
   1971           },
   1972           {
   1973             "type": "function",
   1974             "name": "callback",
   1975             "optional": true,
   1976             "parameters": [
   1977               {"name": "result", "$ref": "BookmarkTreeNode" }
   1978             ]
   1979           }
   1980         ]
   1981       },
   1982       {
   1983         "name": "remove",
   1984         "type": "function",
   1985         "description": "Removes a bookmark or an empty bookmark folder.",
   1986         "parameters": [
   1987           {"type": "string", "name": "id"},
   1988           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   1989         ]
   1990       },
   1991       {
   1992         "name": "removeTree",
   1993         "type": "function",
   1994         "description": "Recursively removes a bookmark folder.",
   1995         "parameters": [
   1996           {"type": "string", "name": "id"},
   1997           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   1998         ]
   1999       },
   2000       {
   2001         "name": "import",
   2002         "type": "function",
   2003         "description": "Imports bookmarks from a chrome html bookmark file",
   2004         "nodoc": "true",
   2005         "parameters": [
   2006           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   2007         ]
   2008       },
   2009       {
   2010         "name": "export",
   2011         "type": "function",
   2012         "description": "Exports bookmarks to a chrome html bookmark file",
   2013         "nodoc": "true",
   2014         "parameters": [
   2015           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   2016         ]
   2017       }
   2018     ],
   2019     "events": [
   2020       {
   2021         "name": "onCreated",
   2022         "type": "function",
   2023         "description": "Fired when a bookmark or folder is created.",
   2024         "parameters": [
   2025           {"type": "string", "name": "id"},
   2026           {
   2027             "$ref": "BookmarkTreeNode",
   2028             "name": "bookmark"
   2029           }
   2030         ]
   2031       },
   2032       {
   2033         "name": "onRemoved",
   2034         "type": "function",
   2035         "description": "Fired when a bookmark or folder is removed.  When a folder is removed recursively, a single notification is fired for the folder, and none for its contents.",
   2036         "parameters": [
   2037           {"type": "string", "name": "id"},
   2038           {
   2039             "type": "object",
   2040             "name": "removeInfo",
   2041             "properties": {
   2042               "parentId": { "type": "string" },
   2043               "index": { "type": "integer" }
   2044             }
   2045           }
   2046         ]
   2047       },
   2048       {
   2049         "name": "onChanged",
   2050         "type": "function",
   2051         "description": "Fired when a bookmark or folder changes.  <b>Note:</b> Currently, only title and url changes trigger this.",
   2052         "parameters": [
   2053           {"type": "string", "name": "id"},
   2054           {
   2055             "type": "object",
   2056             "name": "changeInfo",
   2057             "properties": {
   2058               "title": {"type": "string"},
   2059               "url": {"type": "string", "optional": true}
   2060             }
   2061           }
   2062         ]
   2063       },
   2064       {
   2065         "name": "onMoved",
   2066         "type": "function",
   2067         "description": "Fired when a bookmark or folder is moved to a different parent folder.",
   2068         "parameters": [
   2069           {"type": "string", "name": "id"},
   2070           {
   2071             "type": "object",
   2072             "name": "moveInfo",
   2073             "properties": {
   2074               "parentId": { "type": "string" },
   2075               "index": { "type": "integer" },
   2076               "oldParentId": { "type": "string" },
   2077               "oldIndex": { "type": "integer" }
   2078             }
   2079           }
   2080         ]
   2081       },
   2082       {
   2083         "name": "onChildrenReordered",
   2084         "type": "function",
   2085         "description": "Fired when the children of a folder have changed their order due to the order being sorted in the UI.  This is not called as a result of a move().",
   2086         "parameters": [
   2087           {"type": "string", "name": "id"},
   2088           {
   2089             "type": "object",
   2090             "name": "reorderInfo",
   2091             "properties": {
   2092               "childIds": { "type": "array", "items": { "type": "string" } }
   2093             }
   2094           }
   2095         ]
   2096       },
   2097       {
   2098         "name": "onImportBegan",
   2099         "type": "function",
   2100         "description": "Fired when a bookmark import session is begun.  Expensive observers should ignore handleCreated updates until onImportEnded is fired.  Observers should still handle other notifications immediately.",
   2101         "parameters": []
   2102       },
   2103       {
   2104         "name": "onImportEnded",
   2105         "type": "function",
   2106         "description": "Fired when a bookmark import session is ended.",
   2107         "parameters": []
   2108       }
   2109     ]
   2110   },
   2111   {
   2112     "namespace": "history",
   2113     "types": [
   2114       {
   2115         "id": "HistoryItem",
   2116         "type": "object",
   2117         "description": "An object encapsulating one result of a history query.",
   2118         "properties": {
   2119           "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
   2120           "url": {"type": "string", "optional": true, "description": "The URL navigated to by a user."},
   2121           "title": {"type": "string", "optional": true, "description": "The title of the history page."},
   2122           "lastVisitTime": {"type": "number", "optional": true, "description": "When this page was last loaded, represented in milliseconds since the epoch."},
   2123           "visitCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page."},
   2124           "typedCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page by typing in the address."}
   2125         }
   2126       },
   2127       {
   2128         "id": "VisitItem",
   2129         "type": "object",
   2130         "description": "An object encapsulating one visit to a URL.",
   2131         "properties": {
   2132           "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
   2133           "visitId": {"type": "string", "description": "The unique identifier for this visit."},
   2134           "visitTime": {"type": "number", "optional": true, "description": "When this visit occurred, represented in milliseconds since the epoch."},
   2135           "referringVisitId": {"type": "string", "description": "The visit_id of the referrer."},
   2136           "transition": {
   2137             "type": "string",
   2138             "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"],
   2139             "description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."
   2140           }
   2141         }
   2142       }
   2143     ],
   2144     "functions": [
   2145       {
   2146         "name": "search",
   2147         "type": "function",
   2148         "description": "Search the history for the last visit time of each page matching the query.",
   2149         "parameters": [
   2150           {
   2151             "name": "query",
   2152             "type": "object",
   2153             "properties": {
   2154               "text": {"type": "string", "description": "A free-text query to the history service.  Leave empty to retrieve all pages."},
   2155               "startTime": {"type": "number", "optional": true, "description": "Limit results to those visited after this date, represented in milliseconds since the epoch."},
   2156               "endTime": {"type": "number", "optional": true, "description": "Limit results to those visited before this date, represented in milliseconds since the epoch."},
   2157               "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve.  Defaults to 100."}
   2158             }
   2159           },
   2160           {
   2161             "name": "callback",
   2162             "type": "function",
   2163             "parameters": [
   2164               { "name": "results", "type": "array", "items": { "$ref": "HistoryItem"} }
   2165             ]
   2166           }
   2167         ]
   2168       },
   2169       {
   2170         "name": "getVisits",
   2171         "type": "function",
   2172         "description": "Retrieve information about visits to a URL.",
   2173         "parameters": [
   2174           {
   2175             "name": "details",
   2176             "type": "object",
   2177             "properties": {
   2178               "url": {"type": "string", "description": "The URL for which to retrieve visit information.  It must be in the format as returned from a call to history.search."}
   2179             }
   2180           },
   2181           {
   2182             "name": "callback",
   2183             "type": "function",
   2184             "parameters": [
   2185               { "name": "results", "type": "array", "items": { "$ref": "VisitItem"} }
   2186             ]
   2187           }
   2188         ]
   2189       },
   2190       {
   2191         "name": "addUrl",
   2192         "type": "function",
   2193         "description": "Adds a URL to the history at the current time with a <a href='#transition_types'>transition type</a> of \"link\".",
   2194         "parameters": [
   2195           {
   2196             "name": "details",
   2197             "type": "object",
   2198             "properties": {
   2199               "url": {"type": "string", "description": "The URL to add."}
   2200             }
   2201           }
   2202         ]
   2203       },
   2204       {
   2205         "name": "deleteUrl",
   2206         "type": "function",
   2207         "description": "Removes all occurrences of the given URL from the history.",
   2208         "parameters": [
   2209           {
   2210             "name": "details",
   2211             "type": "object",
   2212             "properties": {
   2213               "url": {"type": "string", "description": "The URL to remove."}
   2214             }
   2215           }
   2216         ]
   2217       },
   2218       {
   2219         "name": "deleteRange",
   2220         "type": "function",
   2221         "description": "Removes all items within the specified date range from the history.  Pages will not be removed from the history unless all visits fall within the range.",
   2222         "parameters": [
   2223           {
   2224             "name": "range",
   2225             "type": "object",
   2226             "properties": {
   2227               "startTime": { "type": "number", "description": "Items added to history after this date, represented in milliseconds since the epoch." },
   2228               "endTime": { "type": "number", "description": "Items added to history before this date, represented in milliseconds since the epoch." }
   2229             }
   2230           },
   2231           {
   2232             "name": "callback", "type": "function", "parameters": []
   2233           }
   2234         ]
   2235       },
   2236       {
   2237         "name": "deleteAll",
   2238         "type": "function",
   2239         "description": "Deletes all items from the history.",
   2240         "parameters": [
   2241           {
   2242             "name": "callback", "type": "function", "parameters": []
   2243           }
   2244         ]
   2245       }
   2246     ],
   2247     "events": [
   2248       {
   2249         "name": "onVisited",
   2250         "type": "function",
   2251         "description": "Fired when a URL is visited, providing the HistoryItem data for that URL.",
   2252         "parameters": [
   2253           { "name": "result", "$ref": "HistoryItem"}
   2254         ]
   2255       },
   2256       {
   2257         "name": "onVisitRemoved",
   2258         "type": "function",
   2259         "description": "Fired when one or more URLs are removed from the history service.  When all visits have been removed the URL is purged from history.",
   2260         "parameters": [
   2261           {
   2262             "name": "removed",
   2263             "type": "object",
   2264             "properties": {
   2265               "allHistory": { "type": "boolean", "description": "True if all history was removed.  If true, then urls will be empty." },
   2266               "urls": { "type": "array", "items": { "type": "string" }, "optional": true}
   2267             }
   2268           }
   2269         ]
   2270       }
   2271     ]
   2272   },
   2273   {
   2274     "namespace": "idle",
   2275     "types": [],
   2276     "functions": [
   2277       {
   2278         "name": "queryState",
   2279         "type": "function",
   2280         "description": "Returns the current state of the browser.",
   2281         "parameters": [
   2282           {
   2283             "name": "thresholdSeconds",
   2284             "type": "integer",
   2285             "minimum": 15,
   2286             "description": "Threshold, in seconds, used to determine when a machine is in the idle state."
   2287           },
   2288           {
   2289             "name": "callback",
   2290             "type": "function",
   2291             "parameters": [
   2292               {
   2293                 "name": "newState",
   2294                 "type": "string",
   2295                 "enum": ["active", "idle", "locked"]
   2296               }
   2297             ]
   2298           }
   2299         ]
   2300       }
   2301     ],
   2302     "events": [
   2303       {
   2304         "name": "onStateChanged",
   2305         "type": "function",
   2306         "description": "Fired when the browser changes to an active state.  Currently only reports the transition from idle to active.",
   2307         "parameters": [
   2308           {
   2309             "name": "newState",
   2310             "type": "string",
   2311             "enum": ["active"]
   2312           }
   2313         ]
   2314       }
   2315     ]
   2316   },
   2317   {
   2318     "namespace": "i18n",
   2319     "unprivileged": true,
   2320     "types": [],
   2321     "functions": [
   2322       {
   2323         "name": "getAcceptLanguages",
   2324         "type": "function",
   2325         "description": "Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use <code>window.navigator.language</code>.",
   2326         "parameters": [
   2327           {
   2328             "type": "function",
   2329             "name": "callback",
   2330             "parameters": [
   2331               {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array of the accept languages of the browser, such as en-US,en,zh-CN"}
   2332             ]
   2333           }
   2334         ]
   2335       },
   2336       {
   2337         "name": "getMessage",
   2338         "type": "function",
   2339         "unprivileged": true,
   2340         "description": "Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the <code>getMessage()</code> call is wrong &mdash; for example, <em>messageName</em> is not a string or the <em>substitutions</em> array is empty or has more than 9 elements &mdash; this method returns <code>undefined</code>.",
   2341         "parameters": [
   2342           { "type": "string",
   2343             "name": "messageName",
   2344             "description": "The name of the message, as specified in the <a href='i18n-messages.html'><code>messages.json</code></a> file."
   2345           },
   2346           {
   2347             "choices": [
   2348               { "type": "string" },
   2349               {
   2350                 "type": "array",
   2351                 "items": { "type": "string" },
   2352                 "minItems": 1,
   2353                 "maxItems": 9
   2354               }
   2355             ],
   2356             "name": "substitutions",
   2357             "optional": true,
   2358             "description": "1 - 9 substitution strings, if the message requires any."
   2359           }
   2360         ],
   2361         "returns": {
   2362           "type": "string",
   2363           "description": "Message localized for current locale."
   2364         }
   2365       }
   2366     ],
   2367     "events": []
   2368   },
   2369   {
   2370     "namespace": "experimental.input",
   2371     "nodoc": true,
   2372     "types": [],
   2373     "functions": [
   2374       {
   2375         "name": "sendKeyboardEvent",
   2376         "type": "function",
   2377         "description": "Send a keyboard event to Chrome.",
   2378         "parameters": [
   2379           { "type": "object",
   2380             "name": "event",
   2381             "properties": {
   2382               "type": {
   2383                 "type": "string",
   2384                 "description": "One of 'keyup' or 'keydown'."
   2385               },
   2386               "keyIdentifier": {
   2387                 "type": "string",
   2388                 "description": "See http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/keyset.html#KeySet-Set"
   2389               },
   2390               "altKey": {
   2391                 "type": "boolean",
   2392                 "optional": true,
   2393                 "description": "Whether or not the ALT key is pressed."
   2394               },
   2395               "ctrlKey": {
   2396                 "type": "boolean",
   2397                 "optional": true,
   2398                 "description": "Whether or not the CTRL key is pressed."
   2399               },
   2400               "metaKey": {
   2401                 "type": "boolean",
   2402                 "optional": true,
   2403                 "description": "Whether or not the META key is pressed."
   2404               },
   2405               "shiftKey": {
   2406                 "type": "boolean",
   2407                 "optional": true,
   2408                 "description": "Whether or not the SHIFT key is pressed."
   2409               }
   2410             },
   2411             "description": "The keyboard event to be sent."
   2412           },
   2413           { "type": "function",
   2414             "name": "callback",
   2415             "optional": true,
   2416             "description": "This function is called when the event processing is completed.",
   2417             "parameters": []
   2418           }
   2419         ]
   2420       }
   2421     ],
   2422     "events": []
   2423   },
   2424   {
   2425     "namespace": "experimental.bookmarkManager",
   2426     "nodoc": true,
   2427     "types": [
   2428       {
   2429         "id": "BookmarkNodeDataElement",
   2430         "nodoc": true,
   2431         "type": "object",
   2432         "properties": {
   2433           "id": {
   2434             "type": "string",
   2435             "optional": true,
   2436             "description": "The ID of the bookmark. This is only provided if the data is from the same profile."
   2437           },
   2438           "parentId": {
   2439             "type": "string",
   2440             "optional": true,
   2441             "description": "The ID of the parent of the bookmark. This is only provided if the data is from the same profile."
   2442           },
   2443           "title": {"type": "string"},
   2444           "url": {
   2445             "type": "string",
   2446             "optional": true
   2447           },
   2448           "children": {
   2449             "type": "array",
   2450             "items": {"$ref": "BookmarkNodeDataElement"}
   2451           }
   2452         }
   2453       },
   2454       {
   2455         "id": "BookmarkNodeData",
   2456         "nodoc": true,
   2457         "type": "object",
   2458         "description": "Information about the drag and drop data for use with drag and drop events.",
   2459         "properties": {
   2460           "sameProfile": {"type": "boolean"},
   2461           "elements": {
   2462             "type": "array",
   2463             "items": {"$ref": "BookmarkNodeDataElement"}
   2464           }
   2465         }
   2466       }
   2467     ],
   2468     "functions": [
   2469       {
   2470         "name": "copy",
   2471         "type": "function",
   2472         "description": "Copies the given bookmarks into the clipboard",
   2473         "nodoc": "true",
   2474         "parameters": [
   2475           {
   2476             "name": "idList",
   2477             "description": "An array of string-valued ids",
   2478             "type": "array",
   2479             "items": {"type": "string"},
   2480             "minItems": 1
   2481           },
   2482           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   2483         ]
   2484       },
   2485       {
   2486         "name": "cut",
   2487         "type": "function",
   2488         "description": "Cuts the given bookmarks into the clipboard",
   2489         "nodoc": "true",
   2490         "parameters": [
   2491           {
   2492             "name": "idList",
   2493             "description": "An array of string-valued ids",
   2494             "type": "array",
   2495             "items": {"type": "string"},
   2496             "minItems": 1
   2497           },
   2498           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   2499         ]
   2500       },
   2501       {
   2502         "name": "paste",
   2503         "type": "function",
   2504         "description": "Pastes bookmarks from the clipboard into the parent folder after the last selected node",
   2505         "nodoc": "true",
   2506         "parameters": [
   2507           {"type": "string", "name": "parentId"},
   2508           {
   2509             "name": "selectedIdList",
   2510             "description": "An array of string-valued ids for selected bookmarks",
   2511             "optional": true,
   2512             "type": "array",
   2513             "items": {"type": "string"},
   2514             "minItems": 0
   2515           },
   2516           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   2517         ]
   2518       },
   2519       {
   2520         "name": "canPaste",
   2521         "type": "function",
   2522         "description": "Whether there are any bookmarks that can be pasted",
   2523         "nodoc": "true",
   2524         "parameters": [
   2525           {"type": "string", "name": "parentId", "description": "The ID of the folder to paste into"},
   2526           {"type": "function", "name": "callback", "parameters": [
   2527             {"type": "boolean"}
   2528           ]}
   2529         ]
   2530       },
   2531       {
   2532         "name": "sortChildren",
   2533         "type": "function",
   2534         "description": "Sorts the children of a given folder",
   2535         "nodoc": "true",
   2536         "parameters": [
   2537           {"type": "string", "name": "parentId", "description": "The ID of the folder to sort the children of"}
   2538         ]
   2539       },
   2540       {
   2541         "name": "getStrings",
   2542         "type": "function",
   2543         "description": "Gets the i18n strings for the bookmark manager",
   2544         "nodoc": "true",
   2545         "parameters": [
   2546           {
   2547             "type": "function",
   2548              "name": "callback",
   2549              "parameters": [
   2550               {
   2551                 "type": "object",
   2552                 "properties": {},
   2553                 "additionalProperties": {"type": "string"}
   2554               }
   2555             ]
   2556           }
   2557         ]
   2558       },
   2559       {
   2560         "name": "startDrag",
   2561         "type": "function",
   2562         "description": "Begins dragging a set of bookmarks",
   2563         "nodoc": "true",
   2564         "parameters": [
   2565           {
   2566             "name": "idList",
   2567             "description": "An array of string-valued ids",
   2568             "type": "array",
   2569             "items": {"type": "string"},
   2570             "minItems": 1
   2571           }
   2572         ]
   2573       },
   2574       {
   2575         "name": "drop",
   2576         "type": "function",
   2577         "description": "Performs the drop action of the drag and drop session",
   2578         "nodoc": "true",
   2579         "parameters": [
   2580           {
   2581             "name": "parentId",
   2582             "description": "The ID of the folder that the drop was made",
   2583             "type": "string"
   2584           },
   2585           {
   2586             "name": "index",
   2587             "description": "The index of the position to drop at. If left out the dropped items will be placed at the end of the existing children",
   2588             "type": "integer",
   2589             "minimum": 0,
   2590             "optional": true
   2591           }
   2592         ]
   2593       },
   2594       {
   2595         "name": "getSubtree",
   2596         "type": "function",
   2597         "description": "Retrieves a bookmark hierarchy from the given node.  If the node id is empty, it is the full tree.  If foldersOnly is true, it will only return folders, not actual bookmarks.",
   2598         "nodoc": "true",
   2599         "parameters": [
   2600           {
   2601             "name": "id",
   2602             "type": "string",
   2603             "description": "ID of the root of the tree to pull.  If empty, the entire tree will be returned."
   2604           },
   2605           {
   2606             "name": "foldersOnly",
   2607             "type": "boolean",
   2608             "description": "Pass true to only return folders."
   2609           },
   2610           {
   2611             "name": "callback",
   2612             "type": "function",
   2613             "parameters": [
   2614               {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
   2615             ]
   2616           }
   2617         ]
   2618       }
   2619     ],
   2620     "events": [
   2621       {
   2622         "name": "onDragEnter",
   2623         "type": "function",
   2624         "description": "Fired when dragging bookmarks over the document",
   2625         "parameters": [
   2626           {"$ref": "BookmarkNodeData"}
   2627         ]
   2628       },
   2629       {
   2630         "name": "onDragLeave",
   2631         "type": "function",
   2632         "description": "Fired when the drag and drop leaves the document",
   2633         "parameters": [
   2634           {"$ref": "BookmarkNodeData"}
   2635         ]
   2636       },
   2637       {
   2638         "name": "onDrop",
   2639         "type": "function",
   2640         "description": "Fired when the user drops bookmarks on the document",
   2641         "parameters": [
   2642           {"$ref": "BookmarkNodeData"}
   2643         ]
   2644       }
   2645     ]
   2646   },
   2647   {
   2648     "namespace": "devtools",
   2649     "nodoc": "true",
   2650     "types": [],
   2651     "functions": [
   2652       {
   2653         "name": "getTabEvents",
   2654         "type": "function",
   2655         "description": "Experimental support for timeline API",
   2656         "nodoc": "true",
   2657         "parameters": [
   2658           {
   2659             "name": "tab_id",
   2660             "type": "integer"
   2661           }
   2662         ],
   2663         "returns": {
   2664           "type": "object",
   2665           "properties": {},
   2666           "additionalProperties": { "type": "any" },
   2667           "description": "DevTools tab events object"
   2668         }
   2669       }
   2670     ]
   2671   },
   2672   {
   2673     "namespace": "experimental.processes",
   2674     "types": [
   2675       {
   2676         "id": "Process",
   2677         "type": "object",
   2678         "description": "An object containing information about one of the browser's processes.",
   2679         "properties": {
   2680           "id": {
   2681             "type": "integer",
   2682             "description": "The ID of the process, as provided by the OS."
   2683           },
   2684           "type": {
   2685             "type": "string",
   2686             "enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"],
   2687             "description": "The type of process."
   2688           },
   2689           "cpu": {
   2690             "type": "number",
   2691             "description": "The most recent measurement of the process's CPU usage, between 0 and 100%."
   2692           },
   2693           "network": {
   2694             "type": "number",
   2695             "description": "The most recent measurement of the process's network usage, in bytes per second."
   2696           },
   2697           "privateMemory": {
   2698             "type": "number",
   2699             "description": "The most recent measurement of the process's private memory usage, in bytes."
   2700           },
   2701           "sharedMemory": {
   2702             "type": "number",
   2703             "description": "The most recent measurement of the process's shared memory usage, in bytes."
   2704           }
   2705         }
   2706       }
   2707     ],
   2708     "functions": [
   2709       {
   2710         "name": "getProcessIdForTab",
   2711         "type": "function",
   2712         "description": "Returns the ID of the renderer process for the specified tab.",
   2713         "parameters": [
   2714           {
   2715             "name": "tabId",
   2716             "type": "integer",
   2717             "minimum": 0
   2718           },
   2719           {
   2720             "type": "function",
   2721             "name": "callback",
   2722             "parameters": [
   2723               {
   2724                 "name": "processId",
   2725                 "type": "integer",
   2726                 "description": "Process ID of the tab's renderer process."
   2727               }
   2728             ]
   2729           }
   2730         ]
   2731       }
   2732     ],
   2733     "events": [
   2734       {
   2735         "name": "onUpdated",
   2736         "type": "function",
   2737         "description": "Fires each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID.",
   2738         "parameters": [
   2739           {
   2740             "name": "processes",
   2741             "type": "object",
   2742             "properties": {},
   2743             "additionalProperties": { "$ref": "Process" }
   2744           }
   2745         ]
   2746       }
   2747     ]
   2748   },
   2749   {
   2750     "namespace": "contextMenus",
   2751     "types": [
   2752       {
   2753         "id": "OnClickData",
   2754         "type": "object",
   2755         "description": "Information sent when a context menu item is clicked.",
   2756         "properties": {
   2757           "menuItemId": {
   2758             "type": "integer",
   2759             "description": "The ID of the menu item that was clicked."
   2760           },
   2761           "parentMenuItemId": {
   2762             "type": "integer",
   2763             "optional": true,
   2764             "description": "The parent ID, if any, for the item clicked."
   2765           },
   2766           "mediaType": {
   2767             "type": "string",
   2768             "optional": true,
   2769             "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
   2770           },
   2771           "linkUrl": {
   2772             "type": "string",
   2773             "optional": true,
   2774             "description": "If the element is a link, the URL it points to."
   2775           },
   2776           "srcUrl": {
   2777             "type": "string",
   2778             "optional": true,
   2779             "description": "Will be present for elements with a 'src' URL."
   2780           },
   2781           "pageUrl": {
   2782             "type": "string",
   2783             "description": "The URL of the page where the menu item was clicked."
   2784           },
   2785           "frameUrl": {
   2786             "type": "string",
   2787             "optional": true,
   2788             "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
   2789           },
   2790           "selectionText": {
   2791             "type": "string",
   2792             "optional": true,
   2793             "description": "The text for the context selection, if any."
   2794           },
   2795           "editable": {
   2796             "type": "string",
   2797             "description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
   2798           }
   2799         }
   2800       }
   2801     ],
   2802     "functions": [
   2803       {
   2804         "name": "create",
   2805         "type": "function",
   2806         "description": "Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.extension.lastError).",
   2807         "returns": {
   2808           "type": "integer",
   2809           "description": "The ID of the newly created item."
   2810         },
   2811         "parameters": [
   2812           {
   2813             "type": "object",
   2814             "name": "createProperties",
   2815             "properties": {
   2816               "type": {
   2817                 "type": "string",
   2818                 "enum": ["normal", "checkbox", "radio", "separator"],
   2819                 "optional": true,
   2820                 "description": "The type of menu item. Defaults to 'normal' if not specified."
   2821               },
   2822               "title": {
   2823                 "type": "string",
   2824                 "optional": true,
   2825                 "description": "The text to be displayed in the item; this is <em>required</em> unless <em>type</em> is 'separator'. When the context is 'selection', you can use <code>%s</code> within the string to show the selected text. For example, if this parameter's value is \"Translate '%s' to Pig Latin\" and the user selects the word \"cool\", the context menu item for the selection is \"Translate 'cool' to Pig Latin\"."
   2826               },
   2827               "checked": {
   2828                 "type": "boolean",
   2829                 "optional": true,
   2830                 "description": "The initial state of a checkbox or radio item: true for selected and false for unselected. Only one radio item can be selected at a time in a given group of radio items."
   2831               },
   2832               "contexts": {
   2833                 "type": "array",
   2834                 "items": {
   2835                   "type": "string",
   2836                   "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio"]
   2837                 },
   2838                 "minItems": 1,
   2839                 "optional": true,
   2840                 "description": "List of contexts this menu item will appear in. Defaults to ['page'] if not specified."
   2841               },
   2842               "onclick": {
   2843                 "type": "function",
   2844                 "optional": true,
   2845                 "description": "A function that will be called back when the menu item is clicked.",
   2846                 "parameters": [
   2847                   {
   2848                     "name": "info",
   2849                     "$ref": "OnClickData",
   2850                     "description": "Information about the item clicked and the context where the click happened."
   2851                   },
   2852                   {
   2853                     "name": "tab",
   2854                     "$ref": "Tab",
   2855                     "description": "The details of the tab where the click took place."
   2856                   }
   2857                 ]
   2858               },
   2859               "parentId": {
   2860                 "type": "integer",
   2861                 "optional": true,
   2862                 "description": "The ID of a parent menu item; this makes the item a child of a previously added item."
   2863               },
   2864               "documentUrlPatterns": {
   2865                 "type": "array",
   2866                 "items": {"type": "string"},
   2867                 "optional": true,
   2868                 "description": "Lets you restrict the item to apply only to documents whose URL matches one of the given patterns. (This applies to frames as well.) For details on the format of a pattern, see <a href='match_patterns.html'>Match Patterns</a>."
   2869               },
   2870               "targetUrlPatterns": {
   2871                 "type": "array",
   2872                 "items": {"type": "string"},
   2873                 "optional": true,
   2874                 "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
   2875               }
   2876             }
   2877           },
   2878           {
   2879             "type": "function",
   2880             "name": "callback",
   2881             "optional": true,
   2882             "description": "Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.extension.lastError.",
   2883             "parameters": []
   2884           }
   2885         ]
   2886       },
   2887       {
   2888         "name": "update",
   2889         "type": "function",
   2890         "description": "Update a previously created context menu item.",
   2891         "parameters": [
   2892           {
   2893             "type": "integer",
   2894             "name": "id",
   2895             "description": "The ID of the item to update."
   2896           },
   2897           {
   2898             "type": "object",
   2899             "name": "updateProperties",
   2900             "description": "The properties to update. Accepts the same values as the create function.",
   2901             "properties": {
   2902               "type": {
   2903                 "type": "string",
   2904                 "enum": ["normal", "checkbox", "radio", "separator"],
   2905                 "optional": true
   2906               },
   2907               "title": {
   2908                 "type": "string",
   2909                 "optional": true
   2910               },
   2911               "checked": {
   2912                 "type": "boolean",
   2913                 "optional": true
   2914               },
   2915               "contexts": {
   2916                 "type": "array",
   2917                 "items": {
   2918                   "type": "string",
   2919                   "enum": ["all", "page", "frame", "selection", "link", "editable", "image", "video", "audio"]
   2920                 },
   2921                 "minItems": 1,
   2922                 "optional": true
   2923               },
   2924               "onclick": {
   2925                 "type": "function",
   2926                 "optional": true
   2927               },
   2928               "parentId": {
   2929                 "type": "integer",
   2930                 "optional": true,
   2931                 "description": "Note: You cannot change an item to be a child of one of its own descendants."
   2932               },
   2933               "documentUrlPatterns": {
   2934                 "type": "array",
   2935                 "items": {"type": "string"},
   2936                 "optional": true
   2937               },
   2938               "targetUrlPatterns": {
   2939                 "type": "array",
   2940                 "items": {"type": "string"},
   2941                 "optional": true
   2942               }
   2943             }
   2944           },
   2945           {
   2946             "type": "function",
   2947             "name": "callback",
   2948             "optional": true,
   2949             "parameters": [],
   2950             "description": "Called when the context menu has been updated."
   2951           }
   2952         ]
   2953       },
   2954       {
   2955         "name": "remove",
   2956         "type": "function",
   2957         "description": "Remove a context menu item.",
   2958         "parameters": [
   2959           {
   2960             "type": "integer",
   2961             "name": "menuItemId",
   2962             "description": "The ID of the context menu item to remove."
   2963           },
   2964           {
   2965             "type": "function",
   2966             "name": "callback",
   2967             "optional": true,
   2968             "parameters": [],
   2969             "description": "Called when the context menu has been removed."
   2970           }
   2971         ]
   2972       },
   2973       {
   2974         "name": "removeAll",
   2975         "type": "function",
   2976         "description": "Remove all context menu items added by this extension.",
   2977         "parameters": [
   2978           {
   2979             "type": "function",
   2980             "name": "callback",
   2981             "optional": true,
   2982             "parameters": [],
   2983             "description": "Called when removal is complete."
   2984           }
   2985         ]
   2986       }
   2987     ]
   2988   },
   2989   {
   2990     "namespace": "experimental.metrics",
   2991     "nodoc": true,
   2992     "types": [
   2993       {
   2994         "id": "MetricType",
   2995         "type":  "object",
   2996         "description": "Describes the type of metric that is to be collected.",
   2997         "properties": {
   2998           "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
   2999           "type": {
   3000             "type": "string",
   3001             "enum": ["histogram-log", "histogram-linear"],
   3002             "description": "The type of metric, such as 'histogram-log' or 'histogram-linear'."
   3003           },
   3004           "min": {"type": "integer", "description": "The minimum sample value to be recoded.  Must be greater than zero."},
   3005           "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
   3006           "buckets": {"type": "integer", "description": "The number of buckets to use when separating the recorded values."}
   3007         }
   3008       }
   3009     ],
   3010     "functions": [
   3011       {
   3012         "name": "getEnabled",
   3013         "type": "function",
   3014         "description": "Get the user preference to send UMA and crash reports to Google.",
   3015         "parameters": [
   3016           {
   3017             "type": "function",
   3018             "name": "callback",
   3019             "parameters": [
   3020               {"name": "enabled", "type": "boolean"}
   3021             ]
   3022           }
   3023         ]
   3024       },
   3025       {
   3026         "name": "setEnabled",
   3027         "type": "function",
   3028         "description": "Set the user preference to send UMA and crash reports to Google.",
   3029         "parameters": [
   3030           {"name": "enabled", "type": "boolean", "description": "True for setting Chrome to actively send UMA and crash reports, false for disabling this."},
   3031           {
   3032             "type": "function",
   3033             "name": "callback",
   3034             "parameters": [
   3035               {
   3036                 "name": "enabled", 
   3037                 "type": "boolean",
   3038                 "description": "The actual value set. If it is not the one passed in parameter, the value couldn't be changed (e.g. because of security)."
   3039               }
   3040             ]
   3041           }          
   3042         ]
   3043       },
   3044       {
   3045         "name": "recordUserAction",
   3046         "type": "function",
   3047         "description": "Records an action performed by the user.",
   3048         "parameters": [
   3049           {"name": "name", "type": "string"}
   3050         ]
   3051       },
   3052       {
   3053         "name": "recordPercentage",
   3054         "type": "function",
   3055         "description": "Record a percentage value from 1 to 100.",
   3056         "parameters": [
   3057           {"name": "metricName", "type": "string"},
   3058           {"name": "value", "type": "integer"}
   3059         ]
   3060       },
   3061       {
   3062         "name": "recordCount",
   3063         "type": "function",
   3064         "description": "Record a value than can range from 1 to 1,000,000.",
   3065         "parameters": [
   3066           {"name": "metricName", "type": "string"},
   3067           {"name": "value", "type": "integer"}
   3068         ]
   3069       },
   3070       {
   3071         "name": "recordSmallCount",
   3072         "type": "function",
   3073         "description": "Record a value than can range from 1 to 100.",
   3074         "parameters": [
   3075           {"name": "metricName", "type": "string"},
   3076           {"name": "value", "type": "integer"}
   3077         ]
   3078       },
   3079       {
   3080         "name": "recordMediumCount",
   3081         "type": "function",
   3082         "description": "Record a value than can range from 1 to 10,000.",
   3083         "parameters": [
   3084           {"name": "metricName", "type": "string"},
   3085           {"name": "value", "type": "integer"}
   3086         ]
   3087       },
   3088       {
   3089         "name": "recordTime",
   3090         "type": "function",
   3091         "description": "Record an elapsed time of no more than 10 seconds.  The sample value is specified in milliseconds.",
   3092         "parameters": [
   3093           {"name": "metricName", "type": "string"},
   3094           {"name": "value", "type": "integer"}
   3095         ]
   3096       },
   3097       {
   3098         "name": "recordMediumTime",
   3099         "type": "function",
   3100         "description": "Record an elapsed time of no more than 3 minutes.  The sample value is specified in milliseconds.",
   3101         "parameters": [
   3102           {"name": "metricName", "type": "string"},
   3103           {"name": "value", "type": "integer"}
   3104         ]
   3105       },
   3106       {
   3107         "name": "recordLongTime",
   3108         "type": "function",
   3109         "description": "Record an elapsed time of no more than 1 hour.  The sample value is specified in milliseconds.",
   3110         "parameters": [
   3111           {"name": "metricName", "type": "string"},
   3112           {"name": "value", "type": "integer"}
   3113         ]
   3114       },
   3115       {
   3116         "name": "recordValue",
   3117         "type": "function",
   3118         "unprivileged": true,
   3119         "description": "Adds a value to the given metric.",
   3120         "parameters": [
   3121           {"name": "metric", "$ref": "MetricType"},
   3122           {"name": "value", "type": "integer"}
   3123         ]
   3124       }
   3125     ],
   3126     "events": []
   3127   },
   3128   {
   3129     "namespace": "chromeosInfoPrivate",
   3130     "nodoc": "true",
   3131     "functions": [
   3132       {
   3133         "name": "get",
   3134         "description": "Fetches customization values for the given property names. See property names in the declaration of the returned dictionary.",
   3135         "type": "function",
   3136         "parameters": [
   3137           {
   3138             "name": "propertyNames",
   3139             "type": "array",
   3140             "item": {"type": "string", "description": "Chrome OS Property name"}
   3141           },
   3142           {
   3143             "name": "callback",
   3144             "type": "function",
   3145             "parameters": [
   3146               {
   3147                 "name": "propertiesDictionary",
   3148                 "type": "object",
   3149                 "description": "Dictionary which contains all requested properties",
   3150                 "properties": {
   3151                   "hwid": {"type": "string", "optional": "true", "description": "Hardware ID"},
   3152                   "homeProvider" : {"type": "string", "optional": "true", "description": "Home provider which is used by the cellular device"}
   3153                 }
   3154               }
   3155             ]
   3156           }
   3157         ]
   3158       }
   3159     ]
   3160   },
   3161   {
   3162     "namespace": "cookies",
   3163     "types": [
   3164       {
   3165         "id": "Cookie",
   3166         "type": "object",
   3167         "description": "Represents information about an HTTP cookie.",
   3168         "properties": {
   3169           "name": {"type": "string", "description": "The name of the cookie."},
   3170           "value": {"type": "string", "description": "The value of the cookie."},
   3171           "domain": {"type": "string", "description": "The domain of the cookie (e.g. \"www.google.com\", \"example.com\")."},
   3172           "hostOnly": {"type": "boolean", "description": "True if the cookie is a host-only cookie (i.e. a request's host must exactly match the domain of the cookie)."},
   3173           "path": {"type": "string", "description": "The path of the cookie."},
   3174           "secure": {"type": "boolean", "description": "True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS)."},
   3175           "httpOnly": {"type": "boolean", "description": "True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts)."},
   3176           "session": {"type": "boolean", "description": "True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date."},
   3177           "expirationDate": {"type": "number", "optional": true, "description": "The expiration date of the cookie as the number of seconds since the UNIX epoch. Not provided for session cookies."},
   3178           "storeId": {"type": "string", "description": "The ID of the cookie store containing this cookie, as provided in getAllCookieStores()."}
   3179         }
   3180       },
   3181       {
   3182         "id": "CookieStore",
   3183         "type": "object",
   3184         "description": "Represents a cookie store in the browser. An incognito mode window, for instance, uses a separate cookie store from a non-incognito window.",
   3185         "properties": {
   3186           "id": {"type": "string", "description": "The unique identifier for the cookie store."},
   3187           "tabIds": {"type": "array", "items": {"type": "integer"}, "description": "Identifiers of all the browser tabs that share this cookie store."}
   3188         }
   3189       }
   3190     ],
   3191     "functions": [
   3192       {
   3193         "name": "get",
   3194         "type": "function",
   3195         "description": "Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.",
   3196         "parameters": [
   3197           {
   3198             "type": "object",
   3199             "name": "details",
   3200             "description": "Details to identify the cookie being retrieved.",
   3201             "properties": {
   3202               "url": {"type": "string", "description": "The URL with which the cookie to retrieve is associated. This argument may be a full URL, in which case any data following the URL path (e.g. the query string) is simply ignored. If host permissions for this URL are not specified in the manifest file, the API call will fail."},
   3203               "name": {"type": "string", "description": "The name of the cookie to retrieve."},
   3204               "storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store in which to look for the cookie. By default, the current execution context's cookie store will be used."}
   3205             }
   3206           },
   3207           {
   3208             "type": "function",
   3209             "name": "callback",
   3210             "parameters": [
   3211               {
   3212                 "name": "cookie", "$ref": "Cookie", "optional": true, "description": "Contains details about the cookie. This parameter is null if no such cookie was found."
   3213               }
   3214             ]
   3215           }
   3216         ]
   3217       },
   3218       {
   3219         "name": "getAll",
   3220         "type": "function",
   3221         "description": "Retrieves all cookies from a single cookie store that match the given information.  The cookies returned will be sorted, with those with the longest path first.  If multiple cookies have the same path length, those with the earliest creation time will be first.",
   3222         "parameters": [
   3223           {
   3224             "type": "object",
   3225             "name": "details",
   3226             "description": "Information to filter the cookies being retrieved.",
   3227             "properties": {
   3228               "url": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those that would match the given URL."},
   3229               "name": {"type": "string", "optional": true, "description": "Filters the cookies by name."},
   3230               "domain": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those whose domains match or are subdomains of this one."},
   3231               "path": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those whose path exactly matches this string."},
   3232               "secure": {"type": "boolean", "optional": true, "description": "Filters the cookies by their Secure property."},
   3233               "session": {"type": "boolean", "optional": true, "description": "Filters out session vs. persistent cookies."},
   3234               "storeId": {"type": "string", "optional": true, "description": "The cookie store to retrieve cookies from. If omitted, the current execution context's cookie store will be used."}
   3235             }
   3236           },
   3237           {
   3238             "type": "function",
   3239             "name": "callback",
   3240             "parameters": [
   3241               {
   3242                 "name": "cookies", "type": "array", "items": {"$ref": "Cookie"}, "description": "All the existing, unexpired cookies that match the given cookie info."
   3243               }
   3244             ]
   3245           }
   3246         ]
   3247       },
   3248       {
   3249         "name": "set",
   3250         "type": "function",
   3251         "description": "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.",
   3252         "parameters": [
   3253           {
   3254             "type": "object",
   3255             "name": "details",
   3256             "description": "Details about the cookie being set.",
   3257             "properties": {
   3258               "url": {"type": "string", "description": "The request-URI to associate with the setting of the cookie. This value can affect the default domain and path values of the created cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail."},
   3259               "name": {"type": "string", "optional": true, "description": "The name of the cookie. Empty by default if omitted."},
   3260               "value": {"type": "string", "optional": true, "description": "The value of the cookie. Empty by default if omitted."},
   3261               "domain": {"type": "string", "optional": true, "description": "The domain of the cookie. If omitted, the cookie becomes a host-only cookie."},
   3262               "path": {"type": "string", "optional": true, "description": "The path of the cookie. Defaults to the path portion of the url parameter."},
   3263               "secure": {"type": "boolean", "optional": true, "description": "Whether the cookie should be marked as Secure. Defaults to false."},
   3264               "httpOnly": {"type": "boolean", "optional": true, "description": "Whether the cookie should be marked as HttpOnly. Defaults to false."},
   3265               "expirationDate": {"type": "number", "optional": true, "description": "The expiration date of the cookie as the number of seconds since the UNIX epoch. If omitted, the cookie becomes a session cookie."},
   3266               "storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store in which to set the cookie. By default, the cookie is set in the current execution context's cookie store."}
   3267             }
   3268           },
   3269           {
   3270             "type": "function",
   3271             "name": "callback",
   3272             "optional": true,
   3273             "min_version": "11.0.674.0",
   3274             "parameters": [
   3275               {
   3276                 "name": "cookie", "$ref": "Cookie", "optional": true, "description": "Contains details about the cookie that's been set.  If setting failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set."
   3277               }
   3278             ]
   3279           }
   3280         ]
   3281       },
   3282       {
   3283         "name": "remove",
   3284         "type": "function",
   3285         "description": "Deletes a cookie by name.",
   3286         "parameters": [
   3287           {
   3288             "type": "object",
   3289             "name": "details",
   3290             "description": "Information to identify the cookie to remove.",
   3291             "properties": {
   3292               "url": {"type": "string", "description": "The URL associated with the cookie. If host permissions for this URL are not specified in the manifest file, the API call will fail."},
   3293               "name": {"type": "string", "description": "The name of the cookie to remove."},
   3294               "storeId": {"type": "string", "optional": true, "description": "The ID of the cookie store to look in for the cookie. If unspecified, the cookie is looked for by default in the current execution context's cookie store."}
   3295             }
   3296           },
   3297           {
   3298             "type": "function",
   3299             "name": "callback",
   3300             "optional": true,
   3301             "min_version": "11.0.674.0",
   3302             "parameters": [
   3303               {
   3304                 "name": "details",
   3305                 "type": "object",
   3306                 "description": "Contains details about the cookie that's been removed.  If removal failed for any reason, this will be \"null\", and \"chrome.extension.lastError\" will be set.",
   3307                 "optional": true,
   3308                 "properties": {
   3309                   "url": {"type": "string", "description": "The URL associated with the cookie that's been removed."},
   3310                   "name": {"type": "string", "description": "The name of the cookie that's been removed."},
   3311                   "storeId": {"type": "string", "description": "The ID of the cookie store from which the cookie was removed."}
   3312                 }
   3313               }
   3314             ]
   3315           }
   3316         ]
   3317       },
   3318       {
   3319         "name": "getAllCookieStores",
   3320         "type": "function",
   3321         "description": "Lists all existing cookie stores.",
   3322         "parameters": [
   3323           {
   3324             "type": "function",
   3325             "name": "callback",
   3326             "parameters": [
   3327               {
   3328                 "name": "cookieStores", "type": "array", "items": {"$ref": "CookieStore"}, "description": "All the existing cookie stores."
   3329               }
   3330             ]
   3331           }
   3332         ]
   3333       }
   3334     ],
   3335     "events": [
   3336       {
   3337         "name": "onChanged",
   3338         "type": "function",
   3339         "description": "Fired when a cookie is set or removed. As a special case, note that updating a cookie's properties is implemented as a two step process: the cookie to be updated is first removed entirely, generating a notification with \"cause\" of \"overwrite\" .  Afterwards, a new cookie is written with the updated values, generating a second notification with \"cause\" \"explicit\".",
   3340         "parameters": [
   3341           {
   3342             "type": "object",
   3343             "name": "changeInfo",
   3344             "properties": {
   3345               "removed": {"type": "boolean", "description": "True if a cookie was removed."},
   3346               "cookie": {"$ref": "Cookie", "description": "Information about the cookie that was set or removed."},
   3347               "cause": {"min_version": "12.0.707.0", "type": "string", "enum": ["evicted", "expired", "explicit", "expired_overwrite", "overwrite"], "description": "The underlying reason behind the cookie's change. If a cookie was inserted, or removed via an explicit call to \"chrome.cookies.remove\", \"cause\" will be \"explicit\". If a cookie was automatically removed due to expiry, \"cause\" will be \"expired\". If a cookie was removed due to being overwritten with an already-expired expiration date, \"cause\" will be set to \"expired_overwrite\".  If a cookie was automatically removed due to garbage collection, \"cause\" will be \"evicted\".  If a cookie was automatically removed due to a \"set\" call that overwrote it, \"cause\" will be \"overwrite\". Plan your response accordingly."}
   3348             }
   3349           }
   3350         ]
   3351       }
   3352     ]
   3353   },
   3354   {
   3355     "namespace": "experimental.rlz",
   3356     "nodoc": true,
   3357     "types": [],
   3358     "functions": [
   3359       {
   3360         "name": "recordProductEvent",
   3361         "type": "function",
   3362         "description": "Records an RLZ event for a given product's access point.",
   3363         "parameters": [
   3364           {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
   3365           {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
   3366           {"name": "event", "type": "string", "enum": ["install", "set-to-google", "first-search", "activate"]}
   3367         ]
   3368       },
   3369       {
   3370         "name": "getAccessPointRlz",
   3371         "type": "function",
   3372         "description": "Gets the RLZ string to be used when accessing a Google property through the given access point.",
   3373         "parameters": [
   3374           {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
   3375           {"name": "callback", "type": "function", "parameters": [{"name": "rlz", "type": "string"}]}
   3376         ]
   3377       },
   3378       {
   3379         "name": "sendFinancialPing",
   3380         "type": "function",
   3381         "description": "Sends Google promotional information about this extension.",
   3382         "parameters": [
   3383           {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
   3384           {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1},
   3385           {"name": "signature", "type": "string"},
   3386           {"name": "brand", "type": "string"},
   3387           {"name": "id", "type": "string"},
   3388           {"name": "lang", "type": "string"},
   3389           {"name": "exclude_machine_id", "type": "boolean"},
   3390           {"name": "callback", "type": "function", "optional": true, "parameters": [{"name": "sent", "type": "boolean"}]}
   3391         ]
   3392       },
   3393       {
   3394         "name": "clearProductState",
   3395         "type": "function",
   3396         "description": "Clears all product-specific RLZ state from the machine, as well as clearing all events for the specified access points.",
   3397         "parameters": [
   3398           {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
   3399           {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1}
   3400         ]
   3401       }
   3402     ],
   3403     "events": []
   3404   },
   3405   {
   3406     "namespace": "experimental.webNavigation",
   3407     "types": [],
   3408     "functions": [],
   3409     "events": [
   3410       {
   3411         "name": "onBeforeNavigate",
   3412         "type": "function",
   3413         "description": "Fires when a navigation is about to occur.",
   3414         "parameters": [
   3415           {
   3416             "type": "object",
   3417             "name": "details",
   3418             "properties": {
   3419               "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation is about to occur."},
   3420               "url": {"type": "string"},
   3421               "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe. Frame IDs are unique within a tab."},
   3422               "requestId": {"type": "string", "description": "The ID of the request to retrieve the document of this navigation. Note that this event is fired prior to the corresponding chrome.experimental.webRequest.onBeforeRequest."},
   3423               "timeStamp": {"type": "number", "description": "The time when the browser was about to start the navigation, in milliseconds since the epoch."}
   3424             }
   3425           }
   3426         ]
   3427       },
   3428       {
   3429         "name": "onCommitted",
   3430         "type": "function",
   3431         "description": "Fires when a navigation is committed. The document (and the resources it refers to, such as images and subframes) might still be downloading, but at least part of the document has been received from the server and the browser has decided to switch to the new document.",
   3432         "parameters": [
   3433           {
   3434             "type": "object",
   3435             "name": "details",
   3436             "properties": {
   3437               "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
   3438               "url": {"type": "string"},
   3439               "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
   3440               "transitionType": {"type": "string", "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"], "description": "Cause of the navigation. The same transition types as defined in the history API are used."},
   3441               "transitionQualifiers": {"type": "array", "description": "A list of transition qualifiers.", "items:": {"type": "string", "enum": ["client_redirect", "server_redirect", "forward_back"]}},
   3442               "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
   3443             }
   3444           }
   3445         ]
   3446       },
   3447       {
   3448         "name": "onDOMContentLoaded",
   3449         "type": "function",
   3450         "description": "Fires when the page's DOM is fully constructed, but the referenced resources may not finish loading.",
   3451         "parameters": [
   3452           {
   3453             "type": "object",
   3454             "name": "details",
   3455             "properties": {
   3456               "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
   3457               "url": {"type": "string"},
   3458               "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
   3459               "timeStamp": {"type": "number", "description": "The time when the page's DOM was fully constructed, in milliseconds since the epoch."}
   3460             }
   3461           }
   3462         ]
   3463       },
   3464       {
   3465         "name": "onCompleted",
   3466         "type": "function",
   3467         "description": "Fires when a document, including the resources it refers to, is completely loaded and initialized.",
   3468         "parameters": [
   3469           {
   3470             "type": "object",
   3471             "name": "details",
   3472             "properties": {
   3473               "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
   3474               "url": {"type": "string"},
   3475               "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
   3476               "timeStamp": {"type": "number", "description": "The time when the document finished loading, in milliseconds since the epoch."}
   3477             }
   3478           }
   3479         ]
   3480       },
   3481       {
   3482         "name": "onErrorOccurred",
   3483         "type": "function",
   3484         "description": "Fires when an error occurs.",
   3485         "parameters": [
   3486           {
   3487             "type": "object",
   3488             "name": "details",
   3489             "properties": {
   3490               "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
   3491               "url": {"type": "string"},
   3492               "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
   3493               "error": {"type": "string", "description": "The error description."},
   3494               "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
   3495             }
   3496           }
   3497         ]
   3498       },
   3499       {
   3500         "name": "onBeforeRetarget",
   3501         "type": "function",
   3502         "description": "Fires when a new window, or a new tab in an existing window, is about to be created to host a navigation.",
   3503         "parameters": [
   3504           {
   3505             "type": "object",
   3506             "name": "details",
   3507             "properties": {
   3508               "sourceTabId": {"type": "integer", "description": "The ID of the tab in which the navigation is triggered."},
   3509               "sourceUrl": {"type": "string", "description": "The URL of the document that is opening the new window."},
   3510               "url": {"type": "string", "description": "The URL to be opened in the new window."},
   3511               "timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."}
   3512             }
   3513           }
   3514         ]
   3515       }
   3516     ]
   3517   },
   3518   {
   3519     "namespace": "experimental.webRequest",
   3520     "types": [
   3521       {
   3522         "id": "RequestFilter",
   3523         "type": "object",
   3524         "description": "An object describing filters to apply to webRequest events.",
   3525         "properties": {
   3526           "urls": {
   3527             "type": "array",
   3528             "optional": true,
   3529             "description": "A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out.",
   3530             "items": { "type": "string" }
   3531           },
   3532           "types": {
   3533             "type": "array",
   3534             "optional": true,
   3535             "description": "A list of request types. Requests that cannot match any of the types will be filtered out.",
   3536             "items": { "type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "other"] }
   3537           },
   3538           "tabId": { "type": "integer", "optional": true },
   3539           "windowId": { "type": "integer", "optional": true }
   3540         }
   3541       },
   3542       {
   3543         "id": "BlockingResponse",
   3544         "type": "object",
   3545         "description": "Return value for event handlers that have the 'blocking' extraInfoSpec applied. Allows the event handler to modify network requests.",
   3546         "properties": {
   3547           "cancel": {
   3548             "type": "boolean",
   3549             "optional": true,
   3550             "description": "If true, the request is cancelled. Used in onBeforeRequest, this prevents the request from being sent."
   3551           },
   3552           "redirectUrl": {
   3553             "type": "string",
   3554             "optional": true,
   3555             "description": "If set, the original request is prevented from being sent and is instead redirected to the given URL."
   3556           }
   3557         }
   3558       }
   3559     ],
   3560     "functions": [
   3561       {
   3562         "name": "addEventListener",
   3563         "nodoc": true,
   3564         "type": "function",
   3565         "description": "Used internally to implement the special form of addListener for the webRequest events.",
   3566         "parameters": [
   3567           {"type": "function", "name": "callback"},
   3568           {
   3569             "$ref": "RequestFilter",
   3570             "optional": true,
   3571             "name": "filter",
   3572             "description": "A set of filters that restricts the events that will be sent to this listener."
   3573           },
   3574           {
   3575             "type": "array",
   3576             "optional": true,
   3577             "name": "extraInfoSpec",
   3578             "description": "Array of extra information that should be passed to the listener function.",
   3579             "items": {
   3580               "type": "string",
   3581               "enum": ["requestLine", "requestHeaders", "statusLine", "responseHeaders", "redirectRequestLine", "redirectRequestHeaders", "blocking"]
   3582             }
   3583           },
   3584           {"type": "string", "name": "eventName"},
   3585           {"type": "string", "name": "subEventName"}
   3586         ]
   3587       },
   3588       {
   3589         "name": "eventHandled",
   3590         "nodoc": true,
   3591         "type": "function",
   3592         "description": "Used internally to send a response for a blocked event.",
   3593         "parameters": [
   3594           {"type": "string", "name": "eventName"},
   3595           {"type": "string", "name": "subEventName"},
   3596           {"type": "string", "name": "requestId"},
   3597           {
   3598             "$ref": "BlockingResponse",
   3599             "optional": true,
   3600             "name": "response"
   3601           }
   3602         ]
   3603       }
   3604     ],
   3605     "events": [
   3606       {
   3607         "name": "onBeforeRequest",
   3608         "type": "function",
   3609         "description": "Fires when a request is about to occur.",
   3610         "parameters": [
   3611           {
   3612             "type": "object",
   3613             "name": "details",
   3614             "properties": {
   3615               "requestId": {"type": "string", "description": "The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."},
   3616               "url": {"type": "string"},
   3617               "method": {"type": "string", "description": "Standard HTTP method."},
   3618               "tabId": {"type": "integer", "description": "The ID of the tab in which the request takes place. Set to null if the request isn't related to a tab."},
   3619               "type": {"type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "other"], "description": "How the requested resource will be used."},
   3620               "timeStamp": {"type": "number", "description": "The time when the browser was about to make the request, in milliseconds since the epoch."}
   3621             }
   3622           }
   3623         ]
   3624       },
   3625       {
   3626         "name": "onBeforeSendHeaders",
   3627         "type": "function",
   3628         "description": "Fires before sending an HTTP request, once the request headers are available.",
   3629         "parameters": [
   3630           {
   3631             "type": "object",
   3632             "name": "details",
   3633             "properties": {
   3634               "requestId": {"type": "string", "description": "The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request."},
   3635               "url": {"type": "string"},
   3636               "timeStamp": {"type": "number", "description": "The time when the browser was about to send headers, in milliseconds since the epoch."}
   3637             }
   3638           }
   3639         ]
   3640       },
   3641       {
   3642         "name": "onRequestSent",
   3643         "type": "function",
   3644         "description": "Fires when a request is sent to the server.",
   3645         "parameters": [
   3646           {
   3647             "type": "object",
   3648             "name": "details",
   3649             "properties": {
   3650               "requestId": {"type": "string", "description": "The ID of the request."},
   3651               "url": {"type": "string"},
   3652               "ip": {"type": "string", "description": "The server IP address that is actually connected to. Note that it may be a literal IPv6 address."},
   3653               "timeStamp": {"type": "number", "description": "The time when the browser finished sending the request, in milliseconds since the epoch."}
   3654             }
   3655           }
   3656         ]
   3657       },
   3658       {
   3659         "name": "onHeadersReceived",
   3660         "type": "function",
   3661         "description": "Fires when the status line and response headers are received after a request is sent to the server.",
   3662         "parameters": [
   3663           {
   3664             "type": "object",
   3665             "name": "details",
   3666             "properties": {
   3667               "requestId": {"type": "string", "description": "The ID of the request."},
   3668               "url": {"type": "string"},
   3669               "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
   3670               "timeStamp": {"type": "number", "description": "The time when the status line and response headers were received, in milliseconds since the epoch."}
   3671             }
   3672           }
   3673         ]
   3674       },
   3675       {
   3676         "name": "onBeforeRedirect",
   3677         "type": "function",
   3678         "description": "Fires when a server initiated redirect is about to occur.",
   3679         "parameters": [
   3680           {
   3681             "type": "object",
   3682             "name": "details",
   3683             "properties": {
   3684               "requestId": {"type": "string", "description": "The ID of the request."},
   3685               "url": {"type": "string", "description": "The URL of the current request."},
   3686               "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
   3687               "redirectUrl": {"type": "string", "description": "The new URL."},
   3688               "timeStamp": {"type": "number", "description": "The time when the browser was about to make the redirect, in milliseconds since the epoch."}
   3689             }
   3690           }
   3691         ]
   3692       },
   3693       {
   3694         "name": "onCompleted",
   3695         "type": "function",
   3696         "description": "Fires when a request is completed.",
   3697         "parameters": [
   3698           {
   3699             "type": "object",
   3700             "name": "details",
   3701             "properties": {
   3702               "requestId": {"type": "string", "description": "The ID of the request."},
   3703               "url": {"type": "string", "description": "The URL of the current request."},
   3704               "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
   3705               "timeStamp": {"type": "number", "description": "The time when the response was received completely, in milliseconds since the epoch."}
   3706             }
   3707           }
   3708         ]
   3709       },
   3710       {
   3711         "name": "onErrorOccurred",
   3712         "type": "function",
   3713         "description": "Fires when an error occurs.",
   3714         "parameters": [
   3715           {
   3716             "type": "object",
   3717             "name": "details",
   3718             "properties": {
   3719               "requestId": {"type": "string", "description": "The ID of the request."},
   3720               "url": {"type": "string", "description": "The URL of the current request."},
   3721               "error": {"type": "string", "description": "The error description."},
   3722               "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
   3723             }
   3724           }
   3725         ]
   3726       }
   3727     ]
   3728   },
   3729   {
   3730     "namespace": "test",
   3731     "nodoc": true,
   3732     "types": [],
   3733     "functions": [
   3734       {
   3735         "name": "getConfig",
   3736         "type": "function",
   3737         "description": "Gives configuration options set by the test.",
   3738         "parameters": [
   3739           {
   3740             "type": "function", "name": "callback", "parameters": [
   3741               {
   3742                 "type": "object",
   3743                 "name": "testConfig",
   3744                 "properties": {
   3745                   "testServer": {
   3746                     "type": "object",
   3747                     "optional": true,
   3748                     "description": "Details on the test server used to mock network responses.  Will be set only if test calls ExtensionApiTest::StartTestServer().",
   3749                     "properties": {
   3750                       "port": {
   3751                         "type": "integer",
   3752                         "description": "The port on which the test server is listening.",
   3753                         "minimum": 1024,
   3754                         "maximum": 65535
   3755                       }
   3756                     }
   3757                   }
   3758                 }
   3759               }
   3760             ]
   3761           }
   3762         ]
   3763       },
   3764       {
   3765         "name": "notifyFail",
   3766         "type": "function",
   3767         "description": "Notify the browser process that test code running in the extension failed.  This is only used for internal unit testing.",
   3768         "parameters": [
   3769           {"type": "string", "name": "message"}
   3770         ]
   3771       },
   3772       {
   3773         "name": "notifyPass",
   3774         "type": "function",
   3775         "description": "Notify the browser process that test code running in the extension passed.  This is only used for internal unit testing.",
   3776         "parameters": [
   3777           {"type": "string", "name": "message", "optional": true}
   3778         ]
   3779       },
   3780       {
   3781         "name": "resetQuota",
   3782         "type": "function",
   3783         "description": "Reset all accumulated quota state for all extensions.  This is only used for internal unit testing.",
   3784         "parameters": []
   3785       },
   3786       {
   3787         "name": "log",
   3788         "type": "function",
   3789         "description": "Logs a message during internal unit testing.",
   3790         "parameters": [
   3791           {"type": "string", "name": "message"}
   3792         ]
   3793       },
   3794       {
   3795         "name": "createIncognitoTab",
   3796         "type": "function",
   3797         "description": "Creates an incognito tab during internal testing. Succeeds even if the extension is not enabled in incognito mode.",
   3798         "parameters": [
   3799           {"type": "string", "name": "url"}
   3800         ]
   3801       },
   3802       {
   3803         "name": "sendMessage",
   3804         "type": "function",
   3805         "description": "Sends a string message to the browser process, generating a Notification that C++ test code can wait for.",
   3806         "parameters": [
   3807           {"type": "string", "name": "message"},
   3808           {
   3809             "type": "function",
   3810             "name": "callback",
   3811             "optional": true,
   3812             "parameters": [
   3813               {"type": "string", "name": "response"}
   3814             ]
   3815           }
   3816         ]
   3817       }
   3818     ],
   3819     "events": [
   3820       {
   3821         "name": "onMessage",
   3822         "type": "function",
   3823         "unprivileged": true,
   3824         "description": "Used to test sending messages to extensions.",
   3825         "parameters": [
   3826           {
   3827             "type": "object",
   3828             "name": "info",
   3829             "properties": {
   3830               "data": { "type": "string", "description": "Additional information." },
   3831               "lastMessage": { "type": "boolean", "description": "True if this was the last message for this test" }
   3832             }
   3833           }
   3834         ]
   3835       }
   3836     ]
   3837   },
   3838   {
   3839     "namespace": "experimental.proxy",
   3840     "types": [
   3841       {
   3842         "id": "ProxyServer",
   3843         "type": "object",
   3844         "description": "An object encapsulating a single proxy server's specification.",
   3845         "properties": {
   3846           "scheme": {"type": "string", "optional": true, "enum": ["http", "https", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself. Defaults to 'http'."},
   3847           "host": {"type": "string", "description": "The URI of the proxy server. This must be an ASCII hostname (in Punycode format). IDNA is not supported, yet."},
   3848           "port": {"type": "integer", "optional": true, "description": "The port of the proxy server. Defaults to a port that depends on the scheme."}
   3849         }
   3850       },
   3851       {
   3852         "id": "ProxyRules",
   3853         "type": "object",
   3854         "description": "An object encapsulating the set of proxy rules for all protocols. Use either 'singleProxy' or (a subset of) 'proxyForHttp', 'proxyForHttps', 'proxyForFtp' and 'fallbackProxy'.",
   3855         "properties": {
   3856           "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (that is http, https, and ftp)."},
   3857           "proxyForHttp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTP requests."},
   3858           "proxyForHttps": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTPS requests."},
   3859           "proxyForFtp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for FTP requests."},
   3860           "fallbackProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for everthing else or if any of the specific proxyFor... is not specified."},
   3861           "bypassList": {"type": "array", "items": {"type": "string"}, "optional": true, "description": "List of servers to connect to without a proxy server."}
   3862         }
   3863       },
   3864       {
   3865         "id": "PacScript",
   3866         "type": "object",
   3867         "description": "An object holding proxy auto-config information. Exactly one of the fields should be non-empty.",
   3868         "properties": {
   3869           "url": {"type": "string", "optional": true, "description": "URL of the PAC file to be used."},
   3870           "data": {"type": "string", "optional": true, "description": "A PAC script."}
   3871         }
   3872       },
   3873       {
   3874         "id": "ProxyConfig",
   3875         "type": "object",
   3876         "description": "An object encapsulating a complete proxy configuration.",
   3877         "properties": {
   3878           "rules": {"$ref": "ProxyRules", "optional": true, "description": "The proxy rules describing this configuration. Use this for 'fixed_servers' mode."},
   3879           "pacScript": {"$ref": "PacScript", "optional": true, "description": "The proxy auto-config (PAC) script for this configuration. Use this for 'pac_script' mode."},
   3880           "mode": {
   3881             "type": "string",
   3882             "enum": ["direct", "auto_detect", "pac_script", "fixed_servers", "system"],
   3883             "description": "'direct' = Never use a proxy<br>'auto_detect' = Auto detect proxy settings<br>'pac_script' = Use specified PAC script<br>'fixed_servers' = Manually specify proxy servers<br>'system' = Use system proxy settings"
   3884           }
   3885         }
   3886       }
   3887     ],
   3888     "properties": {
   3889       "settings": {
   3890         "$ref": "Preference",
   3891         "description": "Proxy settings to be used. The value of this preference is a ProxyConfig object.",
   3892         "value": [
   3893           "proxy",
   3894           {"$ref": "ProxyConfig"}
   3895         ]
   3896       }
   3897     },
   3898     "events": [
   3899       {
   3900         "name": "onProxyError",
   3901         "type": "function",
   3902         "description": "Notifies about proxy errors.",
   3903         "parameters": [
   3904           {
   3905             "type": "object",
   3906             "name": "details",
   3907             "properties": {
   3908               "fatal": {
   3909                 "type": "boolean",
   3910                 "description": "If true, the error was fatal and the network transaction was aborted. Otherwise, a direct connection is used instead."
   3911               },
   3912               "error": {
   3913                 "type": "string",
   3914                 "description": "The error description."
   3915               },
   3916               "details": {
   3917                 "type": "string",
   3918                 "description": "Additional details about the error such as a JavaScript runtime error."
   3919               }
   3920             }
   3921           }
   3922         ]
   3923       }
   3924     ]
   3925   },
   3926   {
   3927     "namespace": "experimental.clipboard",
   3928     "types": [],
   3929     "functions": [
   3930       {
   3931         "name": "executeCopy",
   3932         "type": "function",
   3933         "description": "Triggers a copy operation in the specified tab.",
   3934         "parameters": [
   3935           {"type": "integer", "name": "tabId", "minimum": 0},
   3936           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   3937         ]
   3938       },
   3939       {
   3940         "name": "executeCut",
   3941         "type": "function",
   3942         "description": "Triggers a cut operation in the specified tab.",
   3943         "parameters": [
   3944           {"type": "integer", "name": "tabId", "minimum": 0},
   3945           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   3946         ]
   3947       },
   3948       {
   3949         "name": "executePaste",
   3950         "type": "function",
   3951         "description": "Triggers a paste operation in the specified tab.",
   3952         "parameters": [
   3953           {"type": "integer", "name": "tabId", "minimum": 0},
   3954           {"type": "function", "name": "callback", "optional": true, "parameters": []}
   3955         ]
   3956       }
   3957     ],
   3958     "events": []
   3959   },
   3960   {
   3961     "namespace": "experimental.sidebar",
   3962     "types": [],
   3963     "functions": [
   3964       {
   3965         "name": "hide",
   3966         "type": "function",
   3967         "description": "Hides sidebar's mini tab for the specified tab and collapses sidebar if it was in 'active' state (see getState). Has no effect if the sidebar is already hidden.",
   3968         "parameters": [
   3969           {
   3970             "type": "object",
   3971             "name": "details",
   3972             "optional": true,
   3973             "properties": {
   3974               "tabId": {
   3975                 "type": "integer",
   3976                 "minimum": 0,
   3977                 "optional": true,
   3978                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   3979               }
   3980             }
   3981           }
   3982         ]
   3983       },
   3984       {
   3985         "name": "show",
   3986         "type": "function",
   3987         "description": "Shows sidebar mini tab (in 'shown' state) for the specified tab. Has no effect if already expanded, otherwise changes status to 'shown'.",
   3988         "parameters": [
   3989           {
   3990             "type": "object",
   3991             "name": "details",
   3992             "optional": true,
   3993             "properties": {
   3994               "tabId": {
   3995                 "type": "integer",
   3996                 "minimum": 0,
   3997                 "optional": true,
   3998                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   3999               }
   4000             }
   4001           }
   4002         ]
   4003       },
   4004       {
   4005         "name": "expand",
   4006         "type": "function",
   4007         "description": "Expands sidebar and switches to the specified content (if it was displaying another extension's sidebar content) for the specified tab. Extension is allowed to expand sidebar only in response to an explicit user gesture.",
   4008         "parameters": [
   4009           {
   4010             "type": "object",
   4011             "name": "details",
   4012             "optional": true,
   4013             "properties": {
   4014               "tabId": {
   4015                 "type": "integer",
   4016                 "minimum": 0,
   4017                 "optional": true,
   4018                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4019               }
   4020             }
   4021           }
   4022         ]
   4023       },
   4024       {
   4025         "name": "collapse",
   4026         "type": "function",
   4027         "description": "Collapses sidebar for the specified tab. Has no effect if sidebar is not in its 'active' state (see getState).",
   4028         "parameters": [
   4029           {
   4030             "type": "object",
   4031             "name": "details",
   4032             "optional": true,
   4033             "properties": {
   4034               "tabId": {
   4035                 "type": "integer",
   4036                 "minimum": 0,
   4037                 "optional": true,
   4038                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4039               }
   4040             }
   4041           }
   4042         ]
   4043       },
   4044       {
   4045         "name": "navigate",
   4046         "type": "function",
   4047         "description": "Loads the the specified html file into the sidebar for the specified tab.",
   4048         "parameters": [
   4049           {
   4050             "type": "object",
   4051             "name": "details",
   4052             "properties": {
   4053               "tabId": {
   4054                 "type": "integer",
   4055                 "minimum": 0,
   4056                 "optional": true,
   4057                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4058               },
   4059               "path": {
   4060                 "type": "string",
   4061                 "description": "Relative path to the html file in the extension to show in the sidebar."
   4062               }
   4063             }
   4064           }
   4065         ]
   4066       },
   4067       {
   4068         "name": "getState",
   4069         "type": "function",
   4070         "description": "Returns current sidebar state for the specified tab.",
   4071         "parameters": [
   4072           {
   4073             "type": "object",
   4074             "name": "details",
   4075             "optional": true,
   4076             "properties": {
   4077               "tabId": {
   4078                 "type": "integer",
   4079                 "minimum": 0,
   4080                 "optional": true,
   4081                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4082               }
   4083             }
   4084           },
   4085           {
   4086             "type": "function",
   4087             "name": "callback",
   4088             "parameters": [
   4089               {
   4090                 "name": "state",
   4091                 "type": "string",
   4092                 "enum": ["hidden", "shown", "active"],
   4093                 "description": "'hidden' indicates sidebar is not defined for the specified tab (show was never called or hide() was called). Nothing is displayed for this sidebar.<br>'shown' means sidebar is defined for the specified tab; mini tab is displayed for this sidebar. Sidebar UI is either collapsed or displaying a content of some other extension's sidebar.<br>'active' indicates that sidebar is defined for the specified tab; sidebar UI is expanded and displaying this sidebar's content."
   4094               }
   4095             ]
   4096           }
   4097         ]
   4098       },
   4099       {
   4100         "name": "setBadgeText",
   4101         "type": "function",
   4102         "description": "Sets sidebar's mini tab badge text for the specified tab.",
   4103         "parameters": [
   4104           {
   4105             "type": "object",
   4106             "name": "details",
   4107             "properties": {
   4108               "tabId": {
   4109                 "type": "integer",
   4110                 "minimum": 0,
   4111                 "optional": true,
   4112                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4113               },
   4114               "text": {
   4115                 "type": "string",
   4116                 "description": "The sidebar's badge text. The badge is displayed on top of the sidebar's icon on the mini tab. Any number of characters can be passed, but only about four can fit in the space."
   4117               }
   4118             }
   4119           }
   4120         ]
   4121       },
   4122       {
   4123         "name": "setIcon",
   4124         "type": "function",
   4125         "description": "Sets sidebar's mini tab icon for the specified tab.",
   4126         "parameters": [
   4127           {
   4128             "type": "object",
   4129             "name": "details",
   4130             "properties": {
   4131               "tabId": {
   4132                 "type": "integer",
   4133                 "minimum": 0,
   4134                 "optional": true,
   4135                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4136               },
   4137               "imageData": {
   4138                 "type": "object",
   4139                 "isInstanceOf": "ImageData",
   4140                 "properties": {},
   4141                 "additionalProperties": { "type": "any" },
   4142                 "description": "Pixel data for an image to show on the sidebar's mini tab. Must be an ImageData object (for example, from a <code>canvas</code> element). Only one of the imagePath/imageData parameters all owed. The extension's icon is used by default. The preferred size of the icon is 16x16 pixels, any other size will be scaled to 16x16.",
   4143                 "optional": true
   4144               },
   4145               "path": {
   4146                 "type": "string",
   4147                 "optional": true,
   4148                 "description": "Relative path to an image in the extension to show on the sidebar's mini tab. Only one of the imagePath/imageData parameters all owed. The extension's icon is used by default. The preferred size of the icon is 16x16 pixels, any other size will be scaled to 16x16."
   4149               }
   4150             }
   4151           }
   4152         ]
   4153       },
   4154       {
   4155         "name": "setTitle",
   4156         "type": "function",
   4157         "description": "Sets sidebar's mini tab title for the specified tab.",
   4158         "parameters": [
   4159           {
   4160             "type": "object",
   4161             "name": "details",
   4162             "properties": {
   4163               "tabId": {
   4164                 "type": "integer",
   4165                 "minimum": 0,
   4166                 "optional": true,
   4167                 "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
   4168               },
   4169               "title": {
   4170                 "type": "string",
   4171                 "description": "The sidebar's title. It is displayed in a tooltip over the sidebar's mini tab."
   4172               }
   4173             }
   4174           }
   4175         ]
   4176       }
   4177     ],
   4178     "events": [
   4179       {
   4180         "name": "onStateChanged",
   4181         "unprivileged": true,
   4182         "type": "function",
   4183         "description": "Notifies about sidebar state changes.",
   4184         "parameters": [
   4185           {
   4186             "type": "object",
   4187             "name": "details",
   4188             "properties": {
   4189               "tabId": {
   4190                 "type": "integer",
   4191                 "minimum": 0
   4192               },
   4193               "state": {
   4194                 "type": "string",
   4195                 "enum": ["hidden", "shown", "active"]
   4196               }
   4197             }
   4198           }
   4199         ]
   4200       }
   4201     ]
   4202   },
   4203   {
   4204     "namespace": "omnibox",
   4205     "types": [
   4206       {
   4207         "id": "SuggestResult",
   4208         "type": "object",
   4209         "description": "A suggest result.",
   4210         "properties": {
   4211           "content": {
   4212             "type": "string",
   4213             "minLength": 1,
   4214             "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
   4215           },
   4216           "description": {
   4217             "type": "string",
   4218             "minLength": 1,
   4219             "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a literal URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed match</match></dim>."
   4220           }
   4221         }
   4222       }
   4223     ],
   4224     "functions": [
   4225       {
   4226         "name": "sendSuggestions",
   4227         "nodoc": true,
   4228         "type": "function",
   4229         "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
   4230         "parameters": [
   4231           {"type": "integer", "name": "requestId"},
   4232           {
   4233             "type": "array",
   4234             "description": "Array of suggest results",
   4235             "items": {
   4236               "type": "object",
   4237               "additionalProperties": { "type": "any" }
   4238             }
   4239           }
   4240         ]
   4241       },
   4242       {
   4243         "name": "setDefaultSuggestion",
   4244         "type": "function",
   4245         "description": "Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.",
   4246         "parameters": [
   4247           {
   4248             "type": "object",
   4249             "name": "suggestion",
   4250             "description": "A partial SuggestResult object, without the 'content' parameter. See SuggestResult for a description of the parameters.",
   4251             "properties": {
   4252               "description": {
   4253                 "type": "string",
   4254                 "minLength": 1,
   4255                 "description": "The text to display in the default suggestion. The placeholder string '%s' can be included and will be replaced with the user's input."
   4256               }
   4257             }
   4258           }
   4259         ]
   4260       }
   4261     ],
   4262     "events": [
   4263       {
   4264         "name": "onInputStarted",
   4265         "type": "function",
   4266         "description": "User has started a keyword input session by typing the extension's keyword. This is guaranteed to be sent exactly once per input session, and before any onInputChanged events.",
   4267         "parameters": []
   4268       },
   4269       {
   4270         "name": "onInputChanged",
   4271         "type": "function",
   4272         "description": "User has changed what is typed into the omnibox.",
   4273         "parameters": [
   4274           {
   4275             "type": "string",
   4276             "name": "text"
   4277           },
   4278           {
   4279             "name": "suggest",
   4280             "type": "function",
   4281             "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
   4282             "parameters": [
   4283               {
   4284                 "type": "array",
   4285                 "description": "Array of suggest results",
   4286                 "items": {
   4287                   "$ref": "SuggestResult"
   4288                 }
   4289               }
   4290             ]
   4291           }
   4292         ]
   4293       },
   4294       {
   4295         "name": "onInputEntered",
   4296         "type": "function",
   4297         "description": "User has accepted what is typed into the omnibox.",
   4298         "parameters": [
   4299           {
   4300             "type": "string",
   4301             "name": "text"
   4302           }
   4303         ]
   4304       },
   4305       {
   4306         "name": "onInputCancelled",
   4307         "type": "function",
   4308         "description": "User has ended the keyword input session without accepting the input.",
   4309         "parameters": []
   4310       }
   4311     ]
   4312   },
   4313   {
   4314     "namespace":"management",
   4315     "types": [
   4316       {
   4317         "id": "IconInfo",
   4318         "description": "Information about an icon belonging to an extension or app.",
   4319         "type": "object",
   4320         "properties": {
   4321           "size": { "type": "integer", "description": "A number representing the width and height of the icon. Likely values include (but are not limited to) 128, 48, 24, and 16."  },
   4322           "url": { "type": "string", "description": "The URL for this icon image. To display a grayscale version of the icon (to indicate that an extension is disabled, for example), append <code>?grayscale=true</code> to the URL." }
   4323         }
   4324       },
   4325       {
   4326         "id": "ExtensionInfo",
   4327         "description": "Information about an installed extension or app.",
   4328         "type": "object",
   4329         "properties": {
   4330           "id": {
   4331             "description": "The extension's unique identifier.",
   4332             "type": "string"
   4333           },
   4334           "name": {
   4335             "description": "The name of this extension or app.",
   4336             "type": "string"
   4337           },
   4338           "description": {
   4339             "description": "The description of this extension or app.",
   4340             "type": "string"
   4341           },
   4342           "version": {
   4343             "description": "The <a href='manifest.html#version'>version</a> of this extension or app.",
   4344             "type": "string"
   4345           },
   4346           "mayDisable": {
   4347             "description": "Whether this extension can be disabled or uninstalled by the user.",
   4348             "type": "boolean"
   4349           },
   4350           "enabled": {
   4351             "description": "Whether it is currently enabled or disabled.",
   4352             "type": "boolean"
   4353           },
   4354           "isApp": {
   4355             "description": "True if this is an app.",
   4356             "type": "boolean"
   4357           },
   4358           "appLaunchUrl": {
   4359             "description": "The launch url (only present for apps).",
   4360             "type": "string",
   4361             "optional": true
   4362           },
   4363           "homepageUrl": {
   4364             "description": "The URL of the homepage of this extension or app",
   4365             "type": "string",
   4366             "optional": true
   4367           },
   4368           "optionsUrl": {
   4369             "description": "The url for the item's options page, if it has one.",
   4370             "type": "string"
   4371           },
   4372           "icons": {
   4373             "description": "A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the <a href='manifest.html#icons'>manifest documentation on icons</a> for more details.",
   4374             "type": "array",
   4375             "optional": true,
   4376             "items": {
   4377               "$ref": "IconInfo"
   4378             }
   4379           },
   4380           "permissions": {
   4381             "description": "Returns a list of API based permissions.",
   4382             "type": "array",
   4383             "items" : {
   4384               "type": "string"
   4385             }
   4386           },
   4387           "hostPermissions": {
   4388             "description": "Returns a list of host based permissions.",
   4389             "type": "array",
   4390             "items" : {
   4391               "type": "string"
   4392             }
   4393           }
   4394         }
   4395       }
   4396     ],
   4397     "functions": [
   4398       {
   4399         "name": "getAll",
   4400         "description": "Returns a list of information about installed extensions and apps.",
   4401         "parameters": [
   4402           {
   4403             "type": "function",
   4404             "name": "callback",
   4405             "optional": true,
   4406             "parameters": [
   4407               {
   4408                 "type": "array",
   4409                 "name": "result",
   4410                 "items": {
   4411                   "$ref": "ExtensionInfo"
   4412                 }
   4413               }
   4414             ]
   4415           }
   4416         ]
   4417       },
   4418       {
   4419         "name": "get",
   4420         "description": "Return information about the installed extension or app that has the given ID.",
   4421         "parameters": [
   4422           {
   4423             "name": "id",
   4424             "type": "string",
   4425             "description": "The ID from an item of $ref:ExtensionInfo."
   4426           },
   4427           {
   4428             "type": "function",
   4429             "name": "callback",
   4430             "optional": "true",
   4431             "parameters": [
   4432               {
   4433                 "name": "result",
   4434                 "$ref": "ExtensionInfo"
   4435               }
   4436             ]
   4437           }
   4438         ]
   4439       },
   4440       {
   4441         "name": "setEnabled",
   4442         "description": "Enable or disable an app or extension.",
   4443         "parameters": [
   4444           {
   4445             "name": "id",
   4446             "type": "string",
   4447             "description": "This should be the id from an item of $ref:ExtensionInfo."
   4448           },
   4449           {
   4450             "name": "enabled",
   4451             "type": "boolean",
   4452             "description": "Whether this item should be enabled or disabled."
   4453           },
   4454           {
   4455             "name": "callback",
   4456             "type": "function",
   4457             "optional": "true",
   4458             "parameters": []
   4459           }
   4460         ]
   4461       },
   4462       {
   4463         "name": "uninstall",
   4464         "description": "Uninstall a currently installed app or extension.",
   4465         "parameters": [
   4466           {
   4467             "name": "id",
   4468             "type": "string",
   4469             "description": "This should be the id from an item of $ref:ExtensionInfo."
   4470           },
   4471           {
   4472             "name": "callback",
   4473             "type": "function",
   4474             "optional": "true",
   4475             "parameters": []
   4476           }
   4477         ]
   4478       },
   4479       {
   4480         "name": "launchApp",
   4481         "description": "Launches an application.",
   4482         "parameters": [
   4483           {
   4484             "name": "id",
   4485             "type": "string",
   4486             "description": "The extension id of the application."
   4487           },
   4488           {
   4489             "name": "callback",
   4490             "type": "function",
   4491             "optional": "true",
   4492             "parameters": []
   4493           }
   4494         ]
   4495       }
   4496     ],
   4497     "events": [
   4498       {
   4499         "name": "onInstalled",
   4500         "description": "Fired when an app or extension has been installed.",
   4501         "type": "function",
   4502         "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
   4503       },
   4504       {
   4505         "name": "onUninstalled",
   4506         "description": "Fired when an app or extension has been uninstalled.",
   4507         "type": "function",
   4508         "parameters": [
   4509           {
   4510            "name": "id",
   4511            "type": "string",
   4512            "description": "The id of the extension or app that was uninstalled."
   4513           }
   4514         ]
   4515       },
   4516       {
   4517         "name": "onEnabled",
   4518         "description": "Fired when an app or extension has been enabled.",
   4519         "type": "function",
   4520         "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
   4521       },
   4522       {
   4523         "name": "onDisabled",
   4524         "description": "Fired when an app or extension has been disabled",
   4525         "type": "function",
   4526         "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
   4527       }
   4528     ]
   4529   },
   4530   {
   4531     "namespace":"fileBrowserHandler",
   4532     "nodoc": "true",
   4533     "types": [
   4534       {
   4535         "id": "FileHandlerExecuteEventDetails",
   4536         "type": "object",
   4537         "description": "Event details payload for fileBrowserHandler.onExecute event.",
   4538         "properties": {
   4539           "entries": {
   4540             "type": "any",
   4541             "description": "Array of Entry instances representing files that are targets of this action (selected in ChromeOS file browser)."
   4542           },
   4543           "tab_id" : {
   4544             "type": "integer",
   4545             "optional": true,
   4546             "description": "The ID of the tab that raised this event. Tab IDs are unique within a browser session."
   4547           }
   4548         }
   4549       }
   4550     ],
   4551     "events": [
   4552       {
   4553         "name": "onExecute",
   4554         "type": "function",
   4555         "description": "Fired when file system action is executed from ChromeOS file browser.",
   4556         "parameters": [
   4557           {
   4558             "name": "id",
   4559             "type": "string",
   4560             "description": "File browser action id as specified in the listener component's manifest."
   4561           },
   4562           {
   4563             "name": "details",
   4564             "$ref": "FileHandlerExecuteEventDetails",
   4565             "description": "File handler execute event details."
   4566           }
   4567         ]
   4568       }
   4569     ]
   4570   },
   4571   {
   4572     "namespace":"fileBrowserPrivate",
   4573     "nodoc": "true",
   4574     "types": [
   4575       {
   4576         "id": "FileBrowserTask",
   4577         "type": "object",
   4578         "description": "Represents information about available browser tasks. A task is an abstraction of an operation that the file browser can perform over a selected file set.",
   4579         "properties": {
   4580           "taskId": {"type": "string", "description": "The unique identifier of the task."},
   4581           "title": {"type": "string", "description": "Task title."},
   4582           "iconUrl": {"type": "string", "description": "Task icon url (from chrome://extension-icon/...)"}
   4583         }
   4584       },
   4585       {
   4586         "id": "VolumeInfo",
   4587         "type": "object",
   4588         "description": "Mounted disk volume information.",
   4589         "properties": {
   4590           "mountPath": {
   4591             "type": "string",
   4592             "description": "Disk volume mount point path. The value corresponds to its Entry.fullPath in File API."
   4593           },
   4594           "label": {
   4595             "type": "string",
   4596             "description": "Volume label."
   4597           },
   4598           "deviceType": {
   4599             "type": "string",
   4600             "enum": ["flash", "hdd", "optical", "undefined"],
   4601             "description": "Device type."
   4602           },
   4603           "readOnly": {
   4604             "type": "boolean",
   4605             "description": "Flag that specifies if volume is mounted in read-only mode."
   4606           },
   4607           "totalSizeKB": {
   4608             "type": "integer",
   4609             "description": "Total disk volume size in KBs"
   4610           }
   4611         }
   4612       },
   4613       {
   4614         "id": "MountEvent",
   4615         "type": "object",
   4616         "description": "Payload data for disk mount / unmount event.",
   4617         "properties": {
   4618           "eventType": {
   4619             "type": "string",
   4620             "enum": ["added", "removed"],
   4621             "description": "Event type that tells listeners which disk volume even was raised."
   4622           },
   4623           "volumeInfo": {
   4624             "$ref": "VolumeInfo",
   4625             "description":"Volume information that this mount event applies to."
   4626           }
   4627         }
   4628       }
   4629     ],
   4630     "functions": [
   4631       {
   4632         "name": "cancelDialog",
   4633         "type": "function",
   4634         "description": "Cancel file selection.",
   4635         "parameters": []
   4636       },
   4637       {
   4638         "name": "executeTask",
   4639         "description": "Executes file browser task over selected files",
   4640         "parameters": [
   4641           {
   4642             "name": "taskId",
   4643             "type": "string",
   4644             "description": "The unique identifier of task to execute."
   4645           },
   4646           {
   4647             "name": "fileURLs",
   4648             "type": "array",
   4649             "description": "Array of file URLs",
   4650             "items": { "type": "string" }
   4651           },
   4652           {
   4653             "name": "callback",
   4654             "type": "function",
   4655             "optional": "false",
   4656             "parameters": [
   4657               {
   4658                 "name": "success",
   4659                 "type": "boolean",
   4660                 "optional": "true",
   4661                 "description": "True of task execution was successfully initiated."
   4662               }
   4663             ]
   4664           }
   4665         ]
   4666       },
   4667       {
   4668         "name": "getFileTasks",
   4669         "description": "Gets the of tasks that can be performed over selected files.",
   4670         "parameters": [
   4671           {
   4672             "name": "fileURLs",
   4673             "type": "array",
   4674             "description": "Array of selected file URLs",
   4675             "items": { "type": "string" }
   4676           },
   4677           {
   4678             "name": "callback",
   4679             "type": "function",
   4680             "optional": "false",
   4681             "parameters": [
   4682               {
   4683                 "name": "tasks",
   4684                 "type": "array",
   4685                 "items": {"$ref": "FileBrowserTask"},
   4686                 "description": "The list of available tasks that can be performed on all of the passed file paths."
   4687               }
   4688             ]
   4689           }
   4690         ]
   4691       },
   4692       {
   4693         "name": "getStrings",
   4694         "type": "function",
   4695         "description": "Get Strings.",
   4696         "parameters": [
   4697           {
   4698             "type": "function",
   4699              "name": "callback",
   4700              "parameters": [
   4701               {
   4702                 "type": "object",
   4703                 "properties": {},
   4704                 "additionalProperties": {"type": "string"}
   4705               }
   4706             ]
   4707           }
   4708         ]
   4709       },
   4710       {
   4711         "name": "requestLocalFileSystem",
   4712         "description": "Requests access to local file system",
   4713         "parameters": [
   4714           {
   4715             "name": "callback",
   4716             "type": "function",
   4717             "optional": "false",
   4718             "parameters": [
   4719               {
   4720                 "name" : "fileSystem",
   4721                 "type": "object",
   4722                 "optional": "true",
   4723                 "description": "A DOMFileSystem instance for local file system access. null if the caller has no appropriate permissions."
   4724               }
   4725             ]
   4726           }
   4727         ]
   4728       },
   4729       {
   4730         "name": "selectFiles",
   4731         "type": "function",
   4732         "description": "Select multiple files.",
   4733         "parameters": [
   4734           {
   4735             "type": "array",
   4736             "description": "Array of selected paths",
   4737             "items": {"type": "string"}
   4738           }
   4739         ]
   4740       },
   4741       {
   4742         "name": "selectFile",
   4743         "type": "function",
   4744         "description": "Select a file.",
   4745         "parameters": [
   4746           {
   4747             "type": "string",
   4748             "description": "A selected path"
   4749           },
   4750           {
   4751             "type": "integer",
   4752             "description": "Index of Filter"
   4753           }
   4754         ]
   4755       },
   4756       {
   4757         "name": "viewFiles",
   4758         "type": "function",
   4759         "description": "View multiple files.",
   4760         "parameters": [
   4761           {
   4762             "name": "fileUrls",
   4763             "type": "array",
   4764             "description": "Array of selected paths",
   4765             "items": {"type": "string"}
   4766           },
   4767           {
   4768             "name": "id",
   4769             "type": "string",
   4770             "description": "File browser handler id as for internal tasks."
   4771           }
   4772         ]
   4773       }
   4774     ],
   4775     "events": [
   4776       {
   4777         "name": "onDiskChanged",
   4778         "type": "function",
   4779         "description": "Fired when disk mount/unmount event is detected.",
   4780         "parameters": [
   4781           {
   4782             "$ref": "MountEvent",
   4783             "name": "fullPath",
   4784             "description": "Mount event information."
   4785           }
   4786         ]
   4787       }
   4788     ]
   4789   },
   4790   {
   4791     "namespace":"webstorePrivate",
   4792     "nodoc": "true",
   4793     "functions": [
   4794       {
   4795         "name": "install",
   4796         "description": "Installs the extension corresponding to the given id",
   4797         "parameters": [
   4798           {
   4799             "name": "expected_id",
   4800             "type": "string",
   4801             "description": "The id of the extension to install."
   4802           },
   4803           {
   4804             "name": "callback",
   4805             "type": "function",
   4806             "optional": "true",
   4807             "parameters": []
   4808           }
   4809         ]
   4810       },
   4811       {
   4812         "name": "beginInstall",
   4813         "description": "Initiates the install process for the given extension id",
   4814         "parameters": [
   4815           {
   4816             "name": "expected_id",
   4817             "type": "string",
   4818             "description": "The id of the extension to be installled. Must be called during a user gesture."
   4819           },
   4820           {
   4821             "name": "callback",
   4822             "type": "function",
   4823             "optional": "true",
   4824             "parameters": []
   4825           }
   4826         ]
   4827       },
   4828       {
   4829         "name": "beginInstallWithManifest",
   4830         "description": "Initiates the install process for the given extension. This must be called during a user gesture.",
   4831         "parameters": [
   4832           {
   4833             "name": "id",
   4834             "type": "string",
   4835             "description": "The id of the extension to be installled.",
   4836             "minLength": 32,
   4837             "maxLength": 32
   4838           },
   4839           {
   4840             "name": "icon_data",
   4841             "type": "string",
   4842             "description": "An icon as a base64-encoded image, displayed in a confirmation dialog."
   4843           },
   4844           {
   4845             "name": "manifest_json",
   4846             "type": "string",
   4847             "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.",
   4848             "minLength": 1
   4849           },
   4850           {
   4851             "name": "callback",
   4852             "type": "function",
   4853             "description": "Called when the user has either accepted/rejected the dialog, or some error occurred (such as invalid manifest or icon image data).",
   4854             "optional": "true",
   4855             "parameters": [
   4856               {
   4857                 "name": "result",
   4858                 "type": "string",
   4859                 "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', and 'no_gesture'."
   4860               }
   4861             ]
   4862           }
   4863         ]
   4864 
   4865       },
   4866       {
   4867         "name": "completeInstall",
   4868         "description": "",
   4869         "parameters": [
   4870           {
   4871             "name": "expected_id",
   4872             "type": "string",
   4873             "description": "The id of the extension to be installled. This should match a previous call to beginInstall."
   4874           },
   4875           {
   4876             "name": "callback",
   4877             "type": "function",
   4878             "optional": "true",
   4879             "parameters": []
   4880           }
   4881         ]
   4882       },
   4883       {
   4884         "name": "getBrowserLogin",
   4885         "description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.",
   4886         "parameters": [
   4887           {
   4888             "name": "callback",
   4889             "type": "function",
   4890             "optional": "false",
   4891             "parameters": [
   4892               {
   4893                 "name": "info",
   4894                 "type": "object",
   4895                 "properties": {
   4896                   "login": { "type": "string" },
   4897                   "token": { "type": "string", "optional": true }
   4898                 }
   4899               }
   4900             ]
   4901           }
   4902         ]
   4903       },
   4904       {
   4905         "name": "getStoreLogin",
   4906         "description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.",
   4907         "parameters": [
   4908           {
   4909             "name": "callback",
   4910             "type": "function",
   4911             "optional": "false",
   4912             "parameters": [
   4913               { "name": "login", "type": "string" }
   4914             ]
   4915           }
   4916         ]
   4917       },
   4918       {
   4919         "name": "setStoreLogin",
   4920         "description": "Set a preference value with the store login.",
   4921         "parameters": [
   4922           { "name": "login", "type": "string" },
   4923           { "name": "callback", "type": "function", "optional": "true" }
   4924         ]
   4925       },
   4926       {
   4927         "name": "promptBrowserLogin",
   4928         "description": "Causes the browser to bring up the browser login UI.",
   4929         "parameters": [
   4930           {
   4931             "name": "preferred_email",
   4932             "type": "string",
   4933             "description": "The email address to use to pre-populate the login dialog (can be an empty string)."
   4934           },
   4935           {
   4936             "name": "callback",
   4937             "type": "function",
   4938             "optional": "true",
   4939             "parameters": [
   4940               {
   4941                 "name": "info",
   4942                 "type": "object",
   4943                 "properties": {
   4944                   "login": { "type": "string", "optional": true },
   4945                   "token": { "type": "string", "optional": true }
   4946                 }
   4947               }
   4948             ]
   4949           }
   4950         ]
   4951       }
   4952     ]
   4953   },
   4954   {
   4955     "namespace": "experimental.extension",
   4956     "types": [
   4957       {
   4958         "id": "Preference",
   4959         "type": "object",
   4960         "customBindings": "Preference",
   4961         "description": "An object which allows access to a preference.",
   4962         "functions": [
   4963           {
   4964             "name": "get",
   4965             "type": "function",
   4966             "description": "Get the setting from the user preferences.",
   4967             "parameters": [
   4968               {
   4969                 "name": "details",
   4970                 "type": "object",
   4971                 "description": "What setting to return.",
   4972                 "properties": {
   4973                   "incognito": {
   4974                     "type": "boolean",
   4975                     "optional": true,
   4976                     "description": "Whether to return the setting that applies to the incognito session (default false)."
   4977                   }
   4978                 }
   4979               },
   4980               {
   4981                 "name": "callback",
   4982                 "type": "function",
   4983                 "parameters": [
   4984                   {
   4985                     "name": "details",
   4986                     "type": "object",
   4987                     "description": "Details of the currently effective preference value.",
   4988                     "properties": {
   4989                       "value": {
   4990                         "description": "The value of the preference.",
   4991                         "type": "any"
   4992                       },
   4993                       "levelOfControl": {
   4994                         "description": "One of<br><var>NotControllable</var>: cannot be controlled by any extension<br><var>ControlledByOtherExtensions</var>: controlled by extensions with higher precedence<br><var>ControllableByThisExtension</var>: can be controlled by this extension<br><var>ControlledByThisExtension</var>: controlled by this extension",
   4995                         "type": "string",
   4996                         "enum": ["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"]
   4997                       },
   4998                       "incognitoSpecific": {
   4999                         "description": "Whether the effective value is specific to the incognito session.<br>This property will <em>only</em> be present if the <var>incognito</var> property in the <var>details</var> parameter of <code>get()</code> was true.",
   5000                         "type": "boolean",
   5001                         "optional": true
   5002                       }
   5003                     }
   5004                   }
   5005                 ]
   5006               }
   5007             ]
   5008           },
   5009           {
   5010             "name": "set",
   5011             "type": "function",
   5012             "description": "Set the setting in the user preferences",
   5013             "parameters": [
   5014               {
   5015                 "name": "details",
   5016                 "type": "object",
   5017                 "description": "What setting to change.",
   5018                 "properties": {
   5019                   "value": {
   5020                     "description": "The value of the preference. <br>Note that every preference has a specific value type, which is described together with the preference. An extension should <em>not</em> set a preference value of a different type.",
   5021                     "type": "any"
   5022                   },
   5023                   "incognito": {
   5024                     "type": "boolean",
   5025                     "optional": true,
   5026                     "description": "Whether to modify the setting for the incognito session only (default false)."
   5027                   }
   5028                 }
   5029               },
   5030               {
   5031                 "name": "callback",
   5032                 "type": "function",
   5033                 "description": "Called after the preference has been set.",
   5034                 "optional": true,
   5035                 "parameters": []
   5036               }
   5037             ]
   5038           },
   5039           {
   5040             "name": "clear",
   5041             "type": "function",
   5042             "description": "Clears the setting in the user preferences. This way default settings can become effective again.",
   5043             "parameters": [
   5044               {
   5045                 "name": "details",
   5046                 "type": "object",
   5047                 "description": "What setting to clear.",
   5048                 "properties": {
   5049                   "incognito": {
   5050                     "type": "boolean",
   5051                     "optional": true,
   5052                     "description": "Whether to clear the setting for the incognito session only (default false)."
   5053                   }
   5054                 }
   5055               },
   5056               {
   5057                 "name": "callback",
   5058                 "type": "function",
   5059                 "description": "Called after the preference has been cleared.",
   5060                 "optional": true,
   5061                 "parameters": []
   5062               }
   5063             ]
   5064           }
   5065         ],
   5066         "events": [
   5067           {
   5068             "name": "onChange",
   5069             "description": "Fired when the value of the preference changes.",
   5070             "parameters": [
   5071               {
   5072                 "type": "object",
   5073                 "name": "details",
   5074                 "properties": {
   5075                   "value": {
   5076                     "description": "The value of the preference.",
   5077                     "type": "any"
   5078                   },
   5079                   "levelOfControl": {
   5080                     "description": "One of<br><var>NotControllable</var>: cannot be controlled by any extension<br><var>ControlledByOtherExtensions</var>: controlled by extensions with higher precedence<br><var>ControllableByThisExtension</var>: can be controlled by this extension<br><var>ControlledByThisExtension</var>: controlled by this extension",
   5081                     "type": "string",
   5082                     "enum": ["NotControllable", "ControlledByOtherExtensions", "ControllableByThisExtension", "ControlledByThisExtension"]
   5083                   },
   5084                   "incognitoSpecific": {
   5085                     "description": "Whether the value that has changed is specific to the incognito session.<br>This property will <em>only</em> be present if the user has enabled the extension in incognito mode.",
   5086                     "type": "boolean",
   5087                     "optional": true
   5088                   }
   5089                 }
   5090               }
   5091             ]
   5092           }
   5093         ]
   5094       }
   5095     ]
   5096   },
   5097   {
   5098     "namespace": "experimental.contentSettings.misc",
   5099     "properties": {
   5100       "blockThirdPartyCookies": {
   5101         "$ref": "Preference",
   5102         "value": ["blockThirdPartyCookies", {"type": "boolean"}],
   5103         "description": "Whether third party cookies should be blocked. The value of this preference is of type boolean."
   5104       },
   5105       "enableReferrers": {
   5106         "$ref": "Preference",
   5107         "value": ["enableReferrers", {"type":"boolean"}],
   5108         "description": "Whether referrers should be enabled. The value of this preference is of type boolean."
   5109       },
   5110       "enableHyperlinkAuditing": {
   5111         "$ref": "Preference",
   5112         "value": ["enableHyperlinkAuditing", {"type":"boolean"}],
   5113         "description": "Whether to enable hyperlink auditing (\"&lt;a ping&gt;\"). The value of this preference is of type boolean."
   5114       }
   5115     }
   5116   },
   5117   {
   5118     "namespace": "experimental.debugger",
   5119     "functions": [
   5120       {
   5121         "name": "attach",
   5122         "type": "function",
   5123         "description": "Attaches debugger to the tab with given id.",
   5124         "parameters": [
   5125           {
   5126             "type": "integer",
   5127             "name": "tabId",
   5128             "description": "The id of the tab to which you want to attach."
   5129           },
   5130           {
   5131             "type": "function",
   5132             "name": "callback",
   5133             "optional": true,
   5134             "parameters": [],
   5135             "description": "If an error occurs while attaching to the tab, the callback will be called with no arguments and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will be set to the error message."
   5136           }
   5137         ]
   5138       },
   5139       {
   5140         "name": "detach",
   5141         "type": "function",
   5142         "description": "Detaches debugger from a tab with given id.",
   5143         "parameters": [
   5144           {
   5145             "type": "integer",
   5146             "name": "tabId",
   5147             "description": "The id of the tab from which you want to detach."
   5148           },
   5149           {
   5150             "type": "function",
   5151             "name": "callback",
   5152             "optional": true,
   5153             "parameters": [],
   5154             "description": "If an error occurs while detaching from the tab, the callback will be called with no arguments and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will be set to the error message."
   5155           }
   5156         ]
   5157       },
   5158       {
   5159         "name": "sendRequest",
   5160         "type": "function",
   5161         "description": "Send given request to the debugger.",
   5162         "parameters": [
   5163           {
   5164             "type": "integer",
   5165             "name": "tabId",
   5166             "description": "The id of the tab to which you want to send debugging request."
   5167           },
   5168           {
   5169             "type": "string",
   5170             "name": "method",
   5171             "description": "Method name."
   5172           },
   5173           {
   5174             "type": "object",
   5175             "name": "params",
   5176             "optional": true,
   5177             "properties": {},
   5178             "additionalProperties": { "type": "any" },
   5179             "description": "JSON object matching Developer Tools / Web Inspector Protocol scheme."
   5180           },
   5181           {
   5182             "type": "function",
   5183             "name": "callback",
   5184             "optional": true,
   5185             "parameters": [
   5186               {
   5187                 "type": "object",
   5188                 "name": "result",
   5189                 "optional": true,
   5190                 "properties": {},
   5191                 "additionalProperties": { "type": "any" },
   5192                 "description": "JSON object with the request response."
   5193               }
   5194             ],
   5195             "description": "Request response body. If an error occurs while posting the message, the callback will be called with no arguments and <a href='extension.html#property-lastError'>chrome.extension.lastError</a> will be set to the error message."
   5196           }
   5197         ]
   5198       }
   5199     ],
   5200     "events": [
   5201       {
   5202         "name": "onEvent",
   5203         "type": "function",
   5204         "description": "Fired whenever debugger issues instrumentation event.",
   5205         "parameters": [
   5206           {
   5207             "type": "integer",
   5208             "name": "tabId",
   5209             "description": "The id of the tab that generated debug evet."
   5210           },
   5211           {
   5212             "type": "string",
   5213             "name": "method",
   5214             "description": "Method name."
   5215           },
   5216           {
   5217             "type": "object",
   5218             "name": "params",
   5219             "optional": true,
   5220             "properties": {},
   5221             "additionalProperties": { "type": "any" },
   5222             "description": "JSON object matching Developer Tools / Web Inspector Protocol event data scheme."
   5223           }
   5224         ]
   5225       },
   5226       {
   5227         "name": "onDetach",
   5228         "type": "function",
   5229         "description": "Fired when browser terminates debugging session for the tab.",
   5230         "parameters": [
   5231           {
   5232             "type": "integer",
   5233             "name": "tabId",
   5234             "description": "The id of the tab that was detached."
   5235           }
   5236         ]
   5237       }
   5238     ]
   5239   }
   5240 ]
   5241