extension_api.json revision 21d179b334e59e9a3bfcaed4c4430bef1bc5759d
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 backround 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": "setUpdateUrlData",
195        "type": "function",
196        "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.",
197        "parameters": [
198          {"type": "string", "name": "data", "maxLength": 1024}
199        ]
200      }
201    ],
202    "events": [
203      {
204        "name": "onConnect",
205        "type": "function",
206        "unprivileged": true,
207        "description": "Fired when a connection is made from either an extension process or a content script.",
208        "parameters": [
209          {"$ref": "Port", "name": "port"}
210        ]
211      },
212      {
213        "name": "onConnectExternal",
214        "type": "function",
215        "description": "Fired when a connection is made from another extension.",
216        "parameters": [
217          {"$ref": "Port", "name": "port"}
218        ]
219      },
220      {
221        "name": "onRequest",
222        "type": "function",
223        "unprivileged": true,
224        "description": "Fired when a request is sent from either an extension process or a content script.",
225        "parameters": [
226          {"name": "request", "type": "any", "description": "The request sent by the calling script."},
227          {"name": "sender", "$ref": "MessageSender" },
228          {"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." }
229        ]
230      },
231      {
232        "name": "onRequestExternal",
233        "type": "function",
234        "description": "Fired when a request is sent from another extension.",
235        "parameters": [
236          {"name": "request", "type": "any", "description": "The request sent by the calling script."},
237          {"name": "sender", "$ref": "MessageSender" },
238          {"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." }
239        ]
240      }
241    ]
242  },
243  {
244    "namespace": "experimental.accessibility",
245    "nodoc": true,
246    "types": [
247      {
248        "id": "AccessibilityObject",
249        "type": "object",
250        "description": "Parent class for accessibility information about an object.",
251        "properties": {
252          "type": {
253            "type": "string",
254            "description": "The type of this object, which determines the contents of 'details'.",
255            "enum": ["button", "checkbox", "combobox", "link", "menu", "menuitem", "radiobutton", "tab", "textbox", "window"]
256          },
257          "name": {
258            "type": "string",
259            "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."
260          },
261          "details": {
262            "description": "Other details like the state, depending on the type of object.",
263            "optional": true,
264            "choices": [
265              { "$ref": "CheckboxDetails" },
266              { "$ref": "ComboBoxDetails" },
267              { "$ref": "MenuDetails" },
268              { "$ref": "MenuItemDetails" },
269              { "$ref": "RadioButtonDetails" },
270              { "$ref": "TabDetails" },
271              { "$ref": "TextBoxDetails" }
272            ]
273          }
274        }
275      },
276      {
277        "id": "CheckboxDetails",
278        "type": "object",
279        "description": "Information about the state of a checkbox.",
280        "properties": {
281          "isChecked": {"type": "boolean", "description": "True if this checkbox is checked."}
282        }
283      },
284      {
285        "id": "ComboBoxDetails",
286        "type": "object",
287        "description": "Information about the state of a combo box.",
288        "properties": {
289          "value": {"type": "string", "description": "The value of the combo box."},
290          "itemCount": {"type": "integer", "description": "The number of items in the combo box's list."},
291          "itemIndex": {"type": "integer", "description": "The 0-based index of the current value, or -1 if the user entered a value not from the list."}
292        }
293      },
294      {
295        "id": "ListBoxDetails",
296        "type": "object",
297        "description": "Information about the state of a list box.",
298        "properties": {
299          "value": {"type": "string", "description": "The value of the list box."},
300          "itemCount": {"type": "integer", "description": "The number of items in the list."},
301          "itemIndex": {"type": "integer", "description": "The 0-based index of the selected value, or -1 if no items are selected."}
302        }
303      },
304      {
305        "id": "MenuDetails",
306        "type": "object",
307        "description": "Information about the state of a drop-down menu.",
308        "properties": {
309        }
310      },
311      {
312        "id": "MenuItemDetails",
313        "type": "object",
314        "description": "Information about a menu item.",
315        "properties": {
316          "hasSubmenu": {"type": "boolean", "description": "True if this item opens a submenu."},
317          "itemCount": {"type": "integer", "description": "The number of items in the menu."},
318          "itemIndex": {"type": "integer", "description": "The 0-based index of this menu item."}
319        }
320      },
321      {
322        "id": "RadioButtonDetails",
323        "type": "object",
324        "description": "Information about the state of a radio button.",
325        "properties": {
326          "isChecked": {"type": "boolean", "description": "True if this radio button is checked."},
327          "itemCount": {"type": "integer", "description": "The number of radio buttons in this group."},
328          "itemIndex": {"type": "integer", "description": "The 0-based index of this radio button in this group."}
329        }
330      },
331      {
332        "id": "TabDetails",
333        "type": "object",
334        "description": "Additional accessibility information about a tab.",
335        "properties": {
336          "itemCount": {"type": "integer", "description": "The number of tabs in this group."},
337          "itemIndex": {"type": "integer", "description": "The 0-based index of this tab in this group."}
338        }
339      },
340      {
341        "id": "TextBoxDetails",
342        "type": "object",
343        "description": "Information about the state of a text box.",
344        "properties": {
345          "value": {"type": "string", "description": "The value of the text box - the entered text."},
346          "isPassword": {"type": "boolean", "description": "True if this control contains password text whose contents should be obscured."},
347          "selectionStart": {"type": "integer", "description": "The index of the character where the selection starts, if this control contains editable text."},
348          "selectionEnd": {"type": "integer", "description": "The index of the character where the selection ends, if this control contains editable text."}
349        }
350      }
351    ],
352    "functions": [
353      {
354        "name": "setAccessibilityEnabled",
355        "type": "function",
356        "description": "Enable or disable the accessibility extension api. This must be set to true before event listeners or getFocusedControl will work.",
357        "parameters": [
358          {
359            "type": "boolean",
360            "name": "enabled",
361            "description": "True if accessibility support should be enabled."
362          }
363        ]
364      },
365      {
366        "name": "getFocusedControl",
367        "type": "function",
368        "description": "Get information about the currently focused control.",
369        "parameters": [
370          {
371            "type": "function",
372            "name": "callback",
373            "parameters": [
374              {
375                "name": "control",
376                "description": "Details of the currently focused control, or null if nothing is focused.",
377                "choices": [
378                  { "$ref": "AccessibilityObject" },
379                  { "type": "null" }
380                ]
381              }
382            ]
383          }
384        ]
385      }
386    ],
387    "events": [
388      {
389        "name": "onWindowOpened",
390        "type": "function",
391        "description": "Fired when a window is opened.",
392        "parameters": [
393          {
394            "$ref": "AccessibilityObject",
395            "name": "window",
396            "description": "Information about the window that was opened."
397          }
398        ]
399      },
400      {
401        "name": "onWindowClosed",
402        "type": "function",
403        "description": "Fired when a window is closed.",
404        "parameters": [
405          {
406            "$ref": "AccessibilityObject",
407            "name": "window",
408            "description": "Information about the window that was closed."
409          }
410        ]
411      },
412      {
413        "name": "onControlFocused",
414        "type": "function",
415        "description": "Fired when a control is focused.",
416        "parameters": [
417          {
418            "$ref": "AccessibilityObject",
419            "name": "control",
420            "description": "Details of the control that was focused."
421          }
422        ]
423      },
424      {
425        "name": "onControlAction",
426        "type": "function",
427        "description": "Fired when a control's action is taken, like pressing a button or toggling a checkbox.",
428        "parameters": [
429          {
430            "$ref": "AccessibilityObject",
431            "name": "control",
432            "description": "Details of the control whose action was taken."
433          }
434        ]
435      },
436      {
437        "name": "onTextChanged",
438        "type": "function",
439        "description": "Fired when text changes in an editable text control.",
440        "parameters": [
441          {
442            "$ref": "AccessibilityObject",
443            "name": "control",
444            "description": "Details of the control where the text changed."
445          }
446        ]
447      },
448      {
449        "name": "onMenuOpened",
450        "type": "function",
451        "description": "Fired when a menu is opened.",
452        "parameters": [
453          {
454            "$ref": "AccessibilityObject",
455            "name": "menu",
456            "description": "Information about the menu that was opened."
457          }
458        ]
459      },
460      {
461        "name": "onMenuClosed",
462        "type": "function",
463        "description": "Fired when a menu is closed.",
464        "parameters": [
465          {
466            "$ref": "AccessibilityObject",
467            "name": "menu",
468            "description": "Information about the menu that was closed."
469          }
470        ]
471      }
472    ]
473  },
474  {
475    "namespace": "experimental.extension",
476    "nodoc": true,
477    "types": [],
478    "functions": [
479      {
480        "name": "getPopupView",
481        "type": "function",
482        "description": "Returns a reference to the JavaScript 'window' object of the popup view.  Returns undefined if no popup presently shown.",
483        "parameters": [],
484        "returns": {
485          "type": "object",
486          "isInstanceOf": "DOMWindow",
487          "properties": {},
488          "additionalProperties": { "type": "any" },
489          "optional": true
490        }
491      }
492    ],
493    "events": []
494  },
495  {
496    "namespace": "experimental.tts",
497    "nodoc": true,
498    "functions": [
499      {
500        "name": "speak",
501        "type": "function",
502        "description": "Speak text using a text-to-speech engine.",
503        "parameters": [
504          {
505            "type": "string",
506            "name": "utterance",
507            "description": "The text to speak."
508          },
509          {
510            "type": "object",
511            "name": "options",
512            "optional": true,
513            "description": "The speak options. This parameter is currently ignored.",
514            "properties": {
515              "enqueue": {
516	        "type": "boolean",
517		"optional": true,
518		"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."
519              },
520	      "voiceName": {
521                "type": "string",
522                "optional": true,
523                "description": "The name of the voice to use for synthesis."
524              },
525	      "locale": {
526                "type": "string",
527                "optional": true,
528                "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."
529              },
530              "gender": {
531                "type": "string",
532                "optional": true,
533                "description": "Gender of voice for synthesized speech.",
534                "enum": ["male", "female"]
535              },
536              "rate": {
537                "type": "number",
538                "optional": true,
539                "minimum": 0,
540                "maximum": 1,
541                "description": "Speaking speed between 0 and 1 inclusive, with 0 being slowest and 1 being fastest."
542              },
543              "pitch": {
544                "type": "number",
545                "optional": true,
546                "minimum": 0,
547                "maximum": 1,
548                "description": "Speaking pitch between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
549              },
550              "volume": {
551                "type": "number",
552                "optional": true,
553                "minimum": 0,
554                "maximum": 1,
555                "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
556              }
557            }
558          },
559          {
560            "type": "function",
561            "name": "callback",
562            "optional": true,
563            "description": "This function is called when speaking is finished.",
564            "parameters": []
565          }
566        ]
567      },
568      {
569        "name": "stop",
570        "type": "function",
571        "description": "Stop any current speech.",
572        "parameters": []
573      },
574      {
575        "name": "isSpeaking",
576        "type": "function",
577        "description": "Check if the engine is currently speaking.",
578        "parameters": [
579          {
580            "type": "function",
581            "name": "callback",
582            "optional": true,
583            "parameters": [
584              {
585                "name": "speaking",
586                "type": "boolean",
587                "description": "True if speaking, false otherwise."
588              }
589            ]
590          }
591        ]
592      },
593      {
594        "name": "speakCompleted",
595        "nodoc": true,
596        "type": "function",
597        "description": "A callback passed to the onSpeak event.",
598        "parameters": [
599          {
600            "type": "integer",
601            "name": "requestId"
602          },
603          {
604            "type": "string",
605	    "optional": "true",
606            "name": "errorMessage"
607          }
608        ]
609      }
610    ],
611    "events": [
612      {
613        "name": "onSpeak",
614        "type": "function",
615        "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.",
616        "parameters": [
617          {
618            "type": "string",
619            "name": "utterance",
620            "description": "The text to speak."
621          },
622          {
623            "type": "object",
624            "name": "options",
625            "description": "The speak options.",
626            "properties": {
627	      "voiceName": {
628                "type": "string",
629                "optional": true,
630                "description": "The name of the voice to use for synthesis."
631              },
632	      "locale": {
633                "type": "string",
634                "optional": true,
635                "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."
636              },
637              "gender": {
638                "type": "string",
639                "optional": true,
640                "description": "Gender of voice for synthesized speech.",
641                "enum": ["male", "female"]
642              },
643              "rate": {
644                "type": "number",
645                "optional": true,
646                "minimum": 0,
647                "maximum": 1,
648                "description": "Speaking speed between 0 and 1 inclusive, with 0 being slowest and 1 being fastest."
649              },
650              "pitch": {
651                "type": "number",
652                "optional": true,
653                "minimum": 0,
654                "maximum": 1,
655                "description": "Speaking pitch between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
656              },
657              "volume": {
658                "type": "number",
659                "optional": true,
660                "minimum": 0,
661                "maximum": 1,
662                "description": "Speaking volume between 0 and 1 inclusive, with 0 being lowest and 1 being highest."
663              }
664            }
665	  },
666          {
667            "type": "function",
668            "name": "callback",
669            "description": "You must call this function when speaking is finished.",
670            "parameters": [
671              {
672                "type": "string",
673                "name": "error",
674		"optional": true,
675                "description": "Error message, which will be returned to the caller in chrome.extension.lastError."
676              }
677            ]
678          }
679        ]
680      },
681      {
682        "name": "onStop",
683        "type": "function",
684        "description": "Fired when a call is made to tts.stop and this extension may be in the middle of speaking."
685      }
686    ]
687  },
688  {
689    "namespace": "windows",
690    "types": [
691      {
692        "id": "Window",
693        "type": "object",
694        "properties": {
695          "id": {"type": "integer", "minimum": 0, "description": "The ID of the window. Window IDs are unique within a browser session."},
696          "focused": {"type": "boolean", "description": "Whether the window is currently the focused window."},
697          "top": {"type": "integer", "description": "The offset of the window from the top edge of the screen in pixels."},
698          "left": {"type": "integer", "description": "The offset of the window from the left edge of the screen in pixels."},
699          "width": {"type": "integer", "description": "The width of the window in pixels."},
700          "height": {"type": "integer", "description": "The height of the window in pixels."},
701          "tabs": {"type": "array", "items": { "$ref": "Tab" }, "optional": true, "description": "Array of $ref:Tab objects representing the current tabs in the window."},
702          "incognito": {"type": "boolean", "description": "Whether the window is incognito."},
703          "type": {
704            "type": "string",
705            "description": "The type of browser window this is.",
706            "enum": ["normal", "popup", "app"]
707          }
708        }
709      }
710    ],
711    "properties": {
712      "WINDOW_ID_NONE": {
713        "type": "integer",
714        "value": "-1",
715        "description": "The windowId value that represents the absence of a chrome browser window."
716      }
717    },
718    "functions": [
719      {
720        "name": "get",
721        "type": "function",
722        "description": "Gets details about a window.",
723        "parameters": [
724          {"type": "integer", "name": "windowId", "minimum": 0},
725          {
726            "type": "function",
727            "name": "callback",
728            "parameters": [
729              {
730                "name": "window", "$ref": "Window"
731              }
732            ]
733          }
734        ]
735      },
736      {
737        "name": "getCurrent",
738        "type": "function",
739        "description": "Gets the <a href='#current-window'>current window</a>.",
740        "parameters": [
741          {
742            "type": "function",
743            "name": "callback",
744            "parameters": [
745              {
746                "name": "window", "$ref": "Window"
747              }
748            ]
749          }
750        ]
751      },
752      {
753        "name": "getLastFocused",
754        "type": "function",
755        "description": "Gets the window that was most recently focused &mdash; typically the window 'on top'.",
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": "getAll",
770        "type": "function",
771        "description": "Gets all windows.",
772        "parameters": [
773          {
774            "type": "object",
775            "name": "getInfo",
776            "optional": true,
777            "description": "",
778            "properties": {
779              "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." }
780            }
781          },
782          {
783            "type": "function",
784            "name": "callback",
785            "parameters": [
786              {
787                "name": "windows", "type": "array", "items": { "$ref": "Window" }
788              }
789            ]
790          }
791        ]
792      },
793      {
794        "name": "create",
795        "type": "function",
796        "description": "Creates (opens) a new browser with any optional sizing, position or default URL provided.",
797        "parameters": [
798          {
799            "type": "object",
800            "name": "createData",
801            "properties": {
802              "url": {
803                "type": "string",
804                "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.",
805                "optional": true,
806                "choices": [
807                  {"type": "string"},
808                  {"type": "array", "items": {"type": "string"}}
809                ]
810              },
811              "tabId": {"type": "integer", "minimum": 0, "optional": true, "description": "The id of the tab for which you want to adopt to the new window."},
812              "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."},
813              "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."},
814              "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width in pixels of the new window. If not specified defaults to a natural width."},
815              "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height in pixels of the new window. If not specified defaults to a natural height."},
816              "incognito": {"type": "boolean", "optional": true, "description": "Whether the new window should be an incognito window."},
817              "type": {
818                "type": "string",
819                "optional": true,
820                "description": "Specifies what type of browser window to create.",
821                "enum": ["normal", "popup"]
822              }
823            },
824            "optional": true
825          },
826          {
827            "type": "function",
828            "name": "callback",
829            "optional": true,
830            "parameters": [
831              {
832                "name": "window", "$ref": "Window", "description": "Contains details about the created window.",
833                "optional": true
834              }
835            ]
836          }
837        ]
838      },
839      {
840        "name": "update",
841        "type": "function",
842        "description": "Updates the properties of a window. Specify only the properties that you want to change; unspecified properties will be left unchanged.",
843        "parameters": [
844          {"type": "integer", "name": "windowId", "minimum": 0},
845          {
846            "type": "object",
847            "name": "updateInfo",
848            "properties": {
849              "left": {"type": "integer", "optional": true, "description": "The offset from the left edge of the screen to move the window to in pixels."},
850              "top": {"type": "integer", "optional": true, "description": "The offset from the top edge of the screen to move the window to in pixels."},
851              "width": {"type": "integer", "minimum": 0, "optional": true, "description": "The width to resize the window to in pixels."},
852              "height": {"type": "integer", "minimum": 0, "optional": true, "description": "The height to resize the window to in pixels."},
853              "focused": {"type": "boolean", "optional": true, "description": "It true, brings the window to the front. If false, brings the next window in the z-order to the front."}
854            }
855          },
856          {
857            "type": "function",
858            "name": "callback",
859            "optional": true,
860            "parameters": [
861              {
862                "name": "window", "$ref": "Window"
863              }
864            ]
865          }
866        ]
867      },
868      {
869        "name": "remove",
870        "type": "function",
871        "description": "Removes (closes) a window, and all the tabs inside it.",
872        "parameters": [
873          {"type": "integer", "name": "windowId", "minimum": 0},
874          {"type": "function", "name": "callback", "optional": true, "parameters": []}
875        ]
876      }
877    ],
878    "events": [
879      {
880        "name": "onCreated",
881        "type": "function",
882        "description": "Fired when a window is created.",
883        "parameters": [
884          {
885            "$ref": "Window",
886            "name": "window",
887            "description": "Details of the window that was created."
888          }
889        ]
890      },
891      {
892        "name": "onRemoved",
893        "type": "function",
894        "description": "Fired when a window is removed (closed).",
895        "parameters": [
896          {"type": "integer", "name": "windowId", "minimum": 0, "description": "ID of the removed window."}
897        ]
898      },
899      {
900        "name": "onFocusChanged",
901        "type": "function",
902        "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.",
903        "parameters": [
904          {"type": "integer", "name": "windowId", "minimum": 0, "description": "ID of the newly focused window."}
905        ]
906      }
907    ]
908  },
909  {
910    "namespace": "tabs",
911    "types": [
912      {
913        "id": "Tab",
914        "type": "object",
915        "properties": {
916          "id": {"type": "integer", "minimum": 0, "description": "The ID of the tab. Tab IDs are unique within a browser session."},
917          "index": {"type": "integer", "minimum": 0, "description": "The zero-based index of the tab within its window."},
918          "windowId": {"type": "integer", "minimum": 0, "description": "The ID of the window the tab is contained within."},
919          "selected": {"type": "boolean", "description": "Whether the tab is selected."},
920          "pinned": {"type": "boolean", "description": "Whether the tab is pinned."},
921          "url": {"type": "string", "description": "The URL the tab is displaying."},
922          "title": {"type": "string", "optional": true, "description": "The title of the tab. This may not be available if the tab is loading."},
923          "favIconUrl": {"type": "string", "optional": true, "description": "The URL of the tab's favicon. This may not be available if the tab is loading."},
924          "status": {"type": "string", "optional": true, "description": "Either <em>loading</em> or <em>complete</em>."},
925          "incognito": {"type": "boolean", "description": "Whether the tab is in an incognito window."}
926        }
927      }
928    ],
929    "functions": [
930      {
931        "name": "get",
932        "type": "function",
933        "description": "Retrieves details about the specified tab.",
934        "parameters": [
935          {
936            "type": "integer",
937            "name": "tabId",
938            "minimum": 0
939          },
940          {
941            "type": "function",
942            "name": "callback",
943            "parameters": [
944              {"name": "tab", "$ref": "Tab"}
945            ]
946          }
947        ]
948      },
949      {
950        "name": "getCurrent",
951        "type": "function",
952        "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).",
953        "parameters": [
954          {
955            "type": "function",
956            "name": "callback",
957            "parameters": [
958              {
959                "name": "tab",
960                "$ref": "Tab",
961                "optional": true
962              }
963            ]
964          }
965        ]
966      },
967      {
968        "name": "connect",
969        "type": "function",
970        "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>.",
971        "parameters": [
972          {
973            "type": "integer",
974            "name": "tabId",
975            "minimum": 0
976          },
977          {
978            "type": "object",
979            "name": "connectInfo",
980            "properties": {
981              "name": { "type": "string", "optional": true, "description": "Will be passed into onConnect for content scripts that are listening for the connection event." }
982            },
983            "optional": true
984          }
985        ],
986        "returns": {
987          "$ref": "Port",
988          "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. "
989        }
990      },
991      {
992        "name": "sendRequest",
993        "type": "function",
994        "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.",
995        "parameters": [
996          {
997            "type": "integer",
998            "name": "tabId",
999            "minimum": 0
1000          },
1001          {
1002            "type": "any",
1003            "name": "request"
1004          },
1005          {
1006            "type": "function",
1007            "name": "responseCallback",
1008            "optional": true,
1009            "parameters": [
1010              {
1011                "name": "response",
1012                "type": "any",
1013                "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."
1014              }
1015            ]
1016          }
1017        ]
1018      },
1019      {
1020        "name": "getSelected",
1021        "type": "function",
1022        "description": "Gets the tab that is selected in the specified window.",
1023        "parameters": [
1024          {
1025            "type": "integer",
1026            "name": "windowId",
1027            "minimum": 0,
1028            "optional": true,
1029            "description": "Defaults to the <a href='windows.html#current-window'>current window</a>."
1030          },
1031          {
1032            "type": "function",
1033            "name": "callback",
1034            "parameters": [
1035              {"name": "tab", "$ref": "Tab"}
1036            ]
1037          }
1038        ]
1039      },
1040      {
1041        "name": "getAllInWindow",
1042        "type": "function",
1043        "description": "Gets details about all tabs in the specified window.",
1044        "parameters": [
1045          {
1046            "type": "integer",
1047            "name": "windowId",
1048            "minimum": 0,
1049            "optional": true,
1050            "description": "Defaults to the <a href='windows.html#current-window'>current window</a>."
1051            },
1052          {
1053            "type": "function",
1054            "name": "callback",
1055            "parameters": [
1056              {"name": "tabs", "type": "array", "items": { "$ref": "Tab" } }
1057            ]
1058          }
1059        ]
1060      },
1061      {
1062        "name": "create",
1063        "type": "function",
1064        "description": "Creates a new tab. Note: This function can be used without requesting the 'tabs' permission in the manifest.",
1065        "parameters": [
1066          {
1067            "type": "object",
1068            "name": "createProperties",
1069            "properties": {
1070              "windowId": {
1071                "type": "integer",
1072                "minimum": 0,
1073                "optional": true,
1074                "description": "The window to create the new tab in. Defaults to the <a href='windows.html#current-window'>current window</a>."
1075              },
1076              "index": {
1077                "type": "integer",
1078                "minimum": 0,
1079                "optional": true,
1080                "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."
1081              },
1082              "url": {
1083                "type": "string",
1084                "optional": true,
1085                "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."
1086              },
1087              "selected": {
1088                "type": "boolean",
1089                "optional": true,
1090                "description": "Whether the tab should become the selected tab in the window. Defaults to <var>true</var>"
1091              },
1092              "pinned": {
1093                "type": "boolean",
1094                "optional": true,
1095                "description": "Whether the tab should be pinned. Defaults to <var>false</var>"
1096              }
1097            }
1098          },
1099          {
1100            "type": "function",
1101            "name": "callback",
1102            "optional": true,
1103            "parameters": [
1104              {
1105                "name": "tab",
1106                "$ref": "Tab",
1107                "description": "Details about the created tab. Will contain the ID of the new tab."
1108              }
1109            ]
1110          }
1111        ]
1112      },
1113      {
1114        "name": "update",
1115        "type": "function",
1116        "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.",
1117        "parameters": [
1118          {"type": "integer", "name": "tabId", "minimum": 0},
1119          {
1120            "type": "object",
1121            "name": "updateProperties",
1122            "properties": {
1123              "url": {
1124                "optional": true,
1125                "description": "A URL to navigate the tab to."
1126              },
1127              "selected": {
1128                "type": "boolean", 
1129                "optional": true,
1130                "description": "Whether the tab should be selected."
1131              },
1132              "pinned": {
1133                "type": "boolean", 
1134                "optional": true,
1135                "description": "Whether the tab should be pinned."
1136              }
1137            }
1138          },
1139          {
1140            "type": "function",
1141            "name": "callback",
1142            "optional": true,
1143            "parameters": [
1144              {
1145                "name": "tab",
1146                "$ref": "Tab",
1147                "description": "Details about the updated tab."
1148              }
1149            ]
1150          }
1151        ]
1152      },
1153      {
1154        "name": "move",
1155        "type": "function",
1156        "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.",
1157        "parameters": [
1158          {"type": "integer", "name": "tabId", "minimum": 0},
1159          {
1160            "type": "object",
1161            "name": "moveProperties",
1162            "properties": {
1163              "windowId": {
1164                "type": "integer",
1165                "minimum": 0,
1166                "optional": true,
1167                "description": "Defaults to the window the tab is currently in."
1168              },
1169              "index": {
1170                "type": "integer",
1171                "minimum": 0,
1172                "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."
1173              }
1174            }
1175          },
1176          {
1177            "type": "function",
1178            "name": "callback",
1179            "optional": true,
1180            "parameters": [
1181              {
1182                "name": "tab",
1183                "$ref": "Tab",
1184                "description": "Details about the moved tab."
1185              }
1186            ]
1187          }
1188        ]
1189      },
1190      {
1191        "name": "remove",
1192        "type": "function",
1193        "description": "Closes a tab.",
1194        "parameters": [
1195          {"type": "integer", "name": "tabId", "minimum": 0},
1196          {"type": "function", "name": "callback", "optional": true, "parameters": []}
1197        ]
1198      },
1199      {
1200        "name": "detectLanguage",
1201        "type": "function",
1202        "description": "Detects the primary language of the content in a tab.",
1203        "parameters": [
1204          {
1205            "type": "integer",
1206            "name": "tabId",
1207            "minimum": 0,
1208            "optional": true,
1209            "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
1210          },
1211          {
1212            "type": "function",
1213            "name": "callback",
1214            "parameters": [
1215              {
1216                "type": "string",
1217                "name": "language",
1218                "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."
1219              }
1220            ]
1221          }
1222        ]
1223      },
1224      {
1225        "name": "captureVisibleTab",
1226        "type": "function",
1227        "description": "Captures the visible area of the currently selected tab in the specified window.",
1228        "parameters": [
1229          {
1230            "type": "integer",
1231            "name": "windowId",
1232            "minimum": 0,
1233            "optional": true,
1234            "description": "The target window. Defaults to the <a href='windows.html#current-window'>current window</a>."
1235          },
1236          {
1237            "type": "object",
1238            "name": "options",
1239            "optional": true,
1240            "min_version": "5.0.372.0",
1241            "description": "Set parameters of image capture, such as the format of the resulting image.",
1242            "properties": {
1243              "format": {
1244                "type": "string",
1245                "optional": true,
1246                "enum": ["jpeg", "png"],
1247                "description": "The format of the resulting image.  Default is jpeg."
1248              },
1249              "quality": {
1250                "type": "integer",
1251                "name": "quality",
1252                "optional": true,
1253                "minimum": 0,
1254                "maximum": 100,
1255                "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."
1256              }
1257            }
1258          },
1259          {
1260            "type": "function", "name": "callback", "parameters": [
1261              {"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."}
1262            ]
1263          }
1264        ]
1265      },
1266      {
1267        "name": "executeScript",
1268        "type": "function",
1269        "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.",
1270        "parameters": [
1271          {"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."},
1272          {
1273            "type": "object",
1274            "name": "details",
1275            "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.",
1276            "properties": {
1277              "code": {"type": "string", "optional": true, "description": "JavaScript code to execute."},
1278              "file": {"type": "string", "optional": true, "description": "JavaScript file to execute."},
1279              "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."}
1280            }
1281          },
1282          {
1283            "type": "function",
1284            "name": "callback",
1285            "optional": true,
1286            "description": "Called after all the JavaScript has been executed.",
1287            "parameters": []
1288          }
1289        ]
1290      },
1291      {
1292        "name": "insertCSS",
1293        "type": "function",
1294        "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.",
1295        "parameters": [
1296          {"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."},
1297          {
1298            "type": "object",
1299            "name": "details",
1300            "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.",
1301            "properties": {
1302              "code": {"type": "string", "optional": true, "description": "CSS code to be injected."},
1303              "file": {"type": "string", "optional": true, "description": "CSS file to be injected."},
1304              "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."}
1305            }
1306          },
1307          {
1308            "type": "function",
1309            "name": "callback",
1310            "optional": true,
1311            "description": "Called when all the CSS has been inserted.",
1312            "parameters": []
1313          }
1314        ]
1315      }
1316    ],
1317    "events": [
1318      {
1319        "name": "onCreated",
1320        "type": "function",
1321        "description": "Fires when a tab is created.",
1322        "parameters": [
1323          {
1324            "$ref": "Tab",
1325            "name": "tab",
1326            "description": "Details of the tab that was created."
1327          }
1328        ]
1329      },
1330      {
1331        "name": "onUpdated",
1332        "type": "function",
1333        "description": "Fires when a tab is updated.",
1334        "parameters": [
1335          {"type": "integer", "name": "tabId", "minimum": 0},
1336          {
1337            "type": "object",
1338            "name": "changeInfo",
1339            "description": "Lists the changes to the state of the tab that was updated.",
1340            "properties": {
1341              "status": {
1342                "type": "string",
1343                "optional": true,
1344                "description": "The status of the tab. Can be either <em>loading</em> or <em>complete</em>."
1345              },
1346              "url": {
1347                "type": "string",
1348                "optional": true,
1349                "description": "The tab's URL if it has changed."
1350              },
1351              "pinned": {
1352                "type": "boolean",
1353                "optional": true,
1354                "description": "The tab's new pinned state."
1355              }
1356            }
1357          },
1358          {
1359            "$ref": "Tab",
1360            "name": "tab",
1361            "description": "Gives the state of the tab that was updated."
1362          }
1363        ]
1364      },
1365      {
1366        "name": "onMoved",
1367        "type": "function",
1368        "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>.",
1369        "parameters": [
1370          {"type": "integer", "name": "tabId", "minimum": 0},
1371          {
1372            "type": "object",
1373            "name": "moveInfo",
1374            "properties": {
1375              "windowId": {"type": "integer", "minimum": 0},
1376              "fromIndex": {"type": "integer", "minimum": 0},
1377              "toIndex": {"type": "integer", "minimum": 0}
1378            }
1379          }
1380        ]
1381      },
1382      {
1383        "name": "onSelectionChanged",
1384        "type": "function",
1385        "description": "Fires when the selected tab in a window changes.",
1386        "parameters": [
1387          {
1388            "type": "integer",
1389            "name": "tabId",
1390            "minimum": 0,
1391            "description": "The ID of the tab that has become selected."
1392          },
1393          {
1394            "type": "object",
1395            "name": "selectInfo",
1396            "properties": {
1397              "windowId": {
1398                "type": "integer",
1399                "minimum": 0,
1400                "description": "The ID of the window the selected tab changed inside of."
1401              }
1402            }
1403          }
1404        ]
1405      },
1406      {
1407        "name": "onDetached",
1408        "type": "function",
1409        "description": "Fired when a tab is detached from a window, for example because it is being moved between windows.",
1410        "parameters": [
1411          {"type": "integer", "name": "tabId", "minimum": 0},
1412          {
1413            "type": "object",
1414            "name": "detachInfo",
1415            "properties": {
1416              "oldWindowId": {"type": "integer", "minimum": 0},
1417              "oldPosition": {"type": "integer", "minimum": 0}
1418            }
1419          }
1420        ]
1421      },
1422      {
1423        "name": "onAttached",
1424        "type": "function",
1425        "description": "Fired when a tab is attached to a window, for example because it was moved between windows.",
1426        "parameters": [
1427          {"type": "integer", "name": "tabId", "minimum": 0},
1428          {
1429            "type": "object",
1430            "name": "attachInfo",
1431            "properties": {
1432              "newWindowId": {"type": "integer", "minimum": 0},
1433              "newPosition": {"type": "integer", "minimum": 0}
1434            }
1435          }
1436        ]
1437      },
1438      {
1439        "name": "onRemoved",
1440        "type": "function",
1441        "description": "Fires when a tab is closed.",
1442        "parameters": [
1443          {"type": "integer", "name": "tabId", "minimum": 0},
1444          { 
1445            "type": "object",
1446            "name": "removeInfo",
1447            "properties": {
1448              "isWindowClosing": {"type": "boolean", "description": "True when the tab is being closed because its window is being closed." }
1449            }            
1450          }          
1451        ]
1452      }
1453    ]
1454  },
1455  {
1456    "namespace": "pageActions",
1457    "nodoc": true,
1458    "types": [],
1459    "functions": [
1460      {
1461        "name": "enableForTab",
1462        "type": "function",
1463        "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.",
1464        "parameters": [
1465          {"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)."},
1466          {
1467            "type": "object",
1468            "name": "action",
1469            "description": "An object specifing what action should be applied to the page action. Contains the following properties:",
1470            "properties": {
1471              "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to enable the page action."},
1472              "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."},
1473              "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."},
1474              "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."}
1475            },
1476            "optional": false
1477          }
1478        ]
1479      },
1480      {
1481        "name": "disableForTab",
1482        "type": "function",
1483        "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.",
1484        "parameters": [
1485          {"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)."},
1486          {
1487            "type": "object",
1488            "name": "action",
1489            "description": "An object specifying what action should be applied to the page action. Contains the following properties:",
1490            "properties": {
1491              "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to disable the page action."},
1492              "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."}
1493            },
1494            "optional": false
1495          }
1496        ]
1497      }
1498    ],
1499    "events": []
1500  },
1501  {
1502    "namespace": "pageAction",
1503    "types": [],
1504    "functions": [
1505      {
1506        "name": "show",
1507        "type": "function",
1508        "description": "Shows the page action. The page action is shown whenever the tab is selected.",
1509        "parameters": [
1510          {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
1511        ]
1512      },
1513      {
1514        "name": "hide",
1515        "type": "function",
1516        "description": "Hides the page action.",
1517        "parameters": [
1518          {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
1519        ]
1520      },
1521      {
1522        "name": "setTitle",
1523        "type": "function",
1524        "description": "Sets the title of the page action. This is displayed in a tooltip over the page action.",
1525        "parameters": [
1526          {
1527            "name": "details",
1528            "type": "object",
1529            "properties": {
1530              "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
1531              "title": {"type": "string", "description": "The tooltip string."}
1532            }
1533          }
1534        ]
1535      },
1536      {
1537        "name": "setIcon",
1538        "type": "function",
1539        "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.",
1540        "parameters": [
1541          {
1542            "name": "details",
1543            "type": "object",
1544            "properties": {
1545              "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
1546              "imageData": {
1547                "type": "object",
1548                "isInstanceOf": "ImageData",
1549                "properties": {},
1550                "additionalProperties": { "type": "any" },
1551                "description": "Pixel data for an image. Must be an ImageData object (for example, from a canvas element).",
1552                "optional": true
1553              },
1554              "path": {
1555                "type": "string",
1556                "description": "Relative path to an image in the extension to show in the browser action.",
1557                "optional": true
1558              },
1559              "iconIndex": {
1560                "type": "integer",
1561                "minimum": 0,
1562                "description": "<b>Deprecated.</b> The zero-based index into the <b>icons</b> vector specified in the manifest.",
1563                "optional": true
1564              }
1565            }
1566          }
1567        ]
1568      },
1569      {
1570        "name": "setPopup",
1571        "type": "function",
1572        "description": "Sets the html document to be opened as a popup when the user clicks on the page action's icon.",
1573        "min_version": "5.0.308.0",
1574        "parameters": [
1575          {
1576            "name": "details",
1577            "type": "object",
1578            "properties": {
1579              "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
1580              "popup": {
1581                "type": "string",
1582                "description": "The html file to show in a popup.  If set to the empty string (''), no popup is shown."
1583              }
1584            }
1585          }
1586        ]
1587      }
1588    ],
1589    "events": [
1590      {
1591        "name": "onClicked",
1592        "type": "function",
1593        "description": "Fired when a page action icon is clicked.  This event will not fire if the page action has a popup.",
1594        "parameters": [
1595          {
1596            "name": "tab",
1597            "$ref": "Tab"
1598          }
1599        ]
1600      }
1601    ]
1602  },
1603  {
1604    "namespace": "browserAction",
1605    "types": [],
1606    "functions": [
1607      {
1608        "name": "setTitle",
1609        "type": "function",
1610        "description": "Sets the title of the browser action. This shows up in the tooltip.",
1611        "parameters": [
1612          {
1613            "name": "details",
1614            "type": "object",
1615            "properties": {
1616              "title": {
1617                "type": "string",
1618                "description": "The string the browser action should display when moused over."
1619              },
1620              "tabId": {
1621                "type": "integer",
1622                "optional": true,
1623                "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
1624              }
1625            }
1626          }
1627        ]
1628      },
1629      {
1630        "name": "setIcon",
1631        "type": "function",
1632        "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.",
1633        "parameters": [
1634          {
1635            "name": "details",
1636            "type": "object",
1637            "properties": {
1638              "imageData": {
1639                "type": "object",
1640                "isInstanceOf": "ImageData",
1641                "properties": {},
1642                "additionalProperties": { "type": "any" },
1643                "description": "Pixel data for an image. Must be an ImageData object (for example, from a <code>canvas</code> element).",
1644                "optional": true
1645              },
1646              "path": {
1647                "type": "string",
1648                "description": "Relative path to an image in the extension to show in the browser action.",
1649                "optional": true
1650              },
1651              "tabId": {
1652                "type": "integer",
1653                "optional": true,
1654                "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
1655              }
1656            }
1657          }
1658        ]
1659      },
1660      {
1661        "name": "setPopup",
1662        "type": "function",
1663        "min_version": "5.0.316.0",
1664        "description": "Sets the html document to be opened as a popup when the user clicks on the browser action's icon.",
1665        "parameters": [
1666          {
1667            "name": "details",
1668            "type": "object",
1669            "properties": {
1670              "tabId": {
1671                "type": "integer",
1672                "optional": true,
1673                "minimum": 0,
1674                "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
1675              },
1676              "popup": {
1677                "type": "string",
1678                "description": "The html file to show in a popup.  If set to the empty string (''), no popup is shown."
1679              }
1680            }
1681          }
1682        ]
1683      },
1684      {
1685        "name": "setBadgeText",
1686        "type": "function",
1687        "description": "Sets the badge text for the browser action. The badge is displayed on top of the icon.",
1688        "parameters": [
1689          {
1690            "name": "details",
1691            "type": "object",
1692            "properties": {
1693              "text": {
1694                "type": "string",
1695                "description": "Any number of characters can be passed, but only about four can fit in the space."
1696              },
1697              "tabId": {
1698                "type": "integer",
1699                "optional": true,
1700                "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
1701              }
1702            }
1703          }
1704        ]
1705      },
1706      {
1707        "name": "setBadgeBackgroundColor",
1708        "type": "function",
1709        "description": "Sets the background color for the badge.",
1710        "parameters": [
1711          {
1712            "name": "details",
1713            "type": "object",
1714            "properties": {
1715              "color": {
1716                "type": "array",
1717                "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>.",
1718                "items": {
1719                  "type": "integer",
1720                  "minimum": 0,
1721                  "maximum": 255
1722                },
1723                "minItems": 4,
1724                "maxItems": 4
1725              },
1726              "tabId": {
1727                "type": "integer",
1728                "optional": true,
1729                "description": "Limits the change to when a particular tab is selected. Automatically resets when the tab is closed."
1730              }
1731            }
1732          }
1733        ]
1734      }
1735    ],
1736    "events": [
1737      {
1738        "name": "onClicked",
1739        "type": "function",
1740        "description": "Fired when a browser action icon is clicked.  This event will not fire if the browser action has a popup.",
1741        "parameters": [
1742          {
1743            "name": "tab",
1744            "$ref": "Tab"
1745          }
1746        ]
1747      }
1748    ]
1749  },
1750  {
1751    "namespace": "experimental.infobars",
1752    "types": [],
1753    "functions": [
1754      {
1755        "name": "show",
1756        "type": "function",
1757        "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.",
1758        "parameters": [
1759          {
1760            "name": "details",
1761            "type": "object",
1762            "properties": {
1763              "tabId": {
1764                "type": "integer",
1765                "description": "The tab id for the tab to display the infobar in."
1766              },
1767              "path": {
1768                "type": "string",
1769                "description": "The html file that contains the infobar."
1770              }
1771            }
1772          },
1773          {
1774            "type": "function",
1775            "name": "callback",
1776            "optional": true,
1777            "parameters": [
1778              {
1779                "name": "window", "$ref": "Window", "description": "Contains details about the window in which the infobar was created."
1780              }
1781            ]
1782          }
1783        ]
1784      }
1785    ]
1786  },
1787  {
1788    "namespace": "bookmarks",
1789    "types": [
1790      {
1791        "id": "BookmarkTreeNode",
1792        "type": "object",
1793        "description": "A node (either a bookmark or a folder) in the bookmark tree.  Child nodes are ordered within their parent folder.",
1794        "properties": {
1795          "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."},
1796          "parentId": {"type": "string", "minimum": 0, "optional": true, "description": "The <code>id</code> of the parent folder.  Omitted for the root node."},
1797          "index": {"type": "integer", "optional": true, "description": "The 0-based position of this node within its parent folder."},
1798          "url": {"type": "string", "optional": true, "description": "The URL navigated to when a user clicks the bookmark. Omitted for folders."},
1799          "title": {"type": "string", "description": "The text displayed for the node."},
1800          "dateAdded": {"type": "number", "optional": true, "description": "When this node was created, in milliseconds since the epoch (<code>new Date(dateAdded)</code>)."},
1801          "dateGroupModified": {"type": "number", "optional": true, "description": "When the contents of this folder last changed, in milliseconds since the epoch."},
1802          "children": {"type": "array", "optional": true, "items": {"$ref": "BookmarkTreeNode"}, "description": "An ordered list of children of this node."}
1803        }
1804      }
1805    ],
1806    "functions": [
1807      {
1808        "name": "get",
1809        "type": "function",
1810        "description": "Retrieves the specified BookmarkTreeNode(s).",
1811        "parameters": [
1812          {
1813            "name": "idOrIdList",
1814            "description": "A single string-valued id, or an array of string-valued ids",
1815            "choices": [
1816              {"type": "string"},
1817              {"type": "array", "items": {"type": "string"}, "minItems": 1}
1818            ]
1819          },
1820          {
1821            "type": "function",
1822            "name": "callback",
1823            "parameters": [
1824              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
1825            ]
1826          }
1827        ]
1828      },
1829      {
1830        "name": "getChildren",
1831        "type": "function",
1832        "description": "Retrieves the children of the specified BookmarkTreeNode id.",
1833        "parameters": [
1834          {"type": "string", "name": "id"},
1835          {
1836            "type": "function",
1837            "name": "callback",
1838            "parameters": [
1839              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
1840            ]
1841          }
1842        ]
1843      },
1844      {
1845        "name": "getRecent",
1846        "type": "function",
1847        "description": "Retrieves the recently added bookmarks.",
1848        "parameters": [
1849          {
1850            "type": "integer",
1851            "minimum": 1,
1852            "name": "numberOfItems",
1853            "description": "The maximum number of items to return."
1854          },
1855          {
1856            "type": "function",
1857            "name": "callback",
1858            "parameters": [
1859              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
1860            ]
1861          }
1862        ]
1863      },
1864      {
1865        "name": "getTree",
1866        "type": "function",
1867        "description": "Retrieves the entire Bookmarks hierarchy.",
1868        "parameters": [
1869          {
1870            "type": "function",
1871            "name": "callback",
1872            "parameters": [
1873              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
1874            ]
1875          }
1876        ]
1877      },
1878      {
1879        "name": "search",
1880        "type": "function",
1881        "description": "Searches for BookmarkTreeNodes matching the given query.",
1882        "parameters": [
1883          {"type": "string", "name": "query"},
1884          {
1885            "type": "function",
1886            "name": "callback",
1887            "parameters": [
1888              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
1889            ]
1890          }
1891        ]
1892      },
1893      {
1894        "name": "create",
1895        "type": "function",
1896        "description": "Creates a bookmark or folder under the specified parentId.  If url is NULL or missing, it will be a folder.",
1897        "parameters": [
1898          {
1899            "type": "object",
1900            "name": "bookmark",
1901            "properties": {
1902              "parentId": {"type": "string"},
1903              "index": {"type": "integer", "minimum": 0, "optional": true},
1904              "title": {"type": "string", "optional": true},
1905              "url": {"type": "string", "optional": true}
1906            }
1907          },
1908          {
1909            "type": "function",
1910            "name": "callback",
1911            "optional": true,
1912            "parameters": [
1913              {"name": "result", "$ref": "BookmarkTreeNode" }
1914            ]
1915          }
1916        ]
1917      },
1918      {
1919        "name": "move",
1920        "type": "function",
1921        "description": "Moves the specified BookmarkTreeNode to the provided location.",
1922        "parameters": [
1923          {"type": "string", "name": "id"},
1924          {
1925            "type": "object",
1926            "name": "destination",
1927            "properties": {
1928              "parentId": {"type": "string"},
1929              "index": {"type": "integer", "minimum": 0, "optional": true}
1930            }
1931          },
1932          {
1933            "type": "function",
1934            "name": "callback",
1935            "optional": true,
1936            "parameters": [
1937              {"name": "result", "$ref": "BookmarkTreeNode" }
1938            ]
1939          }
1940        ]
1941      },
1942      {
1943        "name": "update",
1944        "type": "function",
1945        "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.",
1946        "parameters": [
1947          {"type": "string", "name": "id"},
1948          {
1949            "type": "object",
1950            "name": "changes",
1951            "properties": {
1952              "title": {"type": "string", "optional": true},
1953              "url": {"type": "string", "optional": true}
1954            }
1955          },
1956          {
1957            "type": "function",
1958            "name": "callback",
1959            "optional": true,
1960            "parameters": [
1961              {"name": "result", "$ref": "BookmarkTreeNode" }
1962            ]
1963          }
1964        ]
1965      },
1966      {
1967        "name": "remove",
1968        "type": "function",
1969        "description": "Removes a bookmark or an empty bookmark folder.",
1970        "parameters": [
1971          {"type": "string", "name": "id"},
1972          {"type": "function", "name": "callback", "optional": true, "parameters": []}
1973        ]
1974      },
1975      {
1976        "name": "removeTree",
1977        "type": "function",
1978        "description": "Recursively removes a bookmark folder.",
1979        "parameters": [
1980          {"type": "string", "name": "id"},
1981          {"type": "function", "name": "callback", "optional": true, "parameters": []}
1982        ]
1983      },
1984      {
1985        "name": "import",
1986        "type": "function",
1987        "description": "Imports bookmarks from a chrome html bookmark file",
1988        "nodoc": "true",
1989        "parameters": [
1990          {"type": "function", "name": "callback", "optional": true, "parameters": []}
1991        ]
1992      },
1993      {
1994        "name": "export",
1995        "type": "function",
1996        "description": "Exports bookmarks to a chrome html bookmark file",
1997        "nodoc": "true",
1998        "parameters": [
1999          {"type": "function", "name": "callback", "optional": true, "parameters": []}
2000        ]
2001      }
2002    ],
2003    "events": [
2004      {
2005        "name": "onCreated",
2006        "type": "function",
2007        "description": "Fired when a bookmark or folder is created.",
2008        "parameters": [
2009          {"type": "string", "name": "id"},
2010          {
2011            "$ref": "BookmarkTreeNode",
2012            "name": "bookmark"
2013          }
2014        ]
2015      },
2016      {
2017        "name": "onRemoved",
2018        "type": "function",
2019        "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.",
2020        "parameters": [
2021          {"type": "string", "name": "id"},
2022          {
2023            "type": "object",
2024            "name": "removeInfo",
2025            "properties": {
2026              "parentId": { "type": "string" },
2027              "index": { "type": "integer" }
2028            }
2029          }
2030        ]
2031      },
2032      {
2033        "name": "onChanged",
2034        "type": "function",
2035        "description": "Fired when a bookmark or folder changes.  <b>Note:</b> Currently, only title and url changes trigger this.",
2036        "parameters": [
2037          {"type": "string", "name": "id"},
2038          {
2039            "type": "object",
2040            "name": "changeInfo",
2041            "properties": {
2042              "title": {"type": "string"},
2043              "url": {"type": "string", "optional": true}
2044            }
2045          }
2046        ]
2047      },
2048      {
2049        "name": "onMoved",
2050        "type": "function",
2051        "description": "Fired when a bookmark or folder is moved to a different parent folder.",
2052        "parameters": [
2053          {"type": "string", "name": "id"},
2054          {
2055            "type": "object",
2056            "name": "moveInfo",
2057            "properties": {
2058              "parentId": { "type": "string" },
2059              "index": { "type": "integer" },
2060              "oldParentId": { "type": "string" },
2061              "oldIndex": { "type": "integer" }
2062            }
2063          }
2064        ]
2065      },
2066      {
2067        "name": "onChildrenReordered",
2068        "type": "function",
2069        "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().",
2070        "parameters": [
2071          {"type": "string", "name": "id"},
2072          {
2073            "type": "object",
2074            "name": "reorderInfo",
2075            "properties": {
2076              "childIds": { "type": "array", "items": { "type": "string" } }
2077            }
2078          }
2079        ]
2080      },
2081      {
2082        "name": "onImportBegan",
2083        "type": "function",
2084        "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.",
2085        "parameters": []
2086      },
2087      {
2088        "name": "onImportEnded",
2089        "type": "function",
2090        "description": "Fired when a bookmark import session is ended.",
2091        "parameters": []
2092      }
2093    ]
2094  },
2095  {
2096    "namespace": "history",
2097    "types": [
2098      {
2099        "id": "HistoryItem",
2100        "type": "object",
2101        "description": "An object encapsulating one result of a history query.",
2102        "properties": {
2103          "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
2104          "url": {"type": "string", "optional": true, "description": "The URL navigated to by a user."},
2105          "title": {"type": "string", "optional": true, "description": "The title of the history page."},
2106          "lastVisitTime": {"type": "number", "optional": true, "description": "When this page was last loaded, represented in milliseconds since the epoch."},
2107          "visitCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page."},
2108          "typedCount": {"type": "integer", "optional": true, "description": "The number of times the user has navigated to this page by typing in the address."}
2109        }
2110      },
2111      {
2112        "id": "VisitItem",
2113        "type": "object",
2114        "description": "An object encapsulating one visit to a URL.",
2115        "properties": {
2116          "id": {"type": "string", "minimum": 0, "description": "The unique identifier for the item."},
2117          "visitId": {"type": "string", "description": "The unique identifier for this visit."},
2118          "visitTime": {"type": "number", "optional": true, "description": "When this visit occurred, represented in milliseconds since the epoch."},
2119          "referringVisitId": {"type": "string", "description": "The visit_id of the referrer."},
2120          "transition": {
2121            "type": "string",
2122            "enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"],
2123            "description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."
2124          }
2125        }
2126      }
2127    ],
2128    "functions": [
2129      {
2130        "name": "search",
2131        "type": "function",
2132        "description": "Search the history for the last visit time of each page matching the query.",
2133        "parameters": [
2134          {
2135            "name": "query",
2136            "type": "object",
2137            "properties": {
2138              "text": {"type": "string", "description": "A free-text query to the history service.  Leave empty to retrieve all pages."},
2139              "startTime": {"type": "number", "optional": true, "description": "Limit results to those visited after this date, represented in milliseconds since the epoch."},
2140              "endTime": {"type": "number", "optional": true, "description": "Limit results to those visited before this date, represented in milliseconds since the epoch."},
2141              "maxResults": {"type": "integer", "optional": true, "minimum": 0, "description": "The maximum number of results to retrieve.  Defaults to 100."}
2142            }
2143          },
2144          {
2145            "name": "callback",
2146            "type": "function",
2147            "parameters": [
2148              { "name": "results", "type": "array", "items": { "$ref": "HistoryItem"} }
2149            ]
2150          }
2151        ]
2152      },
2153      {
2154        "name": "getVisits",
2155        "type": "function",
2156        "description": "Retrieve information about visits to a URL.",
2157        "parameters": [
2158          {
2159            "name": "details",
2160            "type": "object",
2161            "properties": {
2162              "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."}
2163            }
2164          },
2165          {
2166            "name": "callback",
2167            "type": "function",
2168            "parameters": [
2169              { "name": "results", "type": "array", "items": { "$ref": "VisitItem"} }
2170            ]
2171          }
2172        ]
2173      },
2174      {
2175        "name": "addUrl",
2176        "type": "function",
2177        "description": "Adds a URL to the history at the current time with a <a href='#transition_types'>transition type</a> of \"link\".",
2178        "parameters": [
2179          {
2180            "name": "details",
2181            "type": "object",
2182            "properties": {
2183              "url": {"type": "string", "description": "The URL to add."}
2184            }
2185          }
2186        ]
2187      },
2188      {
2189        "name": "deleteUrl",
2190        "type": "function",
2191        "description": "Removes all occurrences of the given URL from the history.",
2192        "parameters": [
2193          {
2194            "name": "details",
2195            "type": "object",
2196            "properties": {
2197              "url": {"type": "string", "description": "The URL to remove."}
2198            }
2199          }
2200        ]
2201      },
2202      {
2203        "name": "deleteRange",
2204        "type": "function",
2205        "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.",
2206        "parameters": [
2207          {
2208            "name": "range",
2209            "type": "object",
2210            "properties": {
2211              "startTime": { "type": "number", "description": "Items added to history after this date, represented in milliseconds since the epoch." },
2212              "endTime": { "type": "number", "description": "Items added to history before this date, represented in milliseconds since the epoch." }
2213            }
2214          },
2215          {
2216            "name": "callback", "type": "function", "parameters": []
2217          }
2218        ]
2219      },
2220      {
2221        "name": "deleteAll",
2222        "type": "function",
2223        "description": "Deletes all items from the history.",
2224        "parameters": [
2225          {
2226            "name": "callback", "type": "function", "parameters": []
2227          }
2228        ]
2229      }
2230    ],
2231    "events": [
2232      {
2233        "name": "onVisited",
2234        "type": "function",
2235        "description": "Fired when a URL is visited, providing the HistoryItem data for that URL.",
2236        "parameters": [
2237          { "name": "result", "$ref": "HistoryItem"}
2238        ]
2239      },
2240      {
2241        "name": "onVisitRemoved",
2242        "type": "function",
2243        "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.",
2244        "parameters": [
2245          {
2246            "name": "removed",
2247            "type": "object",
2248            "properties": {
2249              "allHistory": { "type": "boolean", "description": "True if all history was removed.  If true, then urls will be empty." },
2250              "urls": { "type": "array", "items": { "type": "string" }, "optional": true}
2251            }
2252          }
2253        ]
2254      }
2255    ]
2256  },
2257  {
2258    "namespace": "idle",
2259    "types": [],
2260    "functions": [
2261      {
2262        "name": "queryState",
2263        "type": "function",
2264        "description": "Returns the current state of the browser.",
2265        "parameters": [
2266          {
2267            "name": "thresholdSeconds",
2268            "type": "integer",
2269            "minimum": 15,
2270            "description": "Threshold, in seconds, used to determine when a machine is in the idle state."
2271          },
2272          {
2273            "name": "callback",
2274            "type": "function",
2275            "parameters": [
2276              {
2277                "name": "newState",
2278                "type": "string",
2279                "enum": ["active", "idle", "locked"]
2280              }
2281            ]
2282          }
2283        ]
2284      }
2285    ],
2286    "events": [
2287      {
2288        "name": "onStateChanged",
2289        "type": "function",
2290        "description": "Fired when the browser changes to an active state.  Currently only reports the transition from idle to active.",
2291        "parameters": [
2292          {
2293            "name": "newState",
2294            "type": "string",
2295            "enum": ["active"]
2296          }
2297        ]
2298      }
2299    ]
2300  },
2301  {
2302    "namespace": "i18n",
2303    "unprivileged": true,
2304    "types": [],
2305    "functions": [
2306      {
2307        "name": "getAcceptLanguages",
2308        "type": "function",
2309        "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>.",
2310        "parameters": [
2311          {
2312            "type": "function",
2313            "name": "callback",
2314            "parameters": [
2315              {"name": "languages", "type": "array", "items": {"type": "string"}, "description": "Array of the accept languages of the browser, such as en-US,en,zh-CN"}
2316            ]
2317          }
2318        ]
2319      },
2320      {
2321        "name": "getMessage",
2322        "type": "function",
2323        "unprivileged": true,
2324        "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>.",
2325        "parameters": [
2326          { "type": "string",
2327            "name": "messageName",
2328            "description": "The name of the message, as specified in the <a href='i18n-messages.html'><code>messages.json</code></a> file."
2329          },
2330          {
2331            "choices": [
2332              { "type": "string" },
2333              {
2334                "type": "array",
2335                "items": { "type": "string" },
2336                "minItems": 1,
2337                "maxItems": 9
2338              }
2339            ],
2340            "name": "substitutions",
2341            "optional": true,
2342            "description": "1 - 9 substitution strings, if the message requires any."
2343          }
2344        ],
2345        "returns": {
2346          "type": "string",
2347          "description": "Message localized for current locale."
2348        }
2349      }
2350    ],
2351    "events": []
2352  },
2353  {
2354    "namespace": "experimental.input",
2355    "nodoc": true,
2356    "types": [],
2357    "functions": [
2358      {
2359        "name": "sendKeyboardEvent",
2360        "type": "function",
2361        "description": "Send a keyboard event to Chrome.",
2362        "parameters": [
2363          { "type": "object",
2364            "name": "event",
2365            "properties": {
2366              "type": {
2367                "type": "string",
2368                "description": "One of 'keyup' or 'keydown'."
2369              },
2370              "keyIdentifier": {
2371                "type": "string",
2372                "description": "See http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/keyset.html#KeySet-Set"
2373              },
2374              "altKey": {
2375                "type": "boolean",
2376                "optional": true,
2377                "description": "Whether or not the ALT key is pressed."
2378              },
2379              "ctrlKey": {
2380                "type": "boolean",
2381                "optional": true,
2382                "description": "Whether or not the CTRL key is pressed."
2383              },
2384              "metaKey": {
2385                "type": "boolean",
2386                "optional": true,
2387                "description": "Whether or not the META key is pressed."
2388              },
2389              "shiftKey": {
2390                "type": "boolean",
2391                "optional": true,
2392                "description": "Whether or not the SHIFT key is pressed."
2393              }
2394            },
2395            "description": "The keyboard event to be sent."
2396          },
2397          { "type": "function",
2398            "name": "callback",
2399            "optional": true,
2400            "description": "This function is called when the event processing is completed.",
2401            "parameters": []
2402          }
2403        ]
2404      }
2405    ],
2406    "events": []
2407  },
2408  {
2409    "namespace": "experimental.popup",
2410    "nodoc": true,
2411    "types": [],
2412    "functions": [
2413      {
2414        "name": "show",
2415        "type": "function",
2416        "description": "Displays a pop-up window hosting an extension view.",
2417        "parameters": [
2418          {
2419            "type": "string",
2420            "name": "url",
2421            "description": "The URL of the contents to which the pop-up will be navigated."
2422          },
2423          {
2424            "type": "object",
2425            "name": "showDetails",
2426            "properties": {
2427              "relativeTo": {
2428                "type": "object",
2429                "properties": {},
2430                "additionalProperties": { "type": "any" },
2431                "isInstanceOf": "HTMLElement",
2432                "description": "A HTML DOM object to which the pop-up's position will be made relative."
2433              },
2434              "giveFocus": {
2435                "type": "boolean",
2436                "description": "Pass true to give the focus to the popup window.  The default behaviour is true.",
2437                "optional": true
2438              },
2439              "borderStyle": {
2440                "type": "string",
2441                "description": "Pass 'bubble' to give the pop-up window a bubble-chrome border, including an arrow pointing at the relative-to point.  Pass 'rectangle' to give the pop-up a rectangular black border with drop-shadow.  Default behaviour is to pass 'bubble'.",
2442                "optional": true,
2443                "enum": ["bubble", "rectangle"]
2444              },
2445              "maxSize": {
2446                "type": "object",
2447                "optional": true,
2448                "properties": {
2449                  "width": {
2450                    "type": "integer",
2451                    "description": "The maximal width to which the popup will resize.  If not present, the popup will be no wider than 800 pixels.  The popup will widen to no larger than the minimum of the width parameter and the width of the screen.",
2452                    "optional": true,
2453                    "minimum": 32
2454                  },
2455                  "height": {
2456                    "type": "integer",
2457                    "description": "The maximal height to which the popup will resize.  If not present, the popup will be no taller than 600 pixels.  The popup will grow to no taller than than the minimum of the height parameter and the width of the screen.",
2458                    "optional": true,
2459                    "minimum": 32
2460                  }
2461                }
2462              }
2463            }
2464          },
2465          {
2466            "type": "function",
2467            "name": "callback",
2468            "optional": true,
2469            "parameters": []
2470          }
2471        ]
2472      },
2473      {
2474        "name": "getParentWindow",
2475        "type": "function",
2476        "description": "Returns a reference to the JavaScript 'window' object of the extension view that launched the popup.  Returns undefined if called outside of a popup window.",
2477        "parameters": [],
2478        "returns": {
2479          "type": "object",
2480          "isInstanceOf": "DOMWindow",
2481          "properties": {},
2482          "additionalProperties": { "type": "any" },
2483          "optional": true
2484        }
2485      }
2486    ],
2487    "events": [
2488      {
2489        "name": "onClosed",
2490        "type": "function",
2491        "description": "Fired when the popup view is closed.",
2492        "parameters": []
2493      }
2494    ]
2495  },
2496  {
2497    "namespace": "experimental.bookmarkManager",
2498    "nodoc": true,
2499    "types": [
2500      {
2501        "id": "BookmarkNodeDataElement",
2502        "nodoc": true,
2503        "type": "object",
2504        "properties": {
2505          "id": {
2506            "type": "string",
2507            "optional": true,
2508            "description": "The ID of the bookmark. This is only provided if the data is from the same profile."
2509          },
2510          "parentId": {
2511            "type": "string",
2512            "optional": true,
2513            "description": "The ID of the parent of the bookmark. This is only provided if the data is from the same profile."
2514          },
2515          "title": {"type": "string"},
2516          "url": {
2517            "type": "string",
2518            "optional": true
2519          },
2520          "children": {
2521            "type": "array",
2522            "items": {"$ref": "BookmarkNodeDataElement"}
2523          }
2524        }
2525      },
2526      {
2527        "id": "BookmarkNodeData",
2528        "nodoc": true,
2529        "type": "object",
2530        "description": "Information about the drag and drop data for use with drag and drop events.",
2531        "properties": {
2532          "sameProfile": {"type": "boolean"},
2533          "elements": {
2534            "type": "array",
2535            "items": {"$ref": "BookmarkNodeDataElement"}
2536          }
2537        }
2538      }
2539    ],
2540    "functions": [
2541      {
2542        "name": "copy",
2543        "type": "function",
2544        "description": "Copies the given bookmarks into the clipboard",
2545        "nodoc": "true",
2546        "parameters": [
2547          {
2548            "name": "idList",
2549            "description": "An array of string-valued ids",
2550            "type": "array",
2551            "items": {"type": "string"},
2552            "minItems": 1
2553          },
2554          {"type": "function", "name": "callback", "optional": true, "parameters": []}
2555        ]
2556      },
2557      {
2558        "name": "cut",
2559        "type": "function",
2560        "description": "Cuts the given bookmarks into the clipboard",
2561        "nodoc": "true",
2562        "parameters": [
2563          {
2564            "name": "idList",
2565            "description": "An array of string-valued ids",
2566            "type": "array",
2567            "items": {"type": "string"},
2568            "minItems": 1
2569          },
2570          {"type": "function", "name": "callback", "optional": true, "parameters": []}
2571        ]
2572      },
2573      {
2574        "name": "paste",
2575        "type": "function",
2576        "description": "Pastes bookmarks from the clipboard into the parent folder",
2577        "nodoc": "true",
2578        "parameters": [
2579          {"type": "string", "name": "parentId"},
2580          {"type": "function", "name": "callback", "optional": true, "parameters": []}
2581        ]
2582      },
2583      {
2584        "name": "canPaste",
2585        "type": "function",
2586        "description": "Whether there are any bookmarks that can be pasted",
2587        "nodoc": "true",
2588        "parameters": [
2589          {"type": "string", "name": "parentId", "description": "The ID of the folder to paste into"},
2590          {"type": "function", "name": "callback", "parameters": [
2591            {"type": "boolean"}
2592          ]}
2593        ]
2594      },
2595      {
2596        "name": "sortChildren",
2597        "type": "function",
2598        "description": "Sorts the children of a given folder",
2599        "nodoc": "true",
2600        "parameters": [
2601          {"type": "string", "name": "parentId", "description": "The ID of the folder to sort the children of"}
2602        ]
2603      },
2604      {
2605        "name": "getStrings",
2606        "type": "function",
2607        "description": "Gets the i18n strings for the bookmark manager",
2608        "nodoc": "true",
2609        "parameters": [
2610          {
2611            "type": "function",
2612             "name": "callback",
2613             "parameters": [
2614              {
2615                "type": "object",
2616                "properties": {},
2617                "additionalProperties": {"type": "string"}
2618              }
2619            ]
2620          }
2621        ]
2622      },
2623      {
2624        "name": "startDrag",
2625        "type": "function",
2626        "description": "Begins dragging a set of bookmarks",
2627        "nodoc": "true",
2628        "parameters": [
2629          {
2630            "name": "idList",
2631            "description": "An array of string-valued ids",
2632            "type": "array",
2633            "items": {"type": "string"},
2634            "minItems": 1
2635          }
2636        ]
2637      },
2638      {
2639        "name": "drop",
2640        "type": "function",
2641        "description": "Performs the drop action of the drag and drop session",
2642        "nodoc": "true",
2643        "parameters": [
2644          {
2645            "name": "parentId",
2646            "description": "The ID of the folder that the drop was made",
2647            "type": "string"
2648          },
2649          {
2650            "name": "index",
2651            "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",
2652            "type": "integer",
2653            "minimum": 0,
2654            "optional": true
2655          }
2656        ]
2657      },
2658      {
2659        "name": "getSubtree",
2660        "type": "function",
2661        "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.",
2662        "nodoc": "true",
2663        "parameters": [
2664          {
2665            "name": "id",
2666            "type": "string",
2667            "description": "ID of the root of the tree to pull.  If empty, the entire tree will be returned."
2668          },
2669          {
2670            "name": "foldersOnly",
2671            "type": "boolean",
2672            "description": "Pass true to only return folders."
2673          },
2674          {
2675            "name": "callback",
2676            "type": "function",
2677            "parameters": [
2678              {"name": "results", "type": "array", "items": { "$ref": "BookmarkTreeNode"} }
2679            ]
2680          }
2681        ]
2682      }
2683    ],
2684    "events": [
2685      {
2686        "name": "onDragEnter",
2687        "type": "function",
2688        "description": "Fired when dragging bookmarks over the document",
2689        "parameters": [
2690          {"$ref": "BookmarkNodeData"}
2691        ]
2692      },
2693      {
2694        "name": "onDragLeave",
2695        "type": "function",
2696        "description": "Fired when the drag and drop leaves the document",
2697        "parameters": [
2698          {"$ref": "BookmarkNodeData"}
2699        ]
2700      },
2701      {
2702        "name": "onDrop",
2703        "type": "function",
2704        "description": "Fired when the user drops bookmarks on the document",
2705        "parameters": [
2706          {"$ref": "BookmarkNodeData"}
2707        ]
2708      }
2709    ]
2710  },
2711  {
2712    "namespace": "devtools",
2713    "nodoc": "true",
2714    "types": [],
2715    "functions": [
2716      {
2717        "name": "getTabEvents",
2718        "type": "function",
2719        "description": "Experimental support for timeline API",
2720        "nodoc": "true",
2721        "parameters": [
2722          {
2723            "name": "tab_id",
2724            "type": "integer"
2725          }
2726        ],
2727        "returns": {
2728          "type": "object",
2729          "properties": {},
2730          "additionalProperties": { "type": "any" },
2731          "description": "DevTools tab events object"
2732        }
2733      }
2734    ]
2735  },
2736  {
2737    "namespace": "experimental.processes",
2738    "types": [
2739      {
2740        "id": "Process",
2741        "type": "object",
2742        "description": "An object containing information about one of the browser's processes.",
2743        "properties": {
2744          "id": {
2745            "type": "integer",
2746            "description": "The ID of the process, as provided by the OS."
2747          },
2748          "type": {
2749            "type": "string",
2750            "enum": ["browser", "renderer", "extension", "notification", "plugin", "worker", "nacl", "utility", "gpu", "other"],
2751            "description": "The type of process."
2752          },
2753          "cpu": {
2754            "type": "number",
2755            "description": "The most recent measurement of the process's CPU usage, between 0 and 100%."
2756          },
2757          "network": {
2758            "type": "number",
2759            "description": "The most recent measurement of the process's network usage, in bytes per second."
2760          },
2761          "privateMemory": {
2762            "type": "number",
2763            "description": "The most recent measurement of the process's private memory usage, in bytes."
2764          },
2765          "sharedMemory": {
2766            "type": "number",
2767            "description": "The most recent measurement of the process's shared memory usage, in bytes."
2768          }
2769        }
2770      }
2771    ],
2772    "functions": [
2773      {
2774        "name": "getProcessIdForTab",
2775        "type": "function",
2776        "description": "Returns the ID of the renderer process for the specified tab.",
2777        "parameters": [
2778          {
2779            "name": "tabId",
2780            "type": "integer",
2781            "minimum": 0
2782          },
2783          {
2784            "type": "function",
2785            "name": "callback",
2786            "parameters": [
2787              {
2788                "name": "processId",
2789                "type": "integer",
2790                "description": "Process ID of the tab's renderer process."
2791              }
2792            ]
2793          }
2794        ]
2795      }
2796    ],
2797    "events": [
2798      {
2799        "name": "onUpdated",
2800        "type": "function",
2801        "description": "Fires each time the Task Manager updates its process statistics, providing the dictionary of updated Process objects, indexed by process ID.",
2802        "parameters": [
2803          {
2804            "name": "processes",
2805            "type": "object",
2806            "properties": {},
2807            "additionalProperties": { "$ref": "Process" }
2808          }
2809        ]
2810      }
2811    ]
2812  },
2813  {
2814    "namespace": "contextMenus",
2815    "types": [
2816      {
2817        "id": "OnClickData",
2818        "type": "object",
2819        "description": "Information sent when a context menu item is clicked.",
2820        "properties": {
2821          "menuItemId": {
2822            "type": "integer",
2823            "description": "The ID of the menu item that was clicked."
2824          },
2825          "parentMenuItemId": {
2826            "type": "integer",
2827            "optional": true,
2828            "description": "The parent ID, if any, for the item clicked."
2829          },
2830          "mediaType": {
2831            "type": "string",
2832            "optional": true,
2833            "description": "One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements."
2834          },
2835          "linkUrl": {
2836            "type": "string",
2837            "optional": true,
2838            "description": "If the element is a link, the URL it points to."
2839          },
2840          "srcUrl": {
2841            "type": "string",
2842            "optional": true,
2843            "description": "Will be present for elements with a 'src' URL."
2844          },
2845          "pageUrl": {
2846            "type": "string",
2847            "description": "The URL of the page where the menu item was clicked."
2848          },
2849          "frameUrl": {
2850            "type": "string",
2851            "optional": true,
2852            "description": " The URL of the frame of the element where the context menu was clicked, if it was in a frame."
2853          },
2854          "selectionText": {
2855            "type": "string",
2856            "optional": true,
2857            "description": "The text for the context selection, if any."
2858          },
2859          "editable": {
2860            "type": "string",
2861            "description": "A flag indicating whether the element is editable (text input, textarea, etc.)."
2862          }
2863        }
2864      }
2865    ],
2866    "functions": [
2867      {
2868        "name": "create",
2869        "type": "function",
2870        "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).",
2871        "returns": {
2872          "type": "integer",
2873          "description": "The ID of the newly created item."
2874        },
2875        "parameters": [
2876          {
2877            "type": "object",
2878            "name": "createProperties",
2879            "properties": {
2880              "type": {
2881                "type": "string",
2882                "optional": true,
2883                "description": "The type of menu item - one of 'normal', 'checkbox', 'radio', or 'separator'. Defaults to 'normal' if not specified."
2884              },
2885              "title": {
2886                "type": "string",
2887                "optional": "true",
2888                "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\"."
2889              },
2890              "checked": {
2891                "type": "boolean",
2892                "optional": true,
2893                "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."
2894              },
2895              "contexts": {
2896                "type": "array",
2897                "items": {"type": "string"},
2898                "minItems": 1,
2899                "optional": true,
2900                "description": "List of contexts this menu item will appear in. Legal values are: 'all', 'page', 'selection', 'link', 'editable', 'image', 'video', and 'audio'. Defaults to ['page']."
2901              },
2902              "onclick": {
2903                "type": "function",
2904                "optional": true,
2905                "description": "A function that will be called back when the menu item is clicked.",
2906                "parameters": [
2907                  {
2908                    "name": "info",
2909                    "$ref": "OnClickData",
2910                    "description": "Information about the item clicked and the context where the click happened."
2911                  },
2912                  {
2913                    "name": "tab",
2914                    "$ref": "Tab",
2915                    "description": "The details of the tab where the click took place."
2916                  }
2917                ]
2918              },
2919              "parentId": {
2920                "type": "integer",
2921                "optional": true,
2922                "description": "The ID of a parent menu item; this makes the item a child of a previously added item."
2923              },
2924              "documentUrlPatterns": {
2925                "type": "array",
2926                "items": {"type": "string"},
2927                "optional": true,
2928                "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>."
2929              },
2930              "targetUrlPatterns": {
2931                "type": "array",
2932                "items": {"type": "string"},
2933                "optional": true,
2934                "description": "Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags."
2935              }
2936            }
2937          },
2938          {
2939            "type": "function",
2940            "name": "callback",
2941            "optional": true,
2942            "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.",
2943            "parameters": []
2944          }
2945        ]
2946      },
2947      {
2948        "name": "update",
2949        "type": "function",
2950        "description": "Update a previously created context menu item.",
2951        "parameters": [
2952          {
2953            "type": "integer",
2954            "name": "id",
2955            "description": "The ID of the item to update."
2956          },
2957          {
2958            "type": "object",
2959            "name": "updateProperties",
2960            "description": "The properties to update. Accepts the same values as the create function.",
2961            "properties": {
2962              "type": {
2963                "type": "string",
2964                "optional": true
2965              },
2966              "title": {
2967                "type": "string",
2968                "optional": "true"
2969              },
2970              "checked": {
2971                "type": "boolean",
2972                "optional": true
2973              },
2974              "contexts": {
2975                "type": "array",
2976                "items": {"type": "string"},
2977                "minItems": 1,
2978                "optional": true
2979              },
2980              "onclick": {
2981                "type": "function",
2982                "optional": true
2983              },
2984              "parentId": {
2985                "type": "integer",
2986                "optional": true,
2987                "description": "Note: You cannot change an item to be a child of one of its own descendants."
2988              },
2989              "documentUrlPatterns": {
2990                "type": "array",
2991                "items": {"type": "string"},
2992                "optional": true
2993              },
2994              "targetUrlPatterns": {
2995                "type": "array",
2996                "items": {"type": "string"},
2997                "optional": true
2998              }
2999            }
3000          },
3001          {
3002            "type": "function",
3003            "name": "callback",
3004            "optional": true,
3005            "parameters": [],
3006            "description": "Called when the context menu has been updated."
3007          }
3008        ]
3009      },
3010      {
3011        "name": "remove",
3012        "type": "function",
3013        "description": "Remove a context menu item.",
3014        "parameters": [
3015          {
3016            "type": "integer",
3017            "name": "menuItemId",
3018            "description": "The ID of the context menu item to remove."
3019          },
3020          {
3021            "type": "function",
3022            "name": "callback",
3023            "optional": true,
3024            "parameters": [],
3025            "description": "Called when the context menu has been removed."
3026          }
3027        ]
3028      },
3029      {
3030        "name": "removeAll",
3031        "type": "function",
3032        "description": "Remove all context menu items added by this extension.",
3033        "parameters": [
3034          {
3035            "type": "function",
3036            "name": "callback",
3037            "optional": true,
3038            "parameters": [],
3039            "description": "Called when removal is complete."
3040          }
3041        ]
3042      }
3043    ]
3044  },
3045  {
3046    "namespace": "experimental.metrics",
3047    "nodoc": true,
3048    "types": [
3049      {
3050        "id": "MetricType",
3051        "type":  "object",
3052        "description": "Describes the type of metric that is to be collected.",
3053        "properties": {
3054          "metricName": {"type": "string", "description": "A unique name within the extension for the metric."},
3055          "type": {
3056            "type": "string",
3057            "enum": ["histogram-log", "histogram-linear"],
3058            "description": "The type of metric, such as 'histogram-log' or 'histogram-linear'."
3059          },
3060          "min": {"type": "integer", "description": "The minimum sample value to be recoded.  Must be greater than zero."},
3061          "max": {"type": "integer", "description": "The maximum sample value to be recoded."},
3062          "buckets": {"type": "integer", "description": "The number of buckets to use when separating the recorded values."}
3063        }
3064      }
3065    ],
3066    "functions": [
3067      {
3068        "name": "recordUserAction",
3069        "type": "function",
3070        "description": "Records an action performed by the user.",
3071        "parameters": [
3072          {"name": "name", "type": "string"}
3073        ]
3074      },
3075      {
3076        "name": "recordPercentage",
3077        "type": "function",
3078        "description": "Record a percentage value from 1 to 100.",
3079        "parameters": [
3080          {"name": "metricName", "type": "string"},
3081          {"name": "value", "type": "integer"}
3082        ]
3083      },
3084      {
3085        "name": "recordCount",
3086        "type": "function",
3087        "description": "Record a value than can range from 1 to 1,000,000.",
3088        "parameters": [
3089          {"name": "metricName", "type": "string"},
3090          {"name": "value", "type": "integer"}
3091        ]
3092      },
3093      {
3094        "name": "recordSmallCount",
3095        "type": "function",
3096        "description": "Record a value than can range from 1 to 100.",
3097        "parameters": [
3098          {"name": "metricName", "type": "string"},
3099          {"name": "value", "type": "integer"}
3100        ]
3101      },
3102      {
3103        "name": "recordMediumCount",
3104        "type": "function",
3105        "description": "Record a value than can range from 1 to 10,000.",
3106        "parameters": [
3107          {"name": "metricName", "type": "string"},
3108          {"name": "value", "type": "integer"}
3109        ]
3110      },
3111      {
3112        "name": "recordTime",
3113        "type": "function",
3114        "description": "Record an elapsed time of no more than 10 seconds.  The sample value is specified in milliseconds.",
3115        "parameters": [
3116          {"name": "metricName", "type": "string"},
3117          {"name": "value", "type": "integer"}
3118        ]
3119      },
3120      {
3121        "name": "recordMediumTime",
3122        "type": "function",
3123        "description": "Record an elapsed time of no more than 3 minutes.  The sample value is specified in milliseconds.",
3124        "parameters": [
3125          {"name": "metricName", "type": "string"},
3126          {"name": "value", "type": "integer"}
3127        ]
3128      },
3129      {
3130        "name": "recordLongTime",
3131        "type": "function",
3132        "description": "Record an elapsed time of no more than 1 hour.  The sample value is specified in milliseconds.",
3133        "parameters": [
3134          {"name": "metricName", "type": "string"},
3135          {"name": "value", "type": "integer"}
3136        ]
3137      },
3138      {
3139        "name": "recordValue",
3140        "type": "function",
3141        "unprivileged": true,
3142        "description": "Adds a value to the given metric.",
3143        "parameters": [
3144          {"name": "metric", "$ref": "MetricType"},
3145          {"name": "value", "type": "integer"}
3146        ]
3147      }
3148    ],
3149    "events": []
3150  },
3151  {
3152    "namespace": "cookies",
3153    "types": [
3154      {
3155        "id": "Cookie",
3156        "type": "object",
3157        "description": "Represents information about an HTTP cookie.",
3158        "properties": {
3159          "name": {"type": "string", "description": "The name of the cookie."},
3160          "value": {"type": "string", "description": "The value of the cookie."},
3161          "domain": {"type": "string", "description": "The domain of the cookie (e.g. \"www.google.com\", \"example.com\")."},
3162          "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)."},
3163          "path": {"type": "string", "description": "The path of the cookie."},
3164          "secure": {"type": "boolean", "description": "True if the cookie is marked as Secure (i.e. its scope is limited to secure channels, typically HTTPS)."},
3165          "httpOnly": {"type": "boolean", "description": "True if the cookie is marked as HttpOnly (i.e. the cookie is inaccessible to client-side scripts)."},
3166          "session": {"type": "boolean", "description": "True if the cookie is a session cookie, as opposed to a persistent cookie with an expiration date."},
3167          "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."},
3168          "storeId": {"type": "string", "description": "The ID of the cookie store containing this cookie, as provided in getAllCookieStores()."}
3169        }
3170      },
3171      {
3172        "id": "CookieStore",
3173        "type": "object",
3174        "description": "Represents a cookie store in the browser. An incognito mode window, for instance, uses a separate cookie store from a non-incognito window.",
3175        "properties": {
3176          "id": {"type": "string", "description": "The unique identifier for the cookie store."},
3177          "tabIds": {"type": "array", "items": {"type": "integer"}, "description": "Identifiers of all the browser tabs that share this cookie store."}
3178        }
3179      }
3180    ],
3181    "functions": [
3182      {
3183        "name": "get",
3184        "type": "function",
3185        "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.",
3186        "parameters": [
3187          {
3188            "type": "object",
3189            "name": "details",
3190            "description": "Details to identify the cookie being retrieved.",
3191            "properties": {
3192              "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."},
3193              "name": {"type": "string", "description": "The name of the cookie to retrieve."},
3194              "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."}
3195            }
3196          },
3197          {
3198            "type": "function",
3199            "name": "callback",
3200            "parameters": [
3201              {
3202                "name": "cookie", "$ref": "Cookie", "optional": true, "description": "Contains details about the cookie. This parameter is null if no such cookie was found."
3203              }
3204            ]
3205          }
3206        ]
3207      },
3208      {
3209        "name": "getAll",
3210        "type": "function",
3211        "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.",
3212        "parameters": [
3213          {
3214            "type": "object",
3215            "name": "details",
3216            "description": "Information to filter the cookies being retrieved.",
3217            "properties": {
3218              "url": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those that would match the given URL."},
3219              "name": {"type": "string", "optional": true, "description": "Filters the cookies by name."},
3220              "domain": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those whose domains match or are subdomains of this one."},
3221              "path": {"type": "string", "optional": true, "description": "Restricts the retrieved cookies to those whose path exactly matches this string."},
3222              "secure": {"type": "boolean", "optional": true, "description": "Filters the cookies by their Secure property."},
3223              "session": {"type": "boolean", "optional": true, "description": "Filters out session vs. persistent cookies."},
3224              "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."}
3225            }
3226          },
3227          {
3228            "type": "function",
3229            "name": "callback",
3230            "parameters": [
3231              {
3232                "name": "cookies", "type": "array", "items": {"$ref": "Cookie"}, "description": "All the existing, unexpired cookies that match the given cookie info."
3233              }
3234            ]
3235          }
3236        ]
3237      },
3238      {
3239        "name": "set",
3240        "type": "function",
3241        "description": "Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.",
3242        "parameters": [
3243          {
3244            "type": "object",
3245            "name": "details",
3246            "description": "Details about the cookie being set.",
3247            "properties": {
3248              "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."},
3249              "name": {"type": "string", "optional": true, "description": "The name of the cookie. Empty by default if omitted."},
3250              "value": {"type": "string", "optional": true, "description": "The value of the cookie. Empty by default if omitted."},
3251              "domain": {"type": "string", "optional": true, "description": "The domain of the cookie. If omitted, the cookie becomes a host-only cookie."},
3252              "path": {"type": "string", "optional": true, "description": "The path of the cookie. Defaults to the path portion of the url parameter."},
3253              "secure": {"type": "boolean", "optional": true, "description": "Whether the cookie should be marked as Secure. Defaults to false."},
3254              "httpOnly": {"type": "boolean", "optional": true, "description": "Whether the cookie should be marked as HttpOnly. Defaults to false."},
3255              "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."},
3256              "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."}
3257            }
3258          }
3259        ]
3260      },
3261      {
3262        "name": "remove",
3263        "type": "function",
3264        "description": "Deletes a cookie by name.",
3265        "parameters": [
3266          {
3267            "type": "object",
3268            "name": "details",
3269            "description": "Information to identify the cookie to remove.",
3270            "properties": {
3271              "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."},
3272              "name": {"type": "string", "description": "The name of the cookie to remove."},
3273              "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."}
3274            }
3275          }
3276        ]
3277      },
3278      {
3279        "name": "getAllCookieStores",
3280        "type": "function",
3281        "description": "Lists all existing cookie stores.",
3282        "parameters": [
3283          {
3284            "type": "function",
3285            "name": "callback",
3286            "parameters": [
3287              {
3288                "name": "cookieStores", "type": "array", "items": {"$ref": "CookieStore"}, "description": "All the existing cookie stores."
3289              }
3290            ]
3291          }
3292        ]
3293      }
3294    ],
3295    "events": [
3296      {
3297        "name": "onChanged",
3298        "type": "function",
3299        "description": "Fired when a cookie is set or removed.",
3300        "parameters": [
3301          {
3302            "type": "object",
3303            "name": "changeInfo",
3304            "properties": {
3305              "removed": {"type": "boolean", "description": "True if a cookie was removed."},
3306              "cookie": {"$ref": "Cookie", "description": "Information about the cookie that was set or removed."}
3307            }
3308          }
3309        ]
3310      }
3311    ]
3312  },
3313  {
3314    "namespace": "experimental.rlz",
3315    "nodoc": true,
3316    "types": [],
3317    "functions": [
3318      {
3319        "name": "recordProductEvent",
3320        "type": "function",
3321        "description": "Records an RLZ event for a given product's access point.",
3322        "parameters": [
3323          {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
3324          {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
3325          {"name": "event", "type": "string", "enum": ["install", "set-to-google", "first-search", "activate"]}
3326        ]
3327      },
3328      {
3329        "name": "getAccessPointRlz",
3330        "type": "function",
3331        "description": "Gets the RLZ string to be used when accessing a Google property through the given access point.",
3332        "parameters": [
3333          {"name": "accessPoint", "type": "string", "minLength": 1, "maxLength": 2},
3334          {"name": "callback", "type": "function", "parameters": [{"name": "rlz", "type": "string"}]}
3335        ]
3336      },
3337      {
3338        "name": "sendFinancialPing",
3339        "type": "function",
3340        "description": "Sends Google promotional information about this extension.",
3341        "parameters": [
3342          {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
3343          {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1},
3344          {"name": "signature", "type": "string"},
3345          {"name": "brand", "type": "string"},
3346          {"name": "id", "type": "string"},
3347          {"name": "lang", "type": "string"},
3348          {"name": "exclude_machine_id", "type": "boolean"},
3349          {"name": "callback", "type": "function", "optional": true, "parameters": [{"name": "sent", "type": "boolean"}]}
3350        ]
3351      },
3352      {
3353        "name": "clearProductState",
3354        "type": "function",
3355        "description": "Clears all product-specific RLZ state from the machine, as well as clearing all events for the specified access points.",
3356        "parameters": [
3357          {"name": "product", "type": "string", "minLength": 1, "maxLength": 1},
3358          {"name": "accessPoints", "type": "array", "items": {"type": "string", "minLength": 1, "maxLength": 2}, "minItems": 1}
3359        ]
3360      }
3361    ],
3362    "events": []
3363  },
3364  {
3365    "namespace": "experimental.webNavigation",
3366    "types": [],
3367    "functions": [],
3368    "events": [
3369      {
3370        "name": "onBeforeNavigate",
3371        "type": "function",
3372        "description": "Fires when a navigation is about to occur.",
3373        "parameters": [
3374          {
3375            "type": "object",
3376            "name": "details",
3377            "properties": {
3378              "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation is about to occur."},
3379              "url": {"type": "string"},
3380              "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."},
3381              "requestId": {"type": "integer", "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."},
3382              "timeStamp": {"type": "number", "description": "The time when the browser was about to start the navigation, in milliseconds since the epoch."}
3383            }
3384          }
3385        ]
3386      },
3387      {
3388        "name": "onCommitted",
3389        "type": "function",
3390        "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.",
3391        "parameters": [
3392          {
3393            "type": "object",
3394            "name": "details",
3395            "properties": {
3396              "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
3397              "url": {"type": "string"},
3398              "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
3399              "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."},
3400              "transitionQualifiers": {"type": "string", "description": "Zero or more transition qualifiers delimited by \"|\". Possible qualifiers are \"client_redirect\", \"server_redirect\", and \"forward_back\"."},
3401              "timeStamp": {"type": "number", "description": "The time when the navigation was committed, in milliseconds since the epoch."}
3402            }
3403          }
3404        ]
3405      },
3406      {
3407        "name": "onDOMContentLoaded",
3408        "type": "function",
3409        "description": "Fires when the page's DOM is fully constructed, but the referenced resources may not finish loading.",
3410        "parameters": [
3411          {
3412            "type": "object",
3413            "name": "details",
3414            "properties": {
3415              "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
3416              "url": {"type": "string"},
3417              "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
3418              "timeStamp": {"type": "number", "description": "The time when the page's DOM was fully constructed, in milliseconds since the epoch."}
3419            }
3420          }
3421        ]
3422      },
3423      {
3424        "name": "onCompleted",
3425        "type": "function",
3426        "description": "Fires when a document, including the resources it refers to, is completely loaded and initialized.",
3427        "parameters": [
3428          {
3429            "type": "object",
3430            "name": "details",
3431            "properties": {
3432              "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
3433              "url": {"type": "string"},
3434              "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
3435              "timeStamp": {"type": "number", "description": "The time when the document finished loading, in milliseconds since the epoch."}
3436            }
3437          }
3438        ]
3439      },
3440      {
3441        "name": "onErrorOccurred",
3442        "type": "function",
3443        "description": "Fires when an error occurs.",
3444        "parameters": [
3445          {
3446            "type": "object",
3447            "name": "details",
3448            "properties": {
3449              "tabId": {"type": "integer", "description": "The ID of the tab in which the navigation occurs."},
3450              "url": {"type": "string"},
3451              "frameId": {"type": "integer", "description": "0 indicates the navigation happens in the tab content window; positive value indicates navigation in a subframe."},
3452              "error": {"type": "string", "description": "The error description."},
3453              "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
3454            }
3455          }
3456        ]
3457      },
3458      {
3459        "name": "onBeforeRetarget",
3460        "type": "function",
3461        "description": "Fires when a new window, or a new tab in an existing window, is about to be created to host a navigation.",
3462        "parameters": [
3463          {
3464            "type": "object",
3465            "name": "details",
3466            "properties": {
3467              "sourceTabId": {"type": "integer", "description": "The ID of the tab in which the navigation is triggered."},
3468              "sourceUrl": {"type": "string", "description": "The URL of the document that is opening the new window."},
3469              "targetUrl": {"type": "string", "description": "The URL to be opened in the new window."},
3470              "timeStamp": {"type": "number", "description": "The time when the browser was about to create a new view, in milliseconds since the epoch."}
3471            }
3472          }
3473        ]
3474      }
3475    ]
3476  },
3477  {
3478    "namespace": "experimental.webRequest",
3479    "types": [],
3480    "functions": [],
3481    "events": [
3482      {
3483        "name": "onBeforeRequest",
3484        "type": "function",
3485        "description": "Fires when a request is about to occur.",
3486        "parameters": [
3487          {
3488            "type": "object",
3489            "name": "details",
3490            "properties": {
3491              "requestId": {"type": "integer", "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."},
3492              "url": {"type": "string"},
3493              "method": {"type": "string", "description": "Standard HTTP method."},
3494              "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."},
3495              "type": {"type": "string", "enum": ["main_frame", "sub_frame", "stylesheet", "script", "image", "object", "other"], "description": "How the requested resource will be used."},
3496              "timeStamp": {"type": "number", "description": "The time when the browser was about to make the request, in milliseconds since the epoch."}
3497            }
3498          }
3499        ]
3500      },
3501      {
3502        "name": "onRequestSent",
3503        "type": "function",
3504        "description": "Fires when a request is sent to the server.",
3505        "parameters": [
3506          {
3507            "type": "object",
3508            "name": "details",
3509            "properties": {
3510              "requestId": {"type": "integer", "description": "The ID of the request."},
3511              "url": {"type": "string"},
3512              "ip": {"type": "string", "description": "The server IP address that is actually connected to. Note that it may be a literal IPv6 address."},
3513              "timeStamp": {"type": "number", "description": "The time when the browser finished sending the request, in milliseconds since the epoch."}
3514            }
3515          }
3516        ]
3517      },
3518      {
3519        "name": "onHeadersReceived",
3520        "type": "function",
3521        "description": "Fires when the status line and response headers are received after a request is sent to the server.",
3522        "parameters": [
3523          {
3524            "type": "object",
3525            "name": "details",
3526            "properties": {
3527              "requestId": {"type": "integer", "description": "The ID of the request."},
3528              "url": {"type": "string"},
3529              "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
3530              "timeStamp": {"type": "number", "description": "The time when the status line and response headers were received, in milliseconds since the epoch."}
3531            }
3532          }
3533        ]
3534      },
3535      {
3536        "name": "onBeforeRedirect",
3537        "type": "function",
3538        "description": "Fires when a server initiated redirect is about to occur.",
3539        "parameters": [
3540          {
3541            "type": "object",
3542            "name": "details",
3543            "properties": {
3544              "requestId": {"type": "integer", "description": "The ID of the request."},
3545              "url": {"type": "string", "description": "The URL of the current request."},
3546              "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
3547              "redirectUrl": {"type": "string", "description": "The new URL."},
3548              "timeStamp": {"type": "number", "description": "The time when the browser was about to make the redirect, in milliseconds since the epoch."}
3549            }
3550          }
3551        ]
3552      },
3553      {
3554        "name": "onCompleted",
3555        "type": "function",
3556        "description": "Fires when a request is completed.",
3557        "parameters": [
3558          {
3559            "type": "object",
3560            "name": "details",
3561            "properties": {
3562              "requestId": {"type": "integer", "description": "The ID of the request."},
3563              "url": {"type": "string", "description": "The URL of the current request."},
3564              "statusCode": {"type": "integer", "description": "Standard HTTP status code returned by the server."},
3565              "timeStamp": {"type": "number", "description": "The time when the response was received completely, in milliseconds since the epoch."}
3566            }
3567          }
3568        ]
3569      },
3570      {
3571        "name": "onErrorOccurred",
3572        "type": "function",
3573        "description": "Fires when an error occurs.",
3574        "parameters": [
3575          {
3576            "type": "object",
3577            "name": "details",
3578            "properties": {
3579              "requestId": {"type": "integer", "description": "The ID of the request."},
3580              "url": {"type": "string", "description": "The URL of the current request."},
3581              "error": {"type": "string", "description": "The error description."},
3582              "timeStamp": {"type": "number", "description": "The time when the error occurred, in milliseconds since the epoch."}
3583            }
3584          }
3585        ]
3586      }
3587    ]
3588  },
3589  {
3590    "namespace": "test",
3591    "nodoc": true,
3592    "types": [],
3593    "functions": [
3594      {
3595        "name": "getConfig",
3596        "type": "function",
3597        "description": "Gives configuration options set by the test.",
3598        "parameters": [
3599          {
3600            "type": "function", "name": "callback", "parameters": [
3601              {
3602                "type": "object",
3603                "name": "testConfig",
3604                "properties": {
3605                  "testServer": {
3606                    "type": "object",
3607                    "optional": true,
3608                    "description": "Details on the test server used to mock network responses.  Will be set only if test calls ExtensionApiTest::StartTestServer().",
3609                    "properties": {
3610                      "port": {
3611                        "type": "integer",
3612                        "description": "The port on which the test server is listening.",
3613                        "minimum": 1024,
3614                        "maximum": 65535
3615                      }
3616                    }
3617                  }
3618                }
3619              }
3620            ]
3621          }
3622        ]
3623      },
3624      {
3625        "name": "notifyFail",
3626        "type": "function",
3627        "description": "Notify the browser process that test code running in the extension failed.  This is only used for internal unit testing.",
3628        "parameters": [
3629          {"type": "string", "name": "message"}
3630        ]
3631      },
3632      {
3633        "name": "notifyPass",
3634        "type": "function",
3635        "description": "Notify the browser process that test code running in the extension passed.  This is only used for internal unit testing.",
3636        "parameters": [
3637          {"type": "string", "name": "message", "optional": true}
3638        ]
3639      },
3640      {
3641        "name": "resetQuota",
3642        "type": "function",
3643        "description": "Reset all accumulated quota state for all extensions.  This is only used for internal unit testing.",
3644        "parameters": []
3645      },
3646      {
3647        "name": "log",
3648        "type": "function",
3649        "description": "Logs a message during internal unit testing.",
3650        "parameters": [
3651          {"type": "string", "name": "message"}
3652        ]
3653      },
3654      {
3655        "name": "createIncognitoTab",
3656        "type": "function",
3657        "description": "Creates an incognito tab during internal testing. Succeeds even if the extension is not enabled in incognito mode.",
3658        "parameters": [
3659          {"type": "string", "name": "url"}
3660        ]
3661      },
3662      {
3663        "name": "sendMessage",
3664        "type": "function",
3665        "description": "Sends a string message to the browser process, generating a Notification that C++ test code can wait for.",
3666        "parameters": [
3667          {"type": "string", "name": "message"},
3668          {
3669            "type": "function",
3670            "name": "callback",
3671            "optional": true,
3672            "parameters": [
3673              {"type": "string", "name": "response"}
3674            ]
3675          }
3676        ]
3677      }
3678    ],
3679    "events": [
3680      {
3681        "name": "onMessage",
3682        "type": "function",
3683        "unprivileged": true,
3684        "description": "Used to test sending messages to extensions.",
3685        "parameters": [
3686          {
3687            "type": "object",
3688            "name": "info",
3689            "properties": {
3690              "data": { "type": "string", "description": "Additional information." },
3691              "lastMessage": { "type": "boolean", "description": "True if this was the last message for this test" }
3692            }
3693          }
3694        ]
3695      }
3696    ]
3697  },
3698  {
3699    "namespace": "experimental.proxy",
3700    "types": [
3701      {
3702        "id": "ProxyServer",
3703        "type": "object",
3704        "description": "An object encapsulating a single proxy server's specification.",
3705        "properties": {
3706          "scheme": {"type": "string", "optional": true, "enum": ["http", "socks", "socks4", "socks5"], "description": "The scheme (protocol) of the proxy server itself."},
3707          "host": {"type": "string", "description": "The URI of the proxy server."},
3708          "port": {"type": "integer", "optional": true, "description": "The port of the proxy server."}
3709        }
3710      },
3711      {
3712        "id": "ProxyRules",
3713        "type": "object",
3714        "description": "An object encapsulating the set of proxy rules for all protocols.",
3715        "properties": {
3716          "singleProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for all per-URL requests (i.e., http, https, and ftp)."},
3717          "proxyForHttp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTP requests."},
3718          "proxyForHttps": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for HTTPS requests."},
3719          "proxyForFtp": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for FTP requests."},
3720          "socksProxy": {"$ref": "ProxyServer", "optional": true, "description": "The proxy server to be used for SOCKS requests."}
3721        }
3722      },
3723      {
3724        "id": "PacScript",
3725        "type": "object",
3726        "description": "An object holding proxy auto-config information. Only one of the fields should be non-empty.",
3727        "properties": {
3728          "url": {"type": "string", "optional": true, "description": "URL of he PAC file to be used."}
3729        }
3730      },
3731      {
3732        "id": "ProxyConfig",
3733        "type": "object",
3734        "description": "An object encapsulating a complete proxy configuration.",
3735        "properties": {
3736          "rules": {"$ref": "ProxyRules", "optional": true, "description": "The proxy rules describing this configuration."},
3737          "pacScript": {"$ref": "PacScript", "optional": true, "description": "The proxy auto-config (PAC) script for this configuration."},
3738          "mode": {
3739            "type": "string",
3740            "enum": ["direct", "auto_detect", "pac_script", "fixed_servers", "system"],
3741            "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"
3742          }
3743        }
3744      }
3745    ],
3746    "functions": [
3747      {
3748        "name": "useCustomProxySettings",
3749        "type": "function",
3750        "description": "Apply the given proxy configuration.",
3751        "parameters": [
3752          {"name": "config", "$ref": "ProxyConfig"}
3753        ]
3754      }
3755    ]
3756  },
3757  {
3758    "namespace": "experimental.clipboard",
3759    "types": [],
3760    "functions": [
3761      {
3762        "name": "executeCopy",
3763        "type": "function",
3764        "description": "Triggers a copy operation in the specified tab.",
3765        "parameters": [
3766          {"type": "integer", "name": "tabId", "minimum": 0},
3767          {"type": "function", "name": "callback", "optional": true, "parameters": []}
3768        ]
3769      },
3770      {
3771        "name": "executeCut",
3772        "type": "function",
3773        "description": "Triggers a cut operation in the specified tab.",
3774        "parameters": [
3775          {"type": "integer", "name": "tabId", "minimum": 0},
3776          {"type": "function", "name": "callback", "optional": true, "parameters": []}
3777        ]
3778      },
3779      {
3780        "name": "executePaste",
3781        "type": "function",
3782        "description": "Triggers a paste operation in the specified tab.",
3783        "parameters": [
3784          {"type": "integer", "name": "tabId", "minimum": 0},
3785          {"type": "function", "name": "callback", "optional": true, "parameters": []}
3786        ]
3787      }
3788    ],
3789    "events": []
3790  },
3791  {
3792    "namespace": "experimental.sidebar",
3793    "types": [],
3794    "functions": [
3795      {
3796        "name": "hide",
3797        "type": "function",
3798        "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.",
3799        "parameters": [
3800          {
3801            "type": "object",
3802            "name": "details",
3803            "optional": true,
3804            "properties": {
3805              "tabId": {
3806                "type": "integer",
3807                "minimum": 0,
3808                "optional": true,
3809                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3810              }
3811            }
3812          }
3813        ]
3814      },
3815      {
3816        "name": "show",
3817        "type": "function",
3818        "description": "Shows sidebar mini tab (in 'shown' state) for the specified tab. Has no effect if already expanded, otherwise changes status to 'shown'.",
3819        "parameters": [
3820          {
3821            "type": "object",
3822            "name": "details",
3823            "optional": true,
3824            "properties": {
3825              "tabId": {
3826                "type": "integer",
3827                "minimum": 0,
3828                "optional": true,
3829                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3830              }
3831            }
3832          }
3833        ]
3834      },
3835      {
3836        "name": "expand",
3837        "type": "function",
3838        "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.",
3839        "parameters": [
3840          {
3841            "type": "object",
3842            "name": "details",
3843            "optional": true,
3844            "properties": {
3845              "tabId": {
3846                "type": "integer",
3847                "minimum": 0,
3848                "optional": true,
3849                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3850              }
3851            }
3852          }
3853        ]
3854      },
3855      {
3856        "name": "collapse",
3857        "type": "function",
3858        "description": "Collapses sidebar for the specified tab. Has no effect if sidebar is not in its 'active' state (see getState).",
3859        "parameters": [
3860          {
3861            "type": "object",
3862            "name": "details",
3863            "optional": true,
3864            "properties": {
3865              "tabId": {
3866                "type": "integer",
3867                "minimum": 0,
3868                "optional": true,
3869                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3870              }
3871            }
3872          }
3873        ]
3874      },
3875      {
3876        "name": "navigate",
3877        "type": "function",
3878        "description": "Navigates sidebar for the specified tab to the specified URL.",
3879        "parameters": [
3880          {
3881            "type": "object",
3882            "name": "details",
3883            "properties": {
3884              "tabId": {
3885                "type": "integer",
3886                "minimum": 0,
3887                "optional": true,
3888                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3889              },
3890              "url": { "type": "string" }
3891            }
3892          }
3893        ]
3894      },
3895      {
3896        "name": "getState",
3897        "type": "function",
3898        "description": "Returns current sidebar state for the specified tab.",
3899        "parameters": [
3900          {
3901            "type": "object",
3902            "name": "details",
3903            "optional": true,
3904            "properties": {
3905              "tabId": {
3906                "type": "integer",
3907                "minimum": 0,
3908                "optional": true,
3909                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3910              }
3911            }
3912          },
3913          {
3914            "type": "function",
3915            "name": "callback",
3916            "parameters": [
3917              {
3918                "name": "state",
3919                "type": "string",
3920                "enum": ["hidden", "shown", "active"],
3921                "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."
3922              }
3923            ]
3924          }
3925        ]
3926      },
3927      {
3928        "name": "setBadgeText",
3929        "type": "function",
3930        "description": "Sets sidebar's mini tab badge text for the specified tab.",
3931        "parameters": [
3932          {
3933            "type": "object",
3934            "name": "details",
3935            "properties": {
3936              "tabId": {
3937                "type": "integer",
3938                "minimum": 0,
3939                "optional": true,
3940                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3941              },
3942              "text": {
3943                "type": "string",
3944                "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."
3945              }
3946            }
3947          }
3948        ]
3949      },
3950      {
3951        "name": "setIcon",
3952        "type": "function",
3953        "description": "Sets sidebar's mini tab icon for the specified tab.",
3954        "parameters": [
3955          {
3956            "type": "object",
3957            "name": "details",
3958            "properties": {
3959              "tabId": {
3960                "type": "integer",
3961                "minimum": 0,
3962                "optional": true,
3963                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3964              },
3965              "imageData": {
3966                "type": "object",
3967                "isInstanceOf": "ImageData",
3968                "properties": {},
3969                "additionalProperties": { "type": "any" },
3970                "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.",
3971                "optional": true
3972              },
3973              "path": {
3974                "type": "string",
3975                "optional": true,
3976                "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."
3977              }
3978            }
3979          }
3980        ]
3981      },
3982      {
3983        "name": "setTitle",
3984        "type": "function",
3985        "description": "Sets sidebar's mini tab title for the specified tab.",
3986        "parameters": [
3987          {
3988            "type": "object",
3989            "name": "details",
3990            "properties": {
3991              "tabId": {
3992                "type": "integer",
3993                "minimum": 0,
3994                "optional": true,
3995                "description": "Defaults to the selected tab of the <a href='windows.html#current-window'>current window</a>."
3996              },
3997              "title": {
3998                "type": "string",
3999                "description": "The sidebar's title. It is displayed in a tooltip over the sidebar's mini tab."
4000              }
4001            }
4002          }
4003        ]
4004      }
4005    ],
4006    "events": [
4007      {
4008        "name": "onStateChanged",
4009        "unprivileged": true,
4010        "type": "function",
4011        "description": "Notifies about sidebar state changes.",
4012        "parameters": [
4013          {
4014            "type": "object",
4015            "name": "details",
4016            "properties": {
4017              "tabId": {
4018                "type": "integer",
4019                "minimum": 0
4020              },
4021              "state": {
4022                "type": "string",
4023                "enum": ["hidden", "shown", "active"]
4024              }
4025            }
4026          }
4027        ]
4028      }
4029    ]
4030  },
4031  {
4032    "namespace": "omnibox",
4033    "types": [
4034      {
4035        "id": "SuggestResult",
4036        "type": "object",
4037        "description": "A suggest result.",
4038        "properties": {
4039          "content": {
4040            "type": "string",
4041            "minLength": 1,
4042            "description": "The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry."
4043          },
4044          "description": {
4045            "type": "string",
4046            "minLength": 1,
4047            "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>."
4048          }
4049        }
4050      }
4051    ],
4052    "functions": [
4053      {
4054        "name": "sendSuggestions",
4055        "nodoc": true,
4056        "type": "function",
4057        "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
4058        "parameters": [
4059          {"type": "integer", "name": "requestId"},
4060          {
4061            "type": "array",
4062            "description": "Array of suggest results",
4063            "items": {
4064              "type": "object",
4065              "additionalProperties": { "type": "any" }
4066            }
4067          }
4068        ]
4069      },
4070      {
4071        "name": "setDefaultSuggestion",
4072        "type": "function",
4073        "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.",
4074        "parameters": [
4075          {
4076            "type": "object",
4077            "name": "suggestion",
4078            "description": "A partial SuggestResult object, without the 'content' parameter. See SuggestResult for a description of the parameters.",
4079            "properties": {
4080              "description": {
4081                "type": "string",
4082                "minLength": 1,
4083                "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."
4084              }
4085            }
4086          }
4087        ]
4088      }
4089    ],
4090    "events": [
4091      {
4092        "name": "onInputStarted",
4093        "type": "function",
4094        "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.",
4095        "parameters": []
4096      },
4097      {
4098        "name": "onInputChanged",
4099        "type": "function",
4100        "description": "User has changed what is typed into the omnibox.",
4101        "parameters": [
4102          {
4103            "type": "string",
4104            "name": "text"
4105          },
4106          {
4107            "name": "suggest",
4108            "type": "function",
4109            "description": "A callback passed to the onInputChanged event used for sending suggestions back to the browser.",
4110            "parameters": [
4111              {
4112                "type": "array",
4113                "description": "Array of suggest results",
4114                "items": {
4115                  "$ref": "SuggestResult"
4116                }
4117              }
4118            ]
4119          }
4120        ]
4121      },
4122      {
4123        "name": "onInputEntered",
4124        "type": "function",
4125        "description": "User has accepted what is typed into the omnibox.",
4126        "parameters": [
4127          {
4128            "type": "string",
4129            "name": "text"
4130          }
4131        ]
4132      },
4133      {
4134        "name": "onInputCancelled",
4135        "type": "function",
4136        "description": "User has ended the keyword input session without accepting the input.",
4137        "parameters": []
4138      }
4139    ]
4140  },
4141  {
4142    "namespace":"management",
4143    "types": [
4144      {
4145        "id": "IconInfo",
4146        "description": "Information about an icon belonging to an extension or app.",
4147        "type": "object",
4148        "properties": {
4149          "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."  },
4150          "url": { "type": "string", "description": "The url for this icon image." }
4151        }
4152      },
4153      {
4154        "id": "ExtensionInfo",
4155        "description": "Information about an installed extension or app.",
4156        "type": "object",
4157        "properties": {
4158          "id": {
4159            "description": "The extension's unique identifier.",
4160            "type": "string"
4161          },
4162          "name": {
4163            "description": "The name of this extension or app.",
4164            "type": "string"
4165          },
4166          "description": {
4167            "description": "The description of this extension or app.",
4168            "type": "string"
4169          },
4170          "version": {
4171            "description": "The <a href='manifest.html#version'>version</a> of this extension or app.",
4172            "type": "string"
4173          },
4174          "enabled": {
4175            "description": "Whether it is currently enabled or disabled.",
4176            "type": "boolean"
4177          },
4178          "isApp": {
4179            "description": "True if this is an app.",
4180            "type": "boolean"
4181          },
4182          "appLaunchUrl": {
4183            "description": "The launch url (only present for apps).",
4184            "type": "string",
4185            "optional": true
4186          },
4187          "optionsUrl": {
4188            "description": "The url for the item's options page, if it has one.",
4189            "type": "string"
4190          },
4191          "icons": {
4192            "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.",
4193            "type": "array",
4194            "optional": true,
4195            "items": {
4196              "$ref": "IconInfo"
4197            }
4198          },
4199          "permissions": {
4200            "description": "Returns a list of API based permissions.",
4201            "type": "array",
4202            "items" : {
4203              "type": "string"
4204            }
4205          },
4206          "hostPermissions": {
4207            "description": "Returns a list of host based permissions.",
4208            "type": "array",
4209            "items" : {
4210              "type": "string"
4211            }
4212          }
4213        }
4214      }
4215    ],
4216    "functions": [
4217      {
4218        "name": "getAll",
4219        "description": "Returns a list of information about installed extensions and apps.",
4220        "parameters": [
4221          {
4222            "type": "function",
4223            "name": "callback",
4224            "optional": true,
4225            "parameters": [
4226              {
4227                "type": "array",
4228                "name": "result",
4229                "items": {
4230                  "$ref": "ExtensionInfo"
4231                }
4232              }
4233            ]
4234          }
4235        ]
4236      },
4237      {
4238        "name": "get",
4239        "description": "Return information about the installed extension or app that has the given ID.",
4240        "parameters": [
4241          {
4242            "name": "id",
4243            "type": "string",
4244            "description": "The ID from an item of $ref:ExtensionInfo."
4245          },
4246          {
4247            "type": "function",
4248            "name": "callback",
4249            "optional": "true",
4250            "parameters": [
4251              {
4252                "name": "result",
4253                "$ref": "ExtensionInfo"
4254              }
4255            ]
4256          }
4257        ]
4258      },
4259      {
4260        "name": "setEnabled",
4261        "description": "Enable or disable an app or extension.",
4262        "parameters": [
4263          {
4264            "name": "id",
4265            "type": "string",
4266            "description": "This should be the id from an item of $ref:ExtensionInfo."
4267          },
4268          {
4269            "name": "enabled",
4270            "type": "boolean",
4271            "description": "Whether this item should be enabled or disabled."
4272          },
4273          {
4274            "name": "callback",
4275            "type": "function",
4276            "optional": "true",
4277            "parameters": []
4278          }
4279        ]
4280      },
4281      {
4282        "name": "uninstall",
4283        "description": "Uninstall a currently installed app or extension.",
4284        "parameters": [
4285          {
4286            "name": "id",
4287            "type": "string",
4288            "description": "This should be the id from an item of $ref:ExtensionInfo."
4289          },
4290          {
4291            "name": "callback",
4292            "type": "function",
4293            "optional": "true",
4294            "parameters": []
4295          }
4296        ]
4297      },
4298      {
4299        "name": "launchApp",
4300        "description": "Launches an application.",
4301        "parameters": [
4302          {
4303            "name": "id",
4304            "type": "string",
4305            "description": "The extension id of the application."
4306          },
4307          {
4308            "name": "callback",
4309            "type": "function",
4310            "optional": "true",
4311            "parameters": []
4312          }
4313        ]
4314      }
4315    ],
4316    "events": [
4317      {
4318        "name": "onInstalled",
4319        "description": "Fired when an app or extension has been installed.",
4320        "type": "function",
4321        "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
4322      },
4323      {
4324        "name": "onUninstalled",
4325        "description": "Fired when an app or extension has been uninstalled.",
4326        "type": "function",
4327        "parameters": [
4328          {
4329           "name": "id",
4330           "type": "string",
4331           "description": "The id of the extension or app that was uninstalled."
4332          }
4333        ]
4334      },
4335      {
4336        "name": "onEnabled",
4337        "description": "Fired when an app or extension has been enabled.",
4338        "type": "function",
4339        "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
4340      },
4341      {
4342        "name": "onDisabled",
4343        "description": "Fired when an app or extension has been disabled",
4344        "type": "function",
4345        "parameters": [{"name": "info", "$ref":"ExtensionInfo"}]
4346      }
4347    ]
4348  },
4349
4350  {
4351    "namespace":"webstorePrivate",
4352    "nodoc": "true",
4353    "functions": [
4354      {
4355        "name": "install",
4356        "description": "Installs the extension corresponding to the given id",
4357        "parameters": [
4358          {
4359            "name": "expected_id",
4360            "type": "string",
4361            "description": "The id of the extension to install."
4362          },
4363          {
4364            "name": "callback",
4365            "type": "function",
4366            "optional": "true",
4367            "parameters": []
4368          }
4369        ]
4370      },
4371      {
4372        "name": "beginInstall",
4373        "description": "Initiates the install process for the given extension id",
4374        "parameters": [
4375          {
4376            "name": "expected_id",
4377            "type": "string",
4378            "description": "The id of the extension to be installled. Must be called during a user gesture."
4379          },
4380          {
4381            "name": "callback",
4382            "type": "function",
4383            "optional": "true",
4384            "parameters": []
4385          }
4386        ]
4387      },
4388      {
4389        "name": "completeInstall",
4390        "description": "",
4391        "parameters": [
4392          {
4393            "name": "expected_id",
4394            "type": "string",
4395            "description": "The id of the extension to be installled. This should match a previous call to beginInstall."
4396          },
4397          {
4398            "name": "callback",
4399            "type": "function",
4400            "optional": "true",
4401            "parameters": []
4402          }
4403        ]
4404      },
4405      {
4406        "name": "getBrowserLogin",
4407        "description": "Returns the logged-in sync user login if there is one, or the empty string otherwise.",
4408        "parameters": [
4409          {
4410            "name": "callback",
4411            "type": "function",
4412            "optional": "false",
4413            "parameters": [
4414              {
4415                "name": "info",
4416                "type": "object",
4417                "properties": {
4418                  "login": { "type": "string" },
4419                  "token": { "type": "string", "optional": true }
4420                }
4421              }
4422            ]
4423          }
4424        ]
4425      },
4426      {
4427        "name": "getStoreLogin",
4428        "description": "Returns the previous value set by setStoreLogin, or the empty string if there is none.",
4429        "parameters": [
4430          {
4431            "name": "callback",
4432            "type": "function",
4433            "optional": "false",
4434            "parameters": [
4435              { "name": "login", "type": "string" }
4436            ]
4437          }
4438        ]
4439      },
4440      {
4441        "name": "setStoreLogin",
4442        "description": "Set a preference value with the store login.",
4443        "parameters": [
4444          { "name": "login", "type": "string" },
4445          { "name": "callback", "type": "function", "optional": "true" }
4446        ]
4447      },
4448      {
4449        "name": "promptBrowserLogin",
4450        "description": "Causes the browser to bring up the browser login UI.",
4451        "parameters": [
4452          {
4453            "name": "preferred_email",
4454            "type": "string",
4455            "description": "The email address to use to pre-populate the login dialog (can be an empty string)."
4456          },
4457          {
4458            "name": "callback",
4459            "type": "function",
4460            "optional": "true",
4461            "parameters": [
4462              {
4463                "name": "info",
4464                "type": "object",
4465                "properties": {
4466                  "login": { "type": "string", "optional": true },
4467                  "token": { "type": "string", "optional": true }
4468                }
4469              }
4470            ]
4471          }
4472        ]
4473      }
4474    ]
4475  }
4476]
4477