cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / third_party / closure_compiler / externs / chrome_extensions.js
blob0b10f116c448c9aa87ecca00891a8bd11dc6482e
1 //    SSSSSSSSSSSSSSS TTTTTTTTTTTTTTTTTTTTTTT     OOOOOOOOO     PPPPPPPPPPPPPPPPP
2 //  SS:::::::::::::::ST:::::::::::::::::::::T   OO:::::::::OO   P::::::::::::::::P
3 // S:::::SSSSSS::::::ST:::::::::::::::::::::T OO:::::::::::::OO P::::::PPPPPP:::::P
4 // S:::::S     SSSSSSST:::::TT:::::::TT:::::TO:::::::OOO:::::::OPP:::::P     P:::::P
5 // S:::::S            TTTTTT  T:::::T  TTTTTTO::::::O   O::::::O  P::::P     P:::::P
6 // S:::::S                    T:::::T        O:::::O     O:::::O  P::::P     P:::::P
7 //  S::::SSSS                                                     P::::PPPPPP:::::P
8 //   SS::::::SSSSS       This file is generated. To update it,    P:::::::::::::PP
9 //     SSS::::::::SS          run bump_compiler_version.          P::::PPPPPPPPP
10 //        SSSSSS::::S                                             P::::P
11 //             S:::::S        T:::::T        O:::::O     O:::::O  P::::P
12 //             S:::::S        T:::::T        O::::::O   O::::::O  P::::P
13 // SSSSSSS     S:::::S      TT:::::::TT      O:::::::OOO:::::::OPP::::::PP
14 // S::::::SSSSSS:::::S      T:::::::::T       OO:::::::::::::OO P::::::::P
15 // S:::::::::::::::SS       T:::::::::T         OO:::::::::OO   P::::::::P
16 //  SSSSSSSSSSSSSSS         TTTTTTTTTTT           OOOOOOOOO     PPPPPPPPPP
18  * Copyright 2009 The Closure Compiler Authors
19  *
20  * Licensed under the Apache License, Version 2.0 (the "License");
21  * you may not use this file except in compliance with the License.
22  * You may obtain a copy of the License at
23  *
24  *     http://www.apache.org/licenses/LICENSE-2.0
25  *
26  * Unless required by applicable law or agreed to in writing, software
27  * distributed under the License is distributed on an "AS IS" BASIS,
28  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29  * See the License for the specific language governing permissions and
30  * limitations under the License.
31  */
33 /**
34  * @fileoverview Definitions for the Chromium extensions API.
35  *
36  * This is the externs file for the Chrome Extensions API.
37  * See http://developer.chrome.com/extensions/
38  *
39  * There are several problematic issues regarding Chrome extension APIs and
40  * this externs files, including:
41  * A. When to add packages to this file
42  * B. Optional parameters
43  * C. Pseudo-types
44  * D. Events
45  * E. Nullability
46  * F. Private APIs
47  * G. Enums
48  *
49  * The best practices for each are described in more detail below.  It
50  * should be noted that, due to historical reasons, and the evolutionary
51  * nature of this file, much this file currently violates the best practices
52  * described below. As changed are made, the changes should adhere to the
53  * best practices.
54  *
55  * A. When to Add Packages to this File?
56  * Packages in chrome.experimental.* should *not* be added to this file. The
57  * experimental APIs change very quickly, so rather than add them here, make a
58  * separate externs file for your project, then move the API here when it moves
59  * out of experimental.
60  *
61  * Some non-experimental APIs are still evolving or are not full documented. It
62  * is still advantageous to include these in this file as doing so avoids a
63  * proliferation of project-private externs files containing duplicated info. In
64  * these cases, use comments to describe the situation.
65  *
66  * B. Optional Parameters
67  * The Chrome extension APIs make extensive use of optional parameters that
68  * are not at the end of the parameter list, "interior optional parameters",
69  * while the JS Compiler's type system requires optional parameters to be
70  * at the end. This creates a bit of tension:
71  *
72  * 1. If a method has N required params, then the parameter declarations
73  *    should have N required params.
74  * 2. If, due to interior optional params, a parameter can be of more than
75  *    one type, its at-param should:
76  *    a. be named to indicate both possibilities, eg, extensionIdOrRequest,
77  *       or getInfoOrCallback.
78  *    b. the type should include both types, in the same order as the parts
79  *       of the name, even when one type subsumes the other, eg, {string|*}
80  *       or {Object|function(string)}.
81  * See chrome.runtime.sendMessage for a complex example as sendMessage
82  * takes three params with the first and third being optional.
83  *
84  * C. Pseudo-types
85  * The Chrome APIs define many types are that actually pseudo-types, that
86  * is, they can't be instantiated by name. The extension APIs also pass
87  * untyped objects (a bag of properties) to callbacks.
88  *
89  * The Chrome extension APIs include at least three different situations:
90  *
91  * 1. an object that must be created by an extension developer and passed
92  *    into a Chrome extension API and for which there is no constructor.
93  * 2. an instance of a type that is created inside the extension libraries
94  *    and passed out to a callback/listener or returned by an extension API
95  *    (the constructor implicity lives within the library).
96  * 3. like #2, but a bag-of-properties object that is passed out to a
97  *    callback/listener or returned by an extension API so there is no
98  *    defined type.
99  *
100  * For #1, use a typedef so object literals and objects created via goog.object
101  * are acceptable, for example, the Permissions type defined at
102  * http://developer.chrome.com/extensions/permissions.html#type-Permissions
103  * should be:
105  *   / **
106  *     * at-typedef {?{
107  *     *   permissions: (!Array<string>|undefined),
108  *     *   origins: (!Array<string>|undefined)
109  *     * }}
110  *     * /
111  *   chrome.permissions.Permissions;
113  * Using typedefs provides type-safety for the fields that are defined in
114  * the object literal and also defined in the typedef. Note that typedefs define
115  * a minimal interface and will not complain about extraneous (often
116  * misspelled) fields.
118  * Also, typedefs of record types are non-nullable by default. The "{?{"
119  * creates a nullable record-type typedef so ! has the same meaning in usages
120  * as it does for real types.
122  * For #2, use a standard constructor, even though no constructor is provided
123  * and extension writers will never instantiate an instance, as using a first
124  * class type provides the strongest type checking. For example, see the Port
125  * type defined at http://developer.chrome.com/apps/runtime.html#type-Port.
126  * Always qualify the type name to reduce top-level pollution in this file:
128  *   Do:
129  *        chrome.extension.Port = function() {}
130  *   Don't:
131  *        function Port() {}
133  * Note that, unfortunately, the actual Port class definition in this file
134  * does not follow this recommendation.
136  * For #3, use {!Object}, that is, a bag of properites. This is a sad reality
137  * given that the Chrome extensions do not document a real type. It is tempting
138  * to define a real-type within this file and treat this situation as identical
139  * to #2, but that means a new type is being defined in this file and developers
140  * do not expect to find required new types in extension files.
142  * If a real type is declared here, then developers will need to incorporate
143  * that type into the signature of their callback method and there will be
144  * no indication from the docs that they need to do so.
146  * D. Events
147  * Most packages define a set of events with the standard set of methods:
148  * addListener, removeListener, hasListener and hasListeners.  ChromeEvent
149  * is the appropriate type when an event's listeners do not take any
150  * parameters, however, many events take parameters specific to that event:
152  * 1. Create a pseudo-type for the event, for example,
153  *    chrome.runtime.PortEvent and define the four methods on it.
154  * 2. Fully describe the listener/callback's signature, for example,
156  *       * at-param {function(!chrome.runtime.Port): void} callback Callback.
157  *      chrome.runtime.PortEvent.prototype.addListener =
158  *          function(callback) {};
159  *    or
161  *       * at-param {function(*, !chrome.runtime.MessageSender,
162  *       *     function(*): void): (boolean|undefined)} callback Callback.
163  *      chrome.runtime.MessageSenderEvent.prototype.addListener =
164  *          function(callback) {};
166  * E. Nullability
167  * We treat the Chrome Extension API pages as "the truth".  Not-null types
168  * should be used in the following situations:
170  * 1. Parameters and return values that are not explicitly declared to handle
171  *    null.
172  * 2. Static event instances, for example, chrome.runtime.onConnect's type
173  *    should be: !chrome.runtime.PortEvent.
174  * 3. Optional params as there is little value to passing null when the
175  *    parameter can be omitted, of course, if null is explicitly declared
176  *    to be meaningful, then a nullable type should be used.
178  * F. Private APIs
179  * Private Chrome APIs (such as those that end in "Private") should go at the
180  * bottom of this file.
182  * G. Enums
183  * The Chrome extension APIs define many enums that define a set of acceptable
184  * strings, however, they do not reify those enum types, therefore, enum
185  * parameters should be defined as {@code string}.
187  * @externs
189  */
193  * Ensure projects don't execute this file.
194  * The throw is to catch executions of this file, however, without the guard,
195  * the compiler's flow analysis stops at the throw, even for an externs file.
196  * Therefore, the Math.random() guard fools the compiler during externs
197  * processing.
198  */
199 if (Math.random() < 1) {  // always true but the compiler doesn't know that
200   throw 'Externs file "chrome_extensions.js" should not be executed';
205  * @see https://developer.chrome.com/extensions/accessibilityFeatures
206  * @const
207  */
208 chrome.accessibilityFeatures = {};
211 /** @type {!ChromeSetting} */
212 chrome.accessibilityFeatures.spokenFeedback;
215 /** @type {!ChromeSetting} */
216 chrome.accessibilityFeatures.largeCursor;
219 /** @type {!ChromeSetting} */
220 chrome.accessibilityFeatures.stickyKeys;
223 /** @type {!ChromeSetting} */
224 chrome.accessibilityFeatures.highContrast;
227 /** @type {!ChromeSetting} */
228 chrome.accessibilityFeatures.screenMagnifier;
231 /** @type {!ChromeSetting} */
232 chrome.accessibilityFeatures.autoclick;
235 /** @type {!ChromeSetting} */
236 chrome.accessibilityFeatures.virtualKeyboard;
239 /** @type {!ChromeSetting} */
240 chrome.accessibilityFeatures.animationPolicy;
244  * @const
245  * @see http://developer.chrome.com/apps/app.runtime.html
246  */
247 chrome.app.runtime = {};
252  * @constructor
253  * @see http://developer.chrome.com/apps/app_runtime.html
254  */
255 chrome.app.runtime.LaunchItem = function() {};
258 /** @type {!FileEntry} */
259 chrome.app.runtime.LaunchItem.prototype.entry;
262 /** @type {string} */
263 chrome.app.runtime.LaunchItem.prototype.type;
266 /** @type {!ChromeObjectEvent} */
267 chrome.app.runtime.onLaunched;
271  * @type {!ChromeEvent}
272  * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
273  */
274 chrome.app.runtime.onRestarted;
278  * @const
279  * @see http://developer.chrome.com/apps/app.window.html
280  */
281 chrome.app.window = {};
285  * @see https://developer.chrome.com/apps/app_window#method-getAll
286  * @return {!Array<!chrome.app.window.AppWindow>}
287  */
288 chrome.app.window.getAll = function() {};
292  * @see https://developer.chrome.com/apps/app_window#method-get
293  * @param {string} id
294  * @return {chrome.app.window.AppWindow}
295  */
296 chrome.app.window.get = function(id) {};
301  * @constructor
302  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
303  */
304 chrome.app.window.AppWindow = function() {};
308  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
309  */
310 chrome.app.window.AppWindow.prototype.focus = function() {};
314  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
315  */
316 chrome.app.window.AppWindow.prototype.fullscreen = function() {};
320  * @return {boolean}
321  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
322  */
323 chrome.app.window.AppWindow.prototype.isFullscreen = function() {};
327  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
328  */
329 chrome.app.window.AppWindow.prototype.minimize = function() {};
333  * @return {boolean}
334  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
335  */
336 chrome.app.window.AppWindow.prototype.isMinimized = function() {};
340  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
341  */
342 chrome.app.window.AppWindow.prototype.maximize = function() {};
346  * @return {boolean}
347  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
348  */
349 chrome.app.window.AppWindow.prototype.isMaximized = function() {};
353  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
354  */
355 chrome.app.window.AppWindow.prototype.restore = function() {};
359  * @param {number} left The new left position, in pixels.
360  * @param {number} top The new top position, in pixels.
361  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
362  */
363 chrome.app.window.AppWindow.prototype.moveTo = function(left, top) {};
367  * @param {number} width The new width, in pixels.
368  * @param {number} height The new height, in pixels.
369  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
370  */
371 chrome.app.window.AppWindow.prototype.resizeTo = function(width, height) {};
375  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
376  */
377 chrome.app.window.AppWindow.prototype.drawAttention = function() {};
381  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
382  */
383 chrome.app.window.AppWindow.prototype.clearAttention = function() {};
387  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
388  */
389 chrome.app.window.AppWindow.prototype.close = function() {};
393  * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
394  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
395  */
396 chrome.app.window.AppWindow.prototype.show = function(opt_focus) {};
400  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
401  */
402 chrome.app.window.AppWindow.prototype.hide = function() {};
406  * @return {!chrome.app.window.Bounds} The current window bounds.
407  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
408  */
409 chrome.app.window.AppWindow.prototype.getBounds = function() {};
413  * @param {!chrome.app.window.Bounds} bounds The new window bounds.
414  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
415  */
416 chrome.app.window.AppWindow.prototype.setBounds = function(bounds) {};
420  * @return {boolean}
421  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
422  */
423 chrome.app.window.AppWindow.prototype.isAlwaysOnTop = function() {};
427  * @param {boolean} alwaysOnTop Set whether the window should stay above most
428  *     other windows.
429  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
430  */
431 chrome.app.window.AppWindow.prototype.setAlwaysOnTop = function(alwaysOnTop) {};
434 /** @type {!ChromeEvent} */
435 chrome.app.window.AppWindow.prototype.onBoundsChanged;
438 /** @type {!ChromeEvent} */
439 chrome.app.window.AppWindow.prototype.onClosed;
442 /** @type {!ChromeEvent} */
443 chrome.app.window.AppWindow.prototype.onFullscreened;
446 /** @type {!ChromeEvent} */
447 chrome.app.window.AppWindow.prototype.onMinimized;
450 /** @type {!ChromeEvent} */
451 chrome.app.window.AppWindow.prototype.onMaximized;
454 /** @type {!ChromeEvent} */
455 chrome.app.window.AppWindow.prototype.onRestored;
458 /** @type {!Window} */
459 chrome.app.window.AppWindow.prototype.contentWindow;
463  * @typedef {?{
464  *   left: number,
465  *   top: number,
466  *   width: number,
467  *   height: number,
468  *   minWidth: (number|undefined),
469  *   minHeight: (number|undefined),
470  *   maxWidth: (number|undefined),
471  *   maxHeight: (number|undefined),
472  *   setPosition: function(number, number),
473  *   setSize: function(number, number),
474  *   setMinimumSize: function(number, number),
475  *   setMaximumSize: function(number, number)
476  * }}
477  * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
478  */
479 chrome.app.window.Bounds;
483  * @typedef {?{
484  *   left: (number|undefined),
485  *   top: (number|undefined),
486  *   width: (number|undefined),
487  *   height: (number|undefined),
488  *   minWidth: (number|undefined),
489  *   minHeight: (number|undefined),
490  *   maxWidth: (number|undefined),
491  *   maxHeight: (number|undefined)
492  * }}
493  * @see http://developer.chrome.com/apps/app_window#type-BoundsSpecification
494  */
495 chrome.app.window.BoundsSpecification;
499  * @typedef {?{
500  *   left: (number|undefined),
501  *   top: (number|undefined),
502  *   width: (number|undefined),
503  *   height: (number|undefined)
504  * }}
505  * @see http://developer.chrome.com/apps/app_window#type-ContentBounds
506  */
507 chrome.app.window.ContentBounds;
511  * @typedef {?{
512  *   type: (string|undefined),
513  *   color: (string|undefined),
514  *   activeColor: (string|undefined),
515  *   inactiveColor: (string|undefined)
516  * }}
517  * @see http://developer.chrome.com/apps/app_window#type-FrameOptions
518  */
519 chrome.app.window.FrameOptions;
523  * @typedef {?{
524  *   id: (string|undefined),
525  *   innerBounds: (!chrome.app.window.BoundsSpecification|undefined),
526  *   outerBounds: (!chrome.app.window.BoundsSpecification|undefined),
527  *   minWidth: (number|undefined),
528  *   minHeight: (number|undefined),
529  *   maxWidth: (number|undefined),
530  *   maxHeight: (number|undefined),
531  *   frame: (!chrome.app.window.FrameOptions|string|undefined),
532  *   bounds: (!chrome.app.window.ContentBounds|undefined),
533  *   state: (string|undefined),
534  *   hidden: (boolean|undefined),
535  *   resizable: (boolean|undefined),
536  *   singleton: (boolean|undefined),
537  *   alwaysOnTop: (boolean|undefined),
538  *   focused: (boolean|undefined),
539  *   visibleOnAllWorkspaces: (boolean|undefined)
540  * }}
541  * @see http://developer.chrome.com/apps/app.window.html#method-create
542  */
543 chrome.app.window.CreateWindowOptions;
547  * @param {string} url URL to create.
548  * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
549  *     the new window.
550  * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
551  *     Callback to be run.
552  * @see http://developer.chrome.com/apps/app.window.html#method-create
553  */
554 chrome.app.window.create = function(
555     url, opt_options, opt_createWindowCallback) {};
559  * Returns an AppWindow object for the current script context (ie JavaScript
560  * 'window' object).
561  * @return {!chrome.app.window.AppWindow}
562  * @see http://developer.chrome.com/apps/app.window.html#method-current
563  */
564 chrome.app.window.current = function() {};
568  * @type {!ChromeEvent}
569  * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
570  */
571 chrome.app.window.onBoundsChanged;
575  * @type {!ChromeEvent}
576  * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
577  */
578 chrome.app.window.onClosed;
582  * @type {!ChromeEvent}
583  * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
584  */
585 chrome.app.window.onFullscreened;
589  * @type {!ChromeEvent}
590  * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
591  */
592 chrome.app.window.onMaximized;
596  * @type {!ChromeEvent}
597  * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
598  */
599 chrome.app.window.onMinimized;
603  * @type {!ChromeEvent}
604  * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
605  */
606 chrome.app.window.onRestored;
610  * Private API.
612  * @const
613  * @see https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/audio_modem.idl
614  * @see go/chrome-modem
615  */
616 chrome.audioModem = {};
620  * @typedef {?{
621  *   tokenLength: number,
622  *   crc: (boolean|undefined),
623  *   parity: (boolean|undefined)
624  * }}
625  */
626 chrome.audioModem.TokenEncoding;
630  * @typedef {?{
631  *   timeoutMillis: number,
632  *   band: string,
633  *   encoding: !chrome.audioModem.TokenEncoding
634  * }}
635  */
636 chrome.audioModem.RequestParams;
639 /** @constructor */
640 chrome.audioModem.ReceivedToken = function() {};
643 /** @type {!ArrayBuffer} */
644 chrome.audioModem.ReceivedToken.prototype.token;
647 /** @type {string} */
648 chrome.audioModem.ReceivedToken.prototype.band;
652  * @param {!chrome.audioModem.RequestParams} params
653  * @param {!ArrayBuffer} token
654  * @param {function(string)} callback
655  */
656 chrome.audioModem.transmit = function(params, token, callback) {};
660  * @param {string} band
661  * @param {function(string)} callback
662  */
663 chrome.audioModem.stopTransmit = function(band, callback) {};
667  * @param {!chrome.audioModem.RequestParams} params
668  * @param {function(string)} callback
669  */
670 chrome.audioModem.receive = function(params, callback) {};
674  * @param {string} band
675  * @param {function(string)} callback
676  */
677 chrome.audioModem.stopReceive = function(band, callback) {};
680 /** @constructor */
681 chrome.audioModem.ReceivedEvent = function() {};
685  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
686  */
687 chrome.audioModem.ReceivedEvent.prototype.addListener = function(callback) {};
691  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
692  */
693 chrome.audioModem.ReceivedEvent.prototype.removeListener =
694     function(callback) {};
698  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
699  * @return {boolean}
700  */
701 chrome.audioModem.ReceivedEvent.prototype.hasListener = function(callback) {};
705  * @return {boolean}
706  */
707 chrome.audioModem.ReceivedEvent.prototype.hasListeners = function() {};
710 /** @type {!chrome.audioModem.ReceivedEvent} */
711 chrome.audioModem.onReceived;
714 /** @type {!ChromeStringEvent} */
715 chrome.audioModem.onTransmitFail;
719  * @const
720  * @see https://developer.chrome.com/apps/bluetooth
721  */
722 chrome.bluetooth = function() {};
727  * @constructor
728  * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
729  */
730 chrome.bluetooth.AdapterState = function() {};
733 /** @type {string} */
734 chrome.bluetooth.AdapterState.prototype.address;
737 /** @type {string} */
738 chrome.bluetooth.AdapterState.prototype.name;
741 /** @type {boolean} */
742 chrome.bluetooth.AdapterState.prototype.powered;
745 /** @type {boolean} */
746 chrome.bluetooth.AdapterState.prototype.available;
749 /** @type {boolean} */
750 chrome.bluetooth.AdapterState.prototype.discovering;
755  * @constructor
756  * @see https://developer.chrome.com/apps/bluetooth#type-Device
757  */
758 chrome.bluetooth.Device = function() {};
761 /** @type {string} */
762 chrome.bluetooth.Device.prototype.address;
765 /** @type {string|undefined} */
766 chrome.bluetooth.Device.prototype.name;
769 /** @type {number|undefined} */
770 chrome.bluetooth.Device.prototype.deviceClass;
773 /** @type {string|undefined} */
774 chrome.bluetooth.Device.prototype.vendorIdSource;
777 /** @type {string|undefined} */
778 chrome.bluetooth.Device.prototype.vendorId;
781 /** @type {number|undefined} */
782 chrome.bluetooth.Device.prototype.productId;
785 /** @type {number|undefined} */
786 chrome.bluetooth.Device.prototype.deviceId;
789 /** @type {string|undefined} */
790 chrome.bluetooth.Device.prototype.type;
793 /** @type {boolean|undefined} */
794 chrome.bluetooth.Device.prototype.paired;
797 /** @type {boolean|undefined} */
798 chrome.bluetooth.Device.prototype.connected;
801 /** @type {!Array<string>|undefined} */
802 chrome.bluetooth.Device.prototype.uuids;
806  * @param {function(!chrome.bluetooth.AdapterState)} callback
807  * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
808  */
809 chrome.bluetooth.getAdapterState = function(callback) {};
813  * @param {string} deviceAddress
814  * @param {function(!chrome.bluetooth.Device)} callback
815  * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
816  */
817 chrome.bluetooth.getDevice = function(deviceAddress, callback) {};
821  * @param {function(!Array<!chrome.bluetooth.Device>)} callback
822  * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
823  */
824 chrome.bluetooth.getDevices = function(callback) {};
828  * @param {function()=} opt_callback
829  * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
830  */
831 chrome.bluetooth.startDiscovery = function(opt_callback) {};
835  * @param {function()=} opt_callback
836  * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
837  */
838 chrome.bluetooth.stopDiscovery = function(opt_callback) {};
843  * Event whose listeners take an AdapaterState parameter.
844  * @constructor
845  */
846 chrome.bluetooth.AdapterStateEvent = function() {};
849 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
850 chrome.bluetooth.AdapterStateEvent.prototype.addListener =
851     function(callback) {};
854 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
855 chrome.bluetooth.AdapterStateEvent.prototype.removeListener =
856     function(callback) {};
860  * @param {function(!chrome.bluetooth.AdapterState): void} callback
861  * @return {boolean}
862  */
863 chrome.bluetooth.AdapterStateEvent.prototype.hasListener =
864     function(callback) {};
867 /** @return {boolean} */
868 chrome.bluetooth.AdapterStateEvent.prototype.hasListeners = function() {};
872  * @type {!chrome.bluetooth.AdapterStateEvent}
873  * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
874  */
875 chrome.bluetooth.onAdapterStateChanged;
880  * Event whose listeners take an Device parameter.
881  * @constructor
882  */
883 chrome.bluetooth.DeviceEvent = function() {};
886 /** @param {function(!chrome.bluetooth.Device): void} callback */
887 chrome.bluetooth.DeviceEvent.prototype.addListener = function(callback) {};
890 /** @param {function(!chrome.bluetooth.Device): void} callback */
891 chrome.bluetooth.DeviceEvent.prototype.removeListener = function(callback) {};
895  * @param {function(!chrome.bluetooth.Device): void} callback
896  * @return {boolean}
897  */
898 chrome.bluetooth.DeviceEvent.prototype.hasListener = function(callback) {};
901 /** @return {boolean} */
902 chrome.bluetooth.DeviceEvent.prototype.hasListeners = function() {};
906  * @type {!chrome.bluetooth.DeviceEvent}
907  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
908  */
909 chrome.bluetooth.onDeviceAdded;
913  * @type {!chrome.bluetooth.DeviceEvent}
914  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
915  */
916 chrome.bluetooth.onDeviceChanged;
920  * @type {!chrome.bluetooth.DeviceEvent}
921  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
922  */
923 chrome.bluetooth.onDeviceRemoved;
927  * @const
928  * @see https://developer.chrome.com/apps/bluetoothSocket
929  */
930 chrome.bluetoothSocket = {};
934  * @typedef {{
935  *   persistent: (boolean|undefined),
936  *   name: (string|undefined),
937  *   bufferSize: (number|undefined)
938  * }}
939  * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
940  */
941 chrome.bluetoothSocket.SocketProperties;
945  * @typedef {{
946  *   channel: (number|undefined),
947  *   psm: (number|undefined),
948  *   backlog: (number|undefined)
949  * }}
950  * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
951  */
952 chrome.bluetoothSocket.ListenOptions;
957  * @constructor
958  * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
959  */
960 chrome.bluetoothSocket.SocketInfo = function() {};
963 /** @type {number} */
964 chrome.bluetoothSocket.SocketInfo.prototype.socketId;
967 /** @type {boolean} */
968 chrome.bluetoothSocket.SocketInfo.prototype.persistent;
971 /** @type {string|undefined} */
972 chrome.bluetoothSocket.SocketInfo.prototype.name;
975 /** @type {number|undefined} */
976 chrome.bluetoothSocket.SocketInfo.prototype.bufferSize;
979 /** @type {boolean} */
980 chrome.bluetoothSocket.SocketInfo.prototype.paused;
983 /** @type {boolean} */
984 chrome.bluetoothSocket.SocketInfo.prototype.connected;
987 /** @type {string|undefined} */
988 chrome.bluetoothSocket.SocketInfo.prototype.address;
991 /** @type {string|undefined} */
992 chrome.bluetoothSocket.SocketInfo.prototype.uuid;
996  * @param {!chrome.bluetoothSocket.SocketProperties|
997  *     function(!{socketId: number})} propertiesOrCallback
998  * @param {function(!{socketId: number})=} opt_callback
999  * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
1000  */
1001 chrome.bluetoothSocket.create = function(propertiesOrCallback, opt_callback) {};
1005  * @param {number} socketId
1006  * @param {!chrome.bluetoothSocket.SocketProperties} properties
1007  * @param {function()=} opt_callback
1008  * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
1009  */
1010 chrome.bluetoothSocket.update = function(socketId, properties, opt_callback) {};
1014  * @param {number} socketId
1015  * @param {boolean} paused
1016  * @param {function()=} opt_callback
1017  * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
1018  */
1019 chrome.bluetoothSocket.setPaused = function(socketId, paused, opt_callback) {};
1023  * @param {number} socketId
1024  * @param {string} uuid
1025  * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1026  * @param {function()=} opt_callback
1027  * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingRfcomm
1028  */
1029 chrome.bluetoothSocket.listenUsingRfcomm =
1030     function(socketId, uuid, optionsOrCallback, opt_callback) {};
1034  * @param {number} socketId
1035  * @param {string} uuid
1036  * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1037  * @param {function()=} opt_callback
1038  * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
1039  */
1040 chrome.bluetoothSocket.listenUsingL2cap =
1041     function(socketId, uuid, optionsOrCallback, opt_callback) {};
1045  * @param {number} socketId
1046  * @param {string} address
1047  * @param {string} uuid
1048  * @param {function()} callback
1049  * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
1050  */
1051 chrome.bluetoothSocket.connect = function(socketId, address, uuid, callback) {};
1055  * @param {number} socketId
1056  * @param {function()=} opt_callback
1057  * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
1058  */
1059 chrome.bluetoothSocket.disconnect = function(socketId, opt_callback) {};
1063  * @param {number} socketId
1064  * @param {function()=} opt_callback
1065  * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
1066  */
1067 chrome.bluetoothSocket.close = function(socketId, opt_callback) {};
1071  * @param {number} socketId
1072  * @param {!ArrayBuffer} data
1073  * @param {function(number)=} opt_callback
1074  * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
1075  */
1076 chrome.bluetoothSocket.send = function(socketId, data, opt_callback) {};
1080  * @param {number} socketId
1081  * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
1082  * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
1083  */
1084 chrome.bluetoothSocket.getInfo = function(socketId, callback) {};
1088  * @param {function(!Array<!chrome.bluetoothSocket.SocketInfo>)} callback
1089  * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
1090  */
1091 chrome.bluetoothSocket.getSockets = function(callback) {};
1096  * @constructor
1097  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
1098  */
1099 chrome.bluetoothSocket.AcceptEventData = function() {};
1102 /** @type {number} */
1103 chrome.bluetoothSocket.AcceptEventData.prototype.socketId;
1106 /** @type {number} */
1107 chrome.bluetoothSocket.AcceptEventData.prototype.clientSocketId;
1112  * Event whose listeners take a AcceptEventData parameter.
1113  * @constructor
1114  */
1115 chrome.bluetoothSocket.AcceptEvent = function() {};
1119  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1120  */
1121 chrome.bluetoothSocket.AcceptEvent.prototype.addListener =
1122     function(callback) {};
1126  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1127  */
1128 chrome.bluetoothSocket.AcceptEvent.prototype.removeListener =
1129     function(callback) {};
1133  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1134  * @return {boolean}
1135  */
1136 chrome.bluetoothSocket.AcceptEvent.prototype.hasListener =
1137     function(callback) {};
1140 /** @return {boolean} */
1141 chrome.bluetoothSocket.AcceptEvent.prototype.hasListeners = function() {};
1144 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
1145 chrome.bluetoothSocket.onAccept;
1150  * @constructor
1151  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
1152  */
1153 chrome.bluetoothSocket.AcceptErrorEventData = function() {};
1156 /** @type {number} */
1157 chrome.bluetoothSocket.AcceptErrorEventData.prototype.socketId;
1160 /** @type {string} */
1161 chrome.bluetoothSocket.AcceptErrorEventData.prototype.errorMessage;
1164 /** @type {string} */
1165 chrome.bluetoothSocket.AcceptErrorEventData.prototype.error;
1170  * Event whose listeners take a AcceptErrorEventData parameter.
1171  * @constructor
1172  */
1173 chrome.bluetoothSocket.AcceptErrorEvent = function() {};
1177  * @param {function(
1178  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1179  */
1180 chrome.bluetoothSocket.AcceptErrorEvent.prototype.addListener =
1181     function(callback) {};
1185  * @param {function(
1186  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1187  */
1188 chrome.bluetoothSocket.AcceptErrorEvent.prototype.removeListener =
1189     function(callback) {};
1193  * @param {function(
1194  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1195  * @return {boolean}
1196  */
1197 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListener =
1198     function(callback) {};
1201 /** @return {boolean} */
1202 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListeners =
1203     function() {};
1206 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1207 chrome.bluetoothSocket.onAcceptError;
1212  * @constructor
1213  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1214  */
1215 chrome.bluetoothSocket.ReceiveEventData = function() {};
1218 /** @type {number} */
1219 chrome.bluetoothSocket.ReceiveEventData.prototype.socketId;
1222 /** @type {!ArrayBuffer} */
1223 chrome.bluetoothSocket.ReceiveEventData.prototype.data;
1228  * Event whose listeners take a ReceiveEventData parameter.
1229  * @constructor
1230  */
1231 chrome.bluetoothSocket.ReceiveEvent = function() {};
1235  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1236  */
1237 chrome.bluetoothSocket.ReceiveEvent.prototype.addListener =
1238     function(callback) {};
1242  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1243  */
1244 chrome.bluetoothSocket.ReceiveEvent.prototype.removeListener =
1245     function(callback) {};
1249  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1250  * @return {boolean}
1251  */
1252 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListener =
1253     function(callback) {};
1256 /** @return {boolean} */
1257 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListeners = function() {};
1260 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1261 chrome.bluetoothSocket.onReceive;
1266  * @constructor
1267  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1268  */
1269 chrome.bluetoothSocket.ReceiveErrorEventData = function() {};
1272 /** @type {number} */
1273 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.socketId;
1276 /** @type {string} */
1277 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.errorMessage;
1280 /** @type {string} */
1281 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.error;
1286  * Event whose listeners take a ReceiveErrorEventData parameter.
1287  * @constructor
1288  */
1289 chrome.bluetoothSocket.ReceiveErrorEvent = function() {};
1293  * @param {function(
1294  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1295  */
1296 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.addListener =
1297     function(callback) {};
1301  * @param {function(
1302  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1303  */
1304 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.removeListener =
1305     function(callback) {};
1309  * @param {function(
1310  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1311  * @return {boolean}
1312  */
1313 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListener =
1314     function(callback) {};
1317 /** @return {boolean} */
1318 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListeners =
1319     function() {};
1322 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1323 chrome.bluetoothSocket.onReceiveError;
1327  * @see https://developer.chrome.com/apps/bluetoothLowEnergy
1328  * @const
1329  */
1330 chrome.bluetoothLowEnergy = {};
1334  * @constructor
1335  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Service
1336  */
1337 chrome.bluetoothLowEnergy.Service = function() {};
1340 /** @type {string} */
1341 chrome.bluetoothLowEnergy.Service.prototype.uuid;
1344 /** @type {boolean} */
1345 chrome.bluetoothLowEnergy.Service.prototype.isPrimary;
1348 /** @type {string|undefined} */
1349 chrome.bluetoothLowEnergy.Service.prototype.instanceId;
1352 /** @type {string|undefined} */
1353 chrome.bluetoothLowEnergy.Service.prototype.deviceAddress;
1357  * @constructor
1358  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Characteristic
1359  */
1360 chrome.bluetoothLowEnergy.Characteristic = function() {};
1363 /** @type {string} */
1364 chrome.bluetoothLowEnergy.Characteristic.prototype.uuid;
1367 /** @type {!chrome.bluetoothLowEnergy.Service} */
1368 chrome.bluetoothLowEnergy.Characteristic.prototype.service;
1371 /** @type {!Array<string>} */
1372 chrome.bluetoothLowEnergy.Characteristic.prototype.properties;
1375 /** @type {string|undefined} */
1376 chrome.bluetoothLowEnergy.Characteristic.prototype.instanceId;
1379 /** @type {!ArrayBuffer|undefined} */
1380 chrome.bluetoothLowEnergy.Characteristic.prototype.value;
1384  * @constructor
1385  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Descriptor
1386  */
1387 chrome.bluetoothLowEnergy.Descriptor = function() {};
1389 /** @type {string} */
1390 chrome.bluetoothLowEnergy.Descriptor.prototype.uuid;
1393 /** @type {!chrome.bluetoothLowEnergy.Characteristic} */
1394 chrome.bluetoothLowEnergy.Descriptor.prototype.characteristic;
1397 /** @type {string|undefined} */
1398 chrome.bluetoothLowEnergy.Descriptor.prototype.instanceId;
1401 /** @type {!ArrayBuffer|undefined} */
1402 chrome.bluetoothLowEnergy.Descriptor.prototype.value;
1406  * @typedef {?{
1407  *   persistent: boolean
1408  * }}
1409  */
1410 chrome.bluetoothLowEnergy.ConnectionProperties;
1414  * @param {string} deviceAddress
1415  * @param {!chrome.bluetoothLowEnergy.ConnectionProperties|function()}
1416  *     propertiesOrCallback
1417  * @param {function()=} opt_callback
1418  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect
1419  */
1420 chrome.bluetoothLowEnergy.connect =
1421   function(deviceAddress, propertiesOrCallback, opt_callback) {};
1424  * @param {string} deviceAddress
1425  * @param {function()=} opt_callback
1426  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect
1427  */
1428 chrome.bluetoothLowEnergy.disconnect = function(deviceAddress, opt_callback) {};
1432  * @param {string} serviceId
1433  * @param {function(!chrome.bluetoothLowEnergy.Service)} callback
1434  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService
1435  */
1436 chrome.bluetoothLowEnergy.getService = function(serviceId, callback) {};
1440  * @param {string} deviceAddress
1441  * @param {function(!Array<!chrome.bluetoothLowEnergy.Service>)} callback
1442  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices
1443  */
1444 chrome.bluetoothLowEnergy.getServices = function(deviceAddress, callback) {};
1448  * @param {string} characteristicId
1449  * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1450  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic
1451  */
1452 chrome.bluetoothLowEnergy.getCharacteristic =
1453     function(characteristicId, callback) {};
1457  * @param {string} serviceId
1458  * @param {function(!Array<!chrome.bluetoothLowEnergy.Characteristic>)}
1459  * callback
1460  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics
1461  */
1462 chrome.bluetoothLowEnergy.getCharacteristics =
1463     function(serviceId, callback) {};
1467  * @param {string} serviceId
1468  * @param {function(!Array<!chrome.bluetoothLowEnergy.Service>)} callback
1469  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices
1470  */
1471 chrome.bluetoothLowEnergy.getIncludedServices =
1472   function(serviceId, callback) {};
1476  * @param {string} descriptorId
1477  * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1478  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor
1479  */
1480 chrome.bluetoothLowEnergy.getDescriptor = function(descriptorId, callback) {};
1484  * @param {string} characteristicId
1485  * @param {function(!Array<!chrome.bluetoothLowEnergy.Descriptor>)} callback
1486  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors
1487  */
1488 chrome.bluetoothLowEnergy.getDescriptors =
1489   function(characteristicId, callback) {};
1493  * @param {string} characteristicId
1494  * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1495  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue
1496  */
1497 chrome.bluetoothLowEnergy.readCharacteristicValue =
1498   function(characteristicId, callback) {};
1502  * @param {string} characteristicId
1503  * @param {!ArrayBuffer} value
1504  * @param {function()} callback
1505  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue
1506  */
1507 chrome.bluetoothLowEnergy.writeCharacteristicValue =
1508   function(characteristicId, value, callback) {};
1512  * @typedef {?{
1513  *   persistent: boolean
1514  * }}
1515  */
1516 chrome.bluetoothLowEnergy.NotificationSessionProperties;
1519   * @param {string} characteristicId
1520   * @param {!chrome.bluetoothLowEnergy.NotificationSessionProperties|function()}
1521   *     propertiesOrCallback
1522   * @param {function()=} opt_callback
1523   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications
1524   */
1525 chrome.bluetoothLowEnergy.startCharacteristicNotifications =
1526   function(characteristicId, propertiesOrCallback, opt_callback) {};
1530   * @param {string} characteristicId
1531   * @param {function()=} opt_callback
1532   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications
1533   */
1534 chrome.bluetoothLowEnergy.stopCharacteristicNotifications =
1535   function(characteristicId, opt_callback) {};
1539  * @param {string} descriptorId
1540  * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1541  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue
1542  */
1543 chrome.bluetoothLowEnergy.readDescriptorValue =
1544   function(descriptorId, callback) {};
1548  * @param {string} descriptorId
1549  * @param {!ArrayBuffer} value
1550  * @param {function()} callback
1551  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue
1552  */
1553 chrome.bluetoothLowEnergy.writeDescriptorValue =
1554   function(descriptorId, value, callback) {};
1558  * Event whose listeners take a Service parameter.
1559  * @constructor
1560  */
1561 chrome.bluetoothLowEnergy.ServiceEvent = function() {};
1564 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1565 chrome.bluetoothLowEnergy.ServiceEvent.prototype.addListener =
1566     function(callback) {};
1569 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1570 chrome.bluetoothLowEnergy.ServiceEvent.prototype.removeListener =
1571     function(callback) {};
1574  * @param {function(!chrome.bluetoothLowEnergy.Service): void} callback
1575  * @return {boolean}
1576  */
1577 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListener =
1578     function(callback) {};
1581 /** @return {boolean} */
1582 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListeners =
1583     function() {};
1586   * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1587   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded
1588   */
1589 chrome.bluetoothLowEnergy.onServiceAdded;
1593  * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1594  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged
1595  */
1596 chrome.bluetoothLowEnergy.onServiceChanged;
1600   * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1601   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved
1602   */
1603 chrome.bluetoothLowEnergy.onServiceRemoved;
1607  * Event whose listeners take a Characteristic parameter.
1608  * @constructor
1609  */
1610 chrome.bluetoothLowEnergy.CharacteristicEvent = function() {};
1614  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1615  *     callback
1616  */
1617 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.addListener =
1618     function(callback) {};
1622  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1623  *     callback
1624  */
1625 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.removeListener =
1626     function(callback) {};
1630  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1631  *     callback
1632  * @return {boolean}
1633  */
1634 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListener =
1635     function(callback) {};
1638 /** @return {boolean} */
1639 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListeners =
1640     function() {};
1644  * @type {!chrome.bluetoothLowEnergy.CharacteristicEvent}
1645  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged
1646  */
1647 chrome.bluetoothLowEnergy.onCharacteristicValueChanged;
1651  * Event whose listeners take a Characteristic parameter.
1652  * @constructor
1653  */
1654 chrome.bluetoothLowEnergy.DescriptorEvent = function() {};
1658  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1659  *     callback
1660  */
1661 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.addListener =
1662     function(callback) {};
1666  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1667  *     callback
1668  */
1669 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.removeListener =
1670     function(callback) {};
1674  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void} callback
1675  * @return {boolean}
1676  */
1677 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListener =
1678     function(callback) {};
1681 /** @return {boolean} */
1682 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListeners =
1683     function() {};
1687  * @type {!chrome.bluetoothLowEnergy.DescriptorEvent}
1688  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged
1689  */
1690 chrome.bluetoothLowEnergy.onDescriptorValueChanged;
1694  * @see http://developer.chrome.com/extensions/commands.html
1695  * @const
1696  */
1697 chrome.commands = {};
1701  * @param {function(Array<string>): void} callback Callback function.
1702  */
1703 chrome.commands.getAll = function(callback) {};
1706 /** @type {!ChromeEvent} */
1707 chrome.commands.onCommand;
1711  * @see https://developer.chrome.com/apps/copresence
1712  * @const
1713  */
1714 chrome.copresence = {};
1718  * @typedef {?{
1719  *   lowPower: (boolean|undefined),
1720  *   onlyBroadcast: (boolean|undefined),
1721  *   onlyScan: (boolean|undefined),
1722  *   audible: (boolean|undefined)
1723  * }}
1724  * @see https://developer.chrome.com/apps/copresence#type-Strategy
1725  */
1726 chrome.copresence.Strategy;
1730  * @typedef {?{
1731  *   type: string,
1732  *   payload: ArrayBuffer
1733  * }}
1734  * @see https://developer.chrome.com/apps/copresence#type-Message
1735  */
1736 chrome.copresence.Message;
1740  * @typedef {?{
1741  *   onlyEarshot: (boolean|undefined)
1742  * }}
1743  * https://developer.chrome.com/apps/copresence#type-AccessPolicy
1744  */
1745 chrome.copresence.AccessPolicy;
1749  * @typedef {?{
1750  *   id: string,
1751  *   message: !chrome.copresence.Message,
1752  *   timeToLiveMillis: (number|undefined),
1753  *   policy: (!chrome.copresence.AccessPolicy|undefined),
1754  *   strategies: (!chrome.copresence.Strategy|undefined)
1755  * }}
1756  * @see https://developer.chrome.com/apps/copresence#type-PublishOperation
1757  */
1758 chrome.copresence.PublishOperation;
1761 /** @typedef {?{type: string}} */
1762 chrome.copresence.SubscriptionFilter;
1766  * @typedef {?{
1767  *   id: string,
1768  *   filter: !chrome.copresence.SubscriptionFilter,
1769  *   timeToLiveMillis: (number|undefined),
1770  *   strategies: (!chrome.copresence.Strategy|undefined)
1771  * }}
1772  * @see https://developer.chrome.com/apps/copresence#type-SubscribeOperation
1773  */
1774 chrome.copresence.SubscribeOperation;
1778  * @typedef {?{
1779  *   unpublishId: string
1780  * }}
1781  * @see https://developer.chrome.com/apps/copresence#type-UnpublishOperation
1782  */
1783 chrome.copresence.UnpublishOperation;
1787  * @typedef {?{
1788  *   unsubscribeId: string
1789  * }}
1790  * @see https://developer.chrome.com/apps/copresence#type-UnsubscribeOperation
1791  */
1792 chrome.copresence.UnsubscribeOperation;
1796  * @typedef {?{
1797  *   publish: (!chrome.copresence.PublishOperation|undefined),
1798  *   subscribe: (!chrome.copresence.SubscribeOperation|undefined),
1799  *   unpublish: (!chrome.copresence.UnpublishOperation|undefined),
1800  *   unsubscribe: (!chrome.copresence.UnsubscribeOperation|undefined)
1801  * }}
1802  * @see https://developer.chrome.com/apps/copresence#type-Operation
1803  */
1804 chrome.copresence.Operation;
1808  * @param {!Array<!chrome.copresence.Operation>} operations
1809  * @param {function(string): void} callback
1810  * @see https://developer.chrome.com/apps/copresence#method-execute
1811  */
1812 chrome.copresence.execute = function(operations, callback) {};
1817  * Event whose listeners take a subscription id and received messages as a
1818  * parameter.
1819  * @constructor
1820  * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1821  */
1822 chrome.copresence.MessagesReceivedEvent = function() {};
1826  * @param {function(string, !Array<!chrome.copresence.Message>): void} callback
1827  */
1828 chrome.copresence.MessagesReceivedEvent.prototype.addListener =
1829     function(callback) {};
1833  * @param {function(string, !Array<!chrome.copresence.Message>): void} callback
1834  */
1835 chrome.copresence.MessagesReceivedEvent.prototype.removeListener =
1836     function(callback) {};
1840  * @param {function(string, !Array<!chrome.copresence.Message>): void} callback
1841  * @return {boolean}
1842  */
1843 chrome.copresence.MessagesReceivedEvent.prototype.hasListener =
1844     function(callback) {};
1847 /** @return {boolean} */
1848 chrome.copresence.MessagesReceivedEvent.prototype.hasListeners = function() {};
1852  * @type {!chrome.copresence.MessagesReceivedEvent}
1853  * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1854  */
1855 chrome.copresence.onMessagesReceived;
1859  * @type {!ChromeStringEvent}
1860  * @see https://developer.chrome.com/apps/copresence#event-onStatusUpdated
1861  */
1862 chrome.copresence.onStatusUpdated;
1866  * @see https://developer.chrome.com/extensions/enterprise_platformKeys
1867  * @const
1868  */
1869 chrome.enterprise = {};
1873  * @constructor
1874  * platformKeys allows for generating hardware-backed keys and the installation
1875  * of certificates for these keys.
1876  * @see https://developer.chrome.com/extensions/enterprise_platformKeys.
1877  */
1878 chrome.enterprise.platformKeys = function() {};
1882  * @constructor
1883  * @see https://developer.chrome.com/extensions/enterprise_platformKeys#type-Token
1884  */
1885 chrome.enterprise.Token = function() {};
1889  * @type {string} Unique id for the Token, either "user" or "system."
1890  */
1891 chrome.enterprise.Token.prototype.id;
1895  * @type {!webCrypto.SubtleCrypto} Implements the WebCrypto's
1896  *     SubtleCrypto interface. The cryptographic operations, including key
1897  *     generation, are hardware-backed.
1898  */
1899 chrome.enterprise.Token.prototype.subtleCrypto;
1903  * @param {function(!Array<!chrome.enterprise.Token>): void} callback Called
1904  * with an array of Tokens.
1905  */
1906 chrome.enterprise.platformKeys.getTokens = function(callback) {};
1910  * @param {string} tokenId Id of cetificate token either "user" or "system".
1911  * @param {(function(!Array<!ArrayBuffer>): void)} callback Array of DER
1912  *     encoded x.509 certificates.
1913  */
1914 chrome.enterprise.platformKeys.getCertificates = function(tokenId, callback) {};
1918  * @param {string} tokenId The id of a Token returned by getTokens.
1919  * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1920  * @param {function(): void=} opt_callback Called back when this operation is
1921  *     finished.
1922  */
1923 chrome.enterprise.platformKeys.importCertificate =
1924     function(tokenId, certificate, opt_callback) {};
1928  * @param {string} tokenId The id of a Token returned by getTokens.
1929  * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1930  * @param {(function(): void)=} opt_callback Called back when this operation is
1931  *     finished.
1932  */
1933 chrome.enterprise.platformKeys.removeCertificate =
1934     function(tokenId, certificate, opt_callback) {};
1938  * @see https://developer.chrome.com/extensions/extension.html
1939  * @const
1940  */
1941 chrome.extension = {};
1944 /** @type {!Object|undefined} */
1945 chrome.extension.lastError = {};
1949  * @type {string|undefined}
1950  */
1951 chrome.extension.lastError.message;
1954 /** @type {boolean|undefined} */
1955 chrome.extension.inIncognitoContext;
1958 // TODO: change Object to !Object when it's clear nobody is passing in null
1959 // TODO: change Port to !Port since it should never be null
1961  * @param {string|Object<string>=} opt_extensionIdOrConnectInfo Either the
1962  *     extensionId to connect to, in which case connectInfo params can be
1963  *     passed in the next optional argument, or the connectInfo params.
1964  * @param {Object<string>=} opt_connectInfo The connectInfo object,
1965  *     if arg1 was the extensionId to connect to.
1966  * @return {Port} New port.
1967  */
1968 chrome.extension.connect = function(
1969     opt_extensionIdOrConnectInfo, opt_connectInfo) {};
1973  * @return {Window} The global JS object for the background page.
1974  */
1975 chrome.extension.getBackgroundPage = function() {};
1979  * @param {string} path A path to a resource within an extension expressed
1980  *     relative to it's install directory.
1981  * @return {string} The fully-qualified URL to the resource.
1982  */
1983 chrome.extension.getURL = function(path) {};
1987  * @param {Object=} opt_fetchProperties An object with optional 'type' and
1988  *     optional 'windowId' keys.
1989  * @return {Array<Window>} The global JS objects for each content view.
1990  */
1991 chrome.extension.getViews = function(opt_fetchProperties) {};
1995  * @param {function(boolean): void} callback Callback function.
1996  */
1997 chrome.extension.isAllowedFileSchemeAccess = function(callback) {};
2001  * @param {function(boolean): void} callback Callback function.
2002  */
2003 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
2007  * @param {string|*} extensionIdOrRequest Either the extensionId to send the
2008  *     request to, in which case the request is passed as the next arg, or the
2009  *     request.
2010  * @param {*=} opt_request The request value, if arg1 was the extensionId.
2011  * @param {function(*): void=} opt_callback The callback function which
2012  *     takes a JSON response object sent by the handler of the request.
2013  */
2014 chrome.extension.sendMessage = function(
2015     extensionIdOrRequest, opt_request, opt_callback) {};
2019  * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
2020  *     in which case the request is passed as the next arg, or the request.
2021  * @param {*=} opt_request The request value, if arg1 was the extensionId.
2022  * @param {function(*): void=} opt_callback The callback function which
2023  *     takes a JSON response object sent by the handler of the request.
2024  */
2025 chrome.extension.sendRequest = function(opt_arg1, opt_request, opt_callback) {};
2029  * @param {string} data
2030  */
2031 chrome.extension.setUpdateUrlData = function(data) {};
2034 /** @type {!ChromeEvent} */
2035 chrome.extension.onConnect;
2038 /** @type {!ChromeEvent} */
2039 chrome.extension.onConnectExternal;
2042 /** @type {!ChromeEvent} */
2043 chrome.extension.onMessage;
2046 /** @type {!ChromeEvent} */
2047 chrome.extension.onRequest;
2050 /** @type {!ChromeEvent} */
2051 chrome.extension.onRequestExternal;
2055 /** @type {string} */
2056 chrome.runtime.id;
2060  * @param {function(!Window=): void} callback Callback function.
2061  */
2062 chrome.runtime.getBackgroundPage = function(callback) {};
2066  * @param {function(): void=} opt_callback Callback function.
2067  */
2068 chrome.runtime.openOptionsPage = function(opt_callback) {};
2072  * Manifest information returned from chrome.runtime.getManifest. See
2073  * http://developer.chrome.com/extensions/manifest.html. Note that there are
2074  * several other fields not included here. They should be added to these externs
2075  * as needed.
2076  * @constructor
2077  */
2078 chrome.runtime.Manifest = function() {};
2081 /** @type {string} */
2082 chrome.runtime.Manifest.prototype.name;
2085 /** @type {string} */
2086 chrome.runtime.Manifest.prototype.version;
2089 /** @type {number|undefined} */
2090 chrome.runtime.Manifest.prototype.manifest_version;
2093 /** @type {string|undefined} */
2094 chrome.runtime.Manifest.prototype.description;
2097 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
2098 chrome.runtime.Manifest.prototype.oauth2;
2101 /** @type {!Array<(string|!Object)>} */
2102 chrome.runtime.Manifest.prototype.permissions;
2107  * Oauth2 info in the manifest.
2108  * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
2109  * @constructor
2110  */
2111 chrome.runtime.Manifest.Oauth2 = function() {};
2114 /** @type {string} */
2115 chrome.runtime.Manifest.Oauth2.prototype.client_id;
2118 /**@type {!Array<string>} */
2119 chrome.runtime.Manifest.Oauth2.prototype.scopes;
2123  * http://developer.chrome.com/extensions/runtime.html#method-getManifest
2124  * @return {!chrome.runtime.Manifest} The full manifest file of the app or
2125  *     extension.
2126  */
2127 chrome.runtime.getManifest = function() {};
2131  * @param {string} path A path to a resource within an extension expressed
2132  *     relative to it's install directory.
2133  * @return {string} The fully-qualified URL to the resource.
2134  */
2135 chrome.runtime.getURL = function(path) {};
2139  * @param {string} url This may be used to clean up server-side data, do
2140  *     analytics, and implement surveys. Maximum 255 characters.
2141  */
2142 chrome.runtime.setUninstallUrl = function(url) {};
2146  * Reloads the app or extension.
2147  */
2148 chrome.runtime.reload = function() {};
2152  * @param {function(string, !Object=): void} callback Called with "throttled",
2153  *     "no_update", or "update_available". If an update is available, the object
2154  *     contains more information about the available update.
2155  */
2156 chrome.runtime.requestUpdateCheck = function(callback) {};
2160  * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
2161  * no-op.
2162  */
2163 chrome.runtime.restart = function() {};
2168  * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
2169  * @param {string} application Name of the registered native messaging host to
2170  *     connect to, like 'com.google.your_product'.
2171  * @return {!Port} New port.
2172  */
2173 chrome.runtime.connectNative = function(application) {};
2177  * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
2178  * @param {string} application Name of the registered native messaging host to
2179  *     connect to, like 'com.google.your_product'.
2180  * @param {Object} message The message that will be passed to the native
2181  *     messaging host.
2182  * @param {function(*)=} opt_callback Called with the response message sent by
2183  *     the native messaging host. If an error occurs while connecting to the
2184  *     native messaging host, the callback will be called with no arguments and
2185  *     chrome.runtime.lastError will be set to the error message.
2186  */
2187 chrome.runtime.sendNativeMessage = function(
2188     application, message, opt_callback) {};
2193  * @param {function(!Object)} callback
2194  */
2195 chrome.runtime.getPlatformInfo = function(callback) {};
2199  * @param {function(!DirectoryEntry)} callback
2200  */
2201 chrome.runtime.getPackageDirectoryEntry = function(callback) {};
2204 /** @type {!chrome.runtime.PortEvent} */
2205 chrome.runtime.onConnect;
2208 /** @type {!chrome.runtime.PortEvent} */
2209 chrome.runtime.onConnectExternal;
2212 /** @type {!ChromeObjectEvent} */
2213 chrome.runtime.onInstalled;
2216 /** @type {!chrome.runtime.MessageSenderEvent} */
2217 chrome.runtime.onMessage;
2220 /** @type {!chrome.runtime.MessageSenderEvent} */
2221 chrome.runtime.onMessageExternal;
2224 /** @type {!ChromeEvent} */
2225 chrome.runtime.onStartup;
2228 /** @type {!ChromeEvent} */
2229 chrome.runtime.onSuspend;
2232 /** @type {!ChromeEvent} */
2233 chrome.runtime.onSuspendCanceled;
2236 /** @type {!ChromeObjectEvent} */
2237 chrome.runtime.onUpdateAvailable;
2240 /** @type {!ChromeStringEvent} */
2241 chrome.runtime.onRestartRequired;
2246  * Event whose listeners take a Port parameter.
2247  * @constructor
2248  */
2249 chrome.runtime.PortEvent = function() {};
2253  * @param {function(!Port): void} callback Callback.
2254  */
2255 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
2259  * @param {function(!Port): void} callback Callback.
2260  */
2261 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
2265  * @param {function(!Port): void} callback Callback.
2266  * @return {boolean}
2267  */
2268 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
2272  * @return {boolean}
2273  */
2274 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
2279  * Event whose listeners take a MessageSender and additional parameters.
2280  * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
2281  * @constructor
2282  */
2283 chrome.runtime.MessageSenderEvent = function() {};
2287  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2288  *     callback Callback.
2289  */
2290 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
2294  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2295  *     callback Callback.
2296  */
2297 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
2298     {};
2302  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2303  *     callback Callback.
2304  * @return {boolean}
2305  */
2306 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
2310  * @return {boolean}
2311  */
2312 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
2316  * @const
2317  * @see https://developer.chrome.com/extensions/tabs.html
2318  */
2319 chrome.tabs = {};
2323  * @typedef {?{
2324  *   code: (string|undefined),
2325  *   file: (string|undefined),
2326  *   allFrames: (boolean|undefined),
2327  *   matchAboutBlank: (boolean|undefined),
2328  *   runAt: (string|undefined)
2329  * }}
2330  */
2331 chrome.tabs.InjectDetails;
2335  * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
2336  * @param {number|!chrome.types.ImageDetails|function(string):void}
2337  *     windowIdOrOptionsOrCallback One of:
2338  *     The target window.
2339  *     An object defining details about the format and quality of an image, in
2340  *     which case the window defaults to the current window.
2341  *     A callback function which accepts the data URL string of a JPEG encoding
2342  *     of the visible area of the captured tab.
2343  * @param {(!chrome.types.ImageDetails|function(string):void)=}
2344  *     opt_optionsOrCallback Either an object defining details about the
2345  *     format and quality of an image, or a callback function which accepts the
2346  *     data URL string of a JPEG encoding of the visible area of the captured
2347  *     tab.
2348  * @param {function(string):void=} opt_callback A callback function which
2349  *     accepts the data URL string of a JPEG encoding of the visible area of the
2350  *     captured tab.
2351  */
2352 chrome.tabs.captureVisibleTab = function(windowIdOrOptionsOrCallback,
2353     opt_optionsOrCallback, opt_callback) {};
2357  * @param {number} tabId Tab Id.
2358  * @param {{name: (string|undefined)}=} connectInfo Info Object.
2359  */
2360 chrome.tabs.connect = function(tabId, connectInfo) {};
2364  * @typedef {?{
2365  *   windowId: (number|undefined),
2366  *   index: (number|undefined),
2367  *   url: (string|undefined),
2368  *   active: (boolean|undefined),
2369  *   pinned: (boolean|undefined),
2370  *   openerTabId: (number|undefined)
2371  * }}
2372  */
2373 chrome.tabs.CreateProperties;
2377  * @param {!chrome.tabs.CreateProperties} createProperties Info object.
2378  * @param {function(!Tab): void=} opt_callback The callback function.
2379  */
2380 chrome.tabs.create = function(createProperties, opt_callback) {};
2384  * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
2385  * @param {number|function(string): void} tabIdOrCallback The tab id, or a
2386  *     callback function that will be invoked with the language of the active
2387  *     tab in the current window.
2388  * @param {function(string): void=} opt_callback An optional callback function
2389  *     that will be invoked with the language of the tab specified as first
2390  *     argument.
2391  */
2392 chrome.tabs.detectLanguage = function(tabIdOrCallback, opt_callback) {};
2396  * @see https://developer.chrome.com/extensions/tabs#method-executeScript
2397  * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2398  *     Either the id of the tab in which to run the script, or an object
2399  *     containing the details of the script to run, in which case the script
2400  *     will be executed in the active tab of the current window.
2401  * @param {(!chrome.tabs.InjectDetails|function(!Array<*>):void)=}
2402  *     opt_detailsOrCallback Either an object containing the details of the
2403  *     script to run, if the tab id was speficied as first argument, or a
2404  *     callback that will be invoked with the result of the execution of the
2405  *     script in every injected frame.
2406  * @param {function(!Array<*>):void=} opt_callback A callback that will be
2407  *     invoked with the result of the execution of the script in every
2408  *     injected frame.
2409  */
2410 chrome.tabs.executeScript = function(tabIdOrDetails, opt_detailsOrCallback,
2411     opt_callback) {};
2415  * @param {number} tabId Tab id.
2416  * @param {function(!Tab): void} callback Callback.
2417  */
2418 chrome.tabs.get = function(tabId, callback) {};
2422  * Note (2014-05-21): Because this function is deprecated, the types of it's
2423  * parameters were not upgraded to make the first parameter optional and to mark
2424  * the Array and Tab in the callback as non-null.
2426  * @param {number?} windowId Window id.
2427  * @param {function(Array<Tab>): void} callback Callback.
2428  * @deprecated Please use tabs.query {windowId: windowId}.
2429  */
2430 chrome.tabs.getAllInWindow = function(windowId, callback) {};
2434  * @param {function(!Tab=): void} callback Callback.
2435  */
2436 chrome.tabs.getCurrent = function(callback) {};
2440  * Note (2014-05-21): Because this function is deprecated, the types of it's
2441  * parameters were not upgraded to make the first parameter optional and to mark
2442  * the Array and Tab in the callback as non-null.
2444  * @param {number?} windowId Window id.
2445  * @param {function(Tab): void} callback Callback.
2446  * @deprecated Please use tabs.query({active: true}).
2447  */
2448 chrome.tabs.getSelected = function(windowId, callback) {};
2452  * @typedef {?{
2453  *   windowId: (number|undefined),
2454  *   tabs: (number|!Array<number>)
2455  * }}
2456  */
2457 chrome.tabs.HighlightInfo;
2461  * @param {!chrome.tabs.HighlightInfo} highlightInfo
2462  * @param {function(!Window): void} callback Callback function invoked
2463  *    with each appropriate Window.
2464  */
2465 chrome.tabs.highlight = function(highlightInfo, callback) {};
2469  * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
2470  * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2471  *     Either the id of the tab in which to run the script, or an object
2472  *     containing the details of the CSS to insert, in which case the script
2473  *     will be executed in the active tab of the current window.
2474  * @param {(!chrome.tabs.InjectDetails|function():void)=}
2475  *     opt_detailsOrCallback Either an object containing the details of the
2476  *     CSS to insert, if the tab id was speficied as first argument, or a
2477  *     callback that will be invoked after the CSS has been injected.
2478  * @param {function():void=} opt_callback A callback that will be invoked after
2479  *     the CSS has been injected.
2480  */
2481 chrome.tabs.insertCSS = function(tabIdOrDetails, opt_detailsOrCallback,
2482     opt_callback) {};
2486  * @typedef {?{
2487  *   windowId: (number|undefined),
2488  *   index: number
2489  * }}
2490  */
2491 chrome.tabs.MoveProperties;
2495  * @param {number|!Array<number>} tabId Tab id or array of tab ids.
2496  * @param {!chrome.tabs.MoveProperties} moveProperties
2497  * @param {function((!Tab|!Array<!Tab>)): void=} opt_callback Callback.
2498  */
2499 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
2503  * @typedef {?{
2504  *   active: (boolean|undefined),
2505  *   pinned: (boolean|undefined),
2506  *   highlighted: (boolean|undefined),
2507  *   currentWindow: (boolean|undefined),
2508  *   lastFocusedWindow: (boolean|undefined),
2509  *   status: (string|undefined),
2510  *   title: (string|undefined),
2511  *   url: (string|undefined),
2512  *   windowId: (number|undefined),
2513  *   windowType: (string|undefined),
2514  *   index: (number|undefined)
2515  * }}
2516  */
2517 chrome.tabs.QueryInfo;
2521  * @param {!chrome.tabs.QueryInfo} queryInfo
2522  * @param {function(!Array<!Tab>): void} callback Callback.
2523  */
2524 chrome.tabs.query = function(queryInfo, callback) {};
2528  * @see https://developer.chrome.com/extensions/tabs#method-query
2529  * @param {number} tabId The ID of the tab which is to be duplicated.
2530  * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
2531  *     details about the duplicated tab.
2532  */
2533 chrome.tabs.duplicate = function(tabId, opt_callback) {};
2537  * @typedef {?{
2538  *   bypassCache: (boolean|undefined)
2539  * }}
2540  */
2541 chrome.tabs.ReloadProperties;
2545  * @see https://developer.chrome.com/extensions/tabs#method-reload
2546  * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
2547  *     opt_tabIdOrReloadPropertiesOrCallback One of:
2548  *     The ID of the tab to reload; defaults to the selected tab of the current
2549  *     window.
2550  *     An object specifying boolean flags to customize the reload operation.
2551  *     A callback to be invoked when the reload is complete.
2552  * @param {(!chrome.tabs.ReloadProperties|function():void)=}
2553  *     opt_reloadPropertiesOrCallback Either an object specifying boolean flags
2554  *     to customize the reload operation, or a callback to be invoked when the
2555  *     reload is complete, if no object needs to be specified.
2556  * @param {function():void=} opt_callback  A callback to be invoked when the
2557  *     reload is complete.
2558  */
2559 chrome.tabs.reload = function(opt_tabIdOrReloadPropertiesOrCallback,
2560     opt_reloadPropertiesOrCallback, opt_callback) {};
2564  * @param {number|!Array<number>} tabIds A tab ID or an array of tab IDs.
2565  * @param {function(): void=} opt_callback Callback.
2566  */
2567 chrome.tabs.remove = function(tabIds, opt_callback) {};
2571  * @param {number} tabId Tab id.
2572  * @param {*} request The request value of any type.
2573  * @param {function(*): void=} opt_callback The callback function which
2574  *     takes a JSON response object sent by the handler of the request.
2575  */
2576 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
2580  * @param {number} tabId Tab id.
2581  * @param {*} request The request value of any type.
2582  * @param {function(*): void=} opt_callback The callback function which
2583  *     takes a JSON response object sent by the handler of the request.
2584  * @deprecated Please use runtime.sendMessage.
2585  */
2586 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
2590  * @typedef {?{
2591  *   url: (string|undefined),
2592  *   active: (boolean|undefined),
2593  *   highlighted: (boolean|undefined),
2594  *   pinned: (boolean|undefined),
2595  *   openerTabId: (number|undefined)
2596  * }}
2597  */
2598 chrome.tabs.UpdateProperties;
2602  * @see https://developer.chrome.com/extensions/tabs#method-update
2603  * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
2604  *     Either the id of the tab to update, or an object with new property
2605  *     values, in which case the selected tab of the current window will be
2606  *     updated.
2607  * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
2608  *     opt_updatePropertiesOrCallback Either an object with new property values,
2609  *     if the tabId was specified as first parameter, or an optional callback
2610  *     that will be invoked with information about the tab being updated.
2611  * @param {function(!Tab=): void=} opt_callback An optional callback that will
2612  *     be invoked with information about the tab being updated.
2613  */
2614 chrome.tabs.update = function(tabIdOrUpdateProperties,
2615     opt_updatePropertiesOrCallback, opt_callback) {};
2619  * @type {!ChromeEvent}
2620  * @deprecated Please use tabs.onActivated.
2621  */
2622 chrome.tabs.onActiveChanged;
2625 /** @type {!ChromeEvent} */
2626 chrome.tabs.onActivated;
2629 /** @type {!ChromeEvent} */
2630 chrome.tabs.onAttached;
2633 /** @type {!ChromeEvent} */
2634 chrome.tabs.onCreated;
2637 /** @type {!ChromeEvent} */
2638 chrome.tabs.onDetached;
2642  * @type {!ChromeEvent}
2643  * @deprecated Please use tabs.onHighlighted.
2644  */
2645 chrome.tabs.onHighlightChanged;
2649  * @type {!ChromeEvent}
2650  */
2651 chrome.tabs.onHighlighted;
2654 /** @type {!ChromeEvent} */
2655 chrome.tabs.onMoved;
2658 /** @type {!ChromeEvent} */
2659 chrome.tabs.onRemoved;
2662 /** @type {!ChromeEvent} */
2663 chrome.tabs.onUpdated;
2666 /** @type {!ChromeEvent} */
2667 chrome.tabs.onReplaced;
2669 // DEPRECATED:
2670 // TODO(user): Remove once all usage has been confirmed to have ended.
2674  * @type {!ChromeEvent}
2675  * @deprecated Please use tabs.onActivated.
2676  */
2677 chrome.tabs.onSelectionChanged;
2681  * @see https://developer.chrome.com/extensions/topSites
2682  * @const
2683  */
2684 chrome.topSites = {};
2689  * @constructor
2690  * @see https://developer.chrome.com/extensions/topSites#type-MostVisitedURL
2691  */
2692 chrome.topSites.MostVisitedURL = function() {};
2695 /** @type {string} */
2696 chrome.topSites.MostVisitedURL.prototype.url;
2699 /** @type {string} */
2700 chrome.topSites.MostVisitedURL.prototype.title;
2704  * Gets a list of top sites.
2705  * @param {function(!Array<!chrome.topSites.MostVisitedURL>)} callback Invoked
2706  *     with a list of most visited URLs.
2707  * @see https://developer.chrome.com/extensions/topSites#method-get
2708  */
2709 chrome.topSites.get = function(callback) {};
2713  * @const
2714  * @see https://developer.chrome.com/extensions/windows.html
2715  */
2716 chrome.windows = {};
2720  * @param {Object=} opt_createData May have many keys to specify parameters.
2721  *     Or the callback.
2722  * @param {function(ChromeWindow): void=} opt_callback Callback.
2723  */
2724 chrome.windows.create = function(opt_createData, opt_callback) {};
2728  * @param {number} id Window id.
2729  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2730  * @param {function(!ChromeWindow): void=} opt_callback Callback when
2731  *     opt_getInfo is an object.
2732  */
2733 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
2737  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2738  * @param {function(!Array<!ChromeWindow>): void=} opt_callback Callback.
2739  */
2740 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
2744  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2745  * @param {function(ChromeWindow): void=} opt_callback Callback.
2746  */
2747 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
2751  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2752  * @param {function(ChromeWindow): void=} opt_callback Callback.
2753  */
2754 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
2758  * @param {number} tabId Tab Id.
2759  * @param {function(): void=} opt_callback Callback.
2760  */
2761 chrome.windows.remove = function(tabId, opt_callback) {};
2765  * @param {number} tabId Tab Id.
2766  * @param {Object} updateProperties An object which may have many keys for
2767  *     various options.
2768  * @param {function(): void=} opt_callback Callback.
2769  */
2770 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
2773 /** @type {!ChromeEvent} */
2774 chrome.windows.onCreated;
2777 /** @type {!ChromeEvent} */
2778 chrome.windows.onFocusChanged;
2781 /** @type {!ChromeEvent} */
2782 chrome.windows.onRemoved;
2786  * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2787  * @type {number}
2788  */
2789 chrome.windows.WINDOW_ID_NONE;
2793  * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2794  * @type {number}
2795  */
2796 chrome.windows.WINDOW_ID_CURRENT;
2800  * @const
2801  * @see https://developer.chrome.com/extensions/i18n.html
2802  */
2803 chrome.i18n = {};
2807  * @param {function(Array<string>): void} callback The callback function which
2808  *     accepts an array of the accept languages of the browser, such as
2809  *     'en-US','en','zh-CN'.
2810  */
2811 chrome.i18n.getAcceptLanguages = function(callback) {};
2815  * @param {string} messageName
2816  * @param {(string|Array<string>)=} opt_args
2817  * @return {string}
2818  */
2819 chrome.i18n.getMessage = function(messageName, opt_args) {};
2823  * @return {string}
2824  */
2825 chrome.i18n.getUILanguage = function() {};
2829  * @const
2830  * @see https://developer.chrome.com/extensions/pageAction.html
2831  */
2832 chrome.pageAction = {};
2836  * @param {number} tabId Tab Id.
2837  */
2838 chrome.pageAction.hide = function(tabId) {};
2842  * @param {Object} details An object which has 'tabId' and either
2843  *     'imageData' or 'path'.
2844  */
2845 chrome.pageAction.setIcon = function(details) {};
2849  * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2850  */
2851 chrome.pageAction.setPopup = function(details) {};
2855  * @param {Object} details An object which has 'tabId' and 'title'.
2856  */
2857 chrome.pageAction.setTitle = function(details) {};
2861  * @param {number} tabId Tab Id.
2862  */
2863 chrome.pageAction.show = function(tabId) {};
2866 /** @type {!ChromeEvent} */
2867 chrome.pageAction.onClicked;
2871  * @const
2872  * @see https://developer.chrome.com/apps/browser
2873  */
2874 chrome.browser = {};
2878  * @param {{url: string}} details An object with a single 'url' key.
2879  * @param {(function(): void)=} opt_callback The callback function. If an error
2880  * occurs opening the URL, chrome.runtime.lastError will be set to the error
2881  * message.
2882  */
2883 chrome.browser.openTab = function(details, opt_callback) {};
2887  * @const
2888  * @see https://developer.chrome.com/extensions/browserAction.html
2889  */
2890 chrome.browserAction = {};
2894  * @typedef {?{
2895  *   tabId: (number|undefined)
2896  * }}
2897  */
2898 chrome.browserAction.Tab;
2902  * @typedef {Array<number>}
2903  * @see https://developer.chrome.com/extensions/browserAction#type-ColorArray
2904  */
2905 chrome.browserAction.ColorArray;
2909  * @typedef {{
2910  *   imageData: (!ImageData|!Object<number, !ImageData>|undefined),
2911  *   path: (string|!Object<number, string>|undefined),
2912  *   tabId: (number|undefined)
2913  * }}
2914  */
2915 chrome.browserAction.SetIconImageData;
2919  * @param {{
2920  *   title: string,
2921  *   tabId: (number|undefined)
2922  * }} details
2923  * @see https://developer.chrome.com/extensions/browserAction#method-setTitle
2924  */
2925 chrome.browserAction.setTitle = function(details) {};
2929  * @param {!chrome.browserAction.Tab} details
2930  * @param {function(string): void} callback
2931  * @see https://developer.chrome.com/extensions/browserAction#method-getTitle
2932  */
2933 chrome.browserAction.getTitle = function(details, callback) {};
2937  * @param {!chrome.browserAction.SetIconImageData} details
2938  * @param {function(): void=} opt_callback
2939  * @see https://developer.chrome.com/extensions/browserAction#method-setIcon
2940  */
2941 chrome.browserAction.setIcon = function(details, opt_callback) {};
2945  * @param {{
2946  *   tabId: (number|undefined),
2947  *   popup: string
2948  * }} details
2949  * @see https://developer.chrome.com/extensions/browserAction#method-setPopup
2950  */
2951 chrome.browserAction.setPopup = function(details) {};
2955  * @param {!chrome.browserAction.Tab} details
2956  * @param {function(string): void} callback
2957  * @see https://developer.chrome.com/extensions/browserAction#method-getPopup
2958  */
2959 chrome.browserAction.getPopup = function(details, callback) {};
2963  * @param {{
2964  *   text: string,
2965  *   tabId: (number|undefined)
2966  * }} details
2967  * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeText
2968  */
2969 chrome.browserAction.setBadgeText = function(details) {};
2973  * @param {!chrome.browserAction.Tab} details
2974  * @param {function(string): void} callback
2975  * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeText
2976  */
2977 chrome.browserAction.getBadgeText = function(details, callback) {};
2981  * @param {{
2982  *   color: (string|chrome.browserAction.ColorArray),
2983  *   tabId: (number|undefined)
2984  * }} details
2985  * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeBackgroundColor
2986  */
2987 chrome.browserAction.setBadgeBackgroundColor = function(details) {};
2991  * @param {!chrome.browserAction.Tab} details
2992  * @param {function(chrome.browserAction.ColorArray): void} callback
2993  * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeBackgroundColor
2994  */
2995 chrome.browserAction.getBadgeBackgroundColor = function(details, callback) {};
2999  * @param {number=} opt_tabId
3000  * @see https://developer.chrome.com/extensions/browserAction#method-enable
3001  */
3002 chrome.browserAction.enable = function(opt_tabId) {};
3006  * @param {number=} opt_tabId
3007  * @see https://developer.chrome.com/extensions/browserAction#method-disable
3008  */
3009 chrome.browserAction.disable = function(opt_tabId) {};
3013  * @constructor
3014  */
3015 chrome.browserAction.BrowserActionTabEvent = function() {};
3019  * @param {function(!Tab): void} callback
3020  */
3021 chrome.browserAction.BrowserActionTabEvent.prototype.addListener =
3022     function(callback) {};
3026  * @param {function(!Tab): void} callback
3027  */
3028 chrome.browserAction.BrowserActionTabEvent.prototype.removeListener =
3029     function(callback) {};
3033  * @param {function(!Tab): void} callback
3034  * @return {boolean}
3035  */
3036 chrome.browserAction.BrowserActionTabEvent.prototype.hasListener =
3037     function(callback) {};
3040 /** @return {boolean} */
3041 chrome.browserAction.BrowserActionTabEvent.prototype.hasListeners =
3042     function() {};
3046  * @type {!chrome.browserAction.BrowserActionTabEvent}
3047  * @see https://developer.chrome.com/extensions/browserAction#event-onClicked
3048  */
3049 chrome.browserAction.onClicked;
3053  * @const
3054  * @see https://developer.chrome.com/extensions/bookmarks.html
3055  */
3056 chrome.bookmarks = {};
3060  * @typedef {?{
3061  *   parentId: (string|undefined),
3062  *   index: (number|undefined),
3063  *   url: (string|undefined),
3064  *   title: (string|undefined)
3065  * }}
3066  * @see https://developer.chrome.com/extensions/bookmarks#method-create
3067  */
3068 chrome.bookmarks.CreateDetails;
3072  * @typedef {?{
3073  *   query: (string|undefined),
3074  *   url: (string|undefined),
3075  *   title: (string|undefined)
3076  * }}
3077  * @see https://developer.chrome.com/extensions/bookmarks#method-search
3078  */
3079 chrome.bookmarks.SearchDetails;
3083  * @param {(string|Array<string>)} idOrIdList
3084  * @param {function(Array<BookmarkTreeNode>): void} callback The
3085  *     callback function which accepts an array of BookmarkTreeNode.
3086  * @return {Array<BookmarkTreeNode>}
3087  */
3088 chrome.bookmarks.get = function(idOrIdList, callback) {};
3092  * @param {string} id
3093  * @param {function(Array<BookmarkTreeNode>): void} callback The
3094  *     callback function which accepts an array of BookmarkTreeNode.
3095  * @return {Array<BookmarkTreeNode>}
3096  */
3097 chrome.bookmarks.getChildren = function(id, callback) {};
3101  * @param {number} numberOfItems The number of items to return.
3102  * @param {function(Array<BookmarkTreeNode>): void} callback The
3103  *     callback function which accepts an array of BookmarkTreeNode.
3104  * @return {Array<BookmarkTreeNode>}
3105  */
3106 chrome.bookmarks.getRecent = function(numberOfItems, callback) {};
3110  * @param {function(Array<BookmarkTreeNode>): void} callback The
3111  *     callback function which accepts an array of BookmarkTreeNode.
3112  * @return {Array<BookmarkTreeNode>}
3113  */
3114 chrome.bookmarks.getTree = function(callback) {};
3118  * @param {string} id The ID of the root of the subtree to retrieve.
3119  * @param {function(Array<BookmarkTreeNode>): void} callback The
3120  *     callback function which accepts an array of BookmarkTreeNode.
3121  * @return {Array<BookmarkTreeNode>}
3122  */
3123 chrome.bookmarks.getSubTree = function(id, callback) {};
3127  * @param {string|!chrome.bookmarks.SearchDetails} query
3128  * @param {function(Array<BookmarkTreeNode>): void} callback
3129  * @return {Array<BookmarkTreeNode>}
3130  */
3131 chrome.bookmarks.search = function(query, callback) {};
3135  * @param {chrome.bookmarks.CreateDetails} bookmark
3136  * @param {function(BookmarkTreeNode): void=} opt_callback The
3137  *     callback function which accepts a BookmarkTreeNode object.
3138  */
3139 chrome.bookmarks.create = function(bookmark, opt_callback) {};
3143  * @param {string} id
3144  * @param {Object} destination An object which has optional 'parentId' and
3145  *     optional 'index'.
3146  * @param {function(BookmarkTreeNode): void=} opt_callback
3147  *     The callback function which accepts a BookmarkTreeNode object.
3148  */
3149 chrome.bookmarks.move = function(id, destination, opt_callback) {};
3153  * @param {string} id
3154  * @param {Object} changes An object which may have 'title' as a key.
3155  * @param {function(BookmarkTreeNode): void=} opt_callback The
3156  *     callback function which accepts a BookmarkTreeNode object.
3157  */
3158 chrome.bookmarks.update = function(id, changes, opt_callback) {};
3162  * @param {string} id
3163  * @param {function(): void=} opt_callback
3164  */
3165 chrome.bookmarks.remove = function(id, opt_callback) {};
3169  * @param {string} id
3170  * @param {function(): void=} opt_callback
3171  */
3172 chrome.bookmarks.removeTree = function(id, opt_callback) {};
3176  * @param {function(): void=} opt_callback
3177  */
3178 chrome.bookmarks.import = function(opt_callback) {};
3182  * @param {function(): void=} opt_callback
3183  */
3184 chrome.bookmarks.export = function(opt_callback) {};
3187 /** @type {!ChromeEvent} */
3188 chrome.bookmarks.onChanged;
3191 /** @type {!ChromeEvent} */
3192 chrome.bookmarks.onChildrenReordered;
3195 /** @type {!ChromeEvent} */
3196 chrome.bookmarks.onCreated;
3199 /** @type {!ChromeEvent} */
3200 chrome.bookmarks.onImportBegan;
3203 /** @type {!ChromeEvent} */
3204 chrome.bookmarks.onImportEnded;
3207 /** @type {!ChromeEvent} */
3208 chrome.bookmarks.onMoved;
3211 /** @type {!ChromeEvent} */
3212 chrome.bookmarks.onRemoved;
3216  * @typedef {?{
3217  *   content: string,
3218  *   description: string
3219  * }}
3220  */
3221 var SuggestResult;
3225  * @const
3226  * @see https://developer.chrome.com/extensions/omnibox.html
3227  */
3228 chrome.omnibox = {};
3232 /** @constructor */
3233 chrome.omnibox.InputChangedEvent = function() {};
3237  * @param {function(string, function(!Array<!SuggestResult>)): void} callback
3238  */
3239 chrome.omnibox.InputChangedEvent.prototype.addListener = function(callback) {};
3243  * @param {function(string, function(!Array<!SuggestResult>)): void} callback
3244  */
3245 chrome.omnibox.InputChangedEvent.prototype.removeListener =
3246     function(callback) {};
3250  * @param {function(string, function(!Array<!SuggestResult>)): void} callback
3251  * @return {boolean}
3252  */
3253 chrome.omnibox.InputChangedEvent.prototype.hasListener = function(callback) {};
3256 /** @return {boolean} */
3257 chrome.omnibox.InputChangedEvent.prototype.hasListeners = function() {};
3261 /** @constructor */
3262 chrome.omnibox.InputEnteredEvent = function() {};
3265 /** @param {function(string, string): void} callback */
3266 chrome.omnibox.InputEnteredEvent.prototype.addListener = function(callback) {};
3269 /** @param {function(string, string): void} callback */
3270 chrome.omnibox.InputEnteredEvent.prototype.removeListener =
3271     function(callback) {};
3275  * @param {function(string, string): void} callback
3276  * @return {boolean}
3277  */
3278 chrome.omnibox.InputEnteredEvent.prototype.hasListener = function(callback) {};
3281 /** @return {boolean} */
3282 chrome.omnibox.InputEnteredEvent.prototype.hasListeners = function() {};
3286  * @param {{description: string}} suggestion A partial SuggestResult object.
3287  */
3288 chrome.omnibox.setDefaultSuggestion = function(suggestion) {};
3291 /** @type {!ChromeEvent} */
3292 chrome.omnibox.onInputCancelled;
3295 /** @type {!chrome.omnibox.InputChangedEvent} */
3296 chrome.omnibox.onInputChanged;
3299 /** @type {!chrome.omnibox.InputEnteredEvent} */
3300 chrome.omnibox.onInputEntered;
3303 /** @type {!ChromeEvent} */
3304 chrome.omnibox.onInputStarted;
3308  * @const
3309  * @see https://developer.chrome.com/extensions/dev/contextMenus.html
3310  */
3311 chrome.contextMenus = {};
3315  * @typedef {?{
3316  *   type: (string|undefined),
3317  *   id: (string|undefined),
3318  *   title: (string|undefined),
3319  *   checked: (boolean|undefined),
3320  *   contexts: (!Array<string>|undefined),
3321  *   onclick: (function(!Object, !Tab)|undefined),
3322  *   parentId: (number|string|undefined),
3323  *   documentUrlPatterns: (!Array<string>|undefined),
3324  *   targetUrlPatterns: (!Array<string>|undefined),
3325  *   enabled: (boolean|undefined)
3326  * }}
3327  * @see https://developer.chrome.com/extensions/contextMenus#method-create
3328  */
3329 chrome.contextMenus.CreateProperties;
3333  * @typedef {?{
3334  *   type: (string|undefined),
3335  *   title: (string|undefined),
3336  *   checked: (boolean|undefined),
3337  *   contexts: (!Array<string>|undefined),
3338  *   onclick: (function(!Object, !Tab)|undefined),
3339  *   parentId: (number|string|undefined),
3340  *   documentUrlPatterns: (!Array<string>|undefined),
3341  *   targetUrlPatterns: (!Array<string>|undefined),
3342  *   enabled: (boolean|undefined)
3343  * }}
3344  * @see https://developer.chrome.com/extensions/contextMenus#method-update
3345  */
3346 chrome.contextMenus.UpdateProperties;
3350  * @param {!chrome.contextMenus.CreateProperties} createProperties
3351  * @param {function()=} opt_callback
3352  * @return {(number|string)} The id of the newly created window.
3353  * @see https://developer.chrome.com/extensions/contextMenus#method-create
3354  */
3355 chrome.contextMenus.create = function(createProperties, opt_callback) {};
3359  * @param {(number|string)} id
3360  * @param {!chrome.contextMenus.UpdateProperties} updateProperties
3361  * @param {function()=} opt_callback
3362  * @see https://developer.chrome.com/extensions/contextMenus#method-update
3363  */
3364 chrome.contextMenus.update = function(id, updateProperties, opt_callback) {};
3368  * @param {(number|string)} menuItemId
3369  * @param {function()=} opt_callback
3370  * @see https://developer.chrome.com/extensions/contextMenus#method-remove
3371  */
3372 chrome.contextMenus.remove = function(menuItemId, opt_callback) {};
3376  * @param {function()=} opt_callback
3377  * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
3378  */
3379 chrome.contextMenus.removeAll = function(opt_callback) {};
3383  * @interface
3384  * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3385  */
3386 chrome.contextMenus.ClickedEvent = function() {};
3390  * @param {function(!Object, !Tab=)} callback
3391  */
3392 chrome.contextMenus.ClickedEvent.prototype.addListener = function(callback) {};
3396  * @param {function(!Object, !Tab=)} callback
3397  */
3398 chrome.contextMenus.ClickedEvent.prototype.removeListener =
3399     function(callback) {};
3403  * @param {function(!Object, !Tab=)} callback
3404  * @return {boolean}
3405  */
3406 chrome.contextMenus.ClickedEvent.prototype.hasListener = function(callback) {};
3410  * @return {boolean}
3411  */
3412 chrome.contextMenus.ClickedEvent.prototype.hasListeners = function() {};
3416  * @type {!chrome.contextMenus.ClickedEvent}
3417  * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3418  */
3419 chrome.contextMenus.onClicked;
3423  * @const
3424  * @see https://developer.chrome.com/extensions/dev/cookies.html
3425  */
3426 chrome.cookies = {};
3430  * This typedef is used for the parameters to chrome.cookies.get,
3431  * chrome.cookies.remove, and for the parameter to remove's callback. These uses
3432  * all identify a single cookie uniquely without specifying its content, and the
3433  * objects are identical except for the the storeId being optional vs required.
3434  * If greater divergence occurs, then going to two typedefs is recommended.
3436  * @typedef {?{
3437  *   url: string,
3438  *   name: string,
3439  *   storeId: (string|undefined)
3440  * }}
3441  */
3442 chrome.cookies.CookieIdentifier;
3446  * @param {!chrome.cookies.CookieIdentifier} details
3447  * @param {function(Cookie=): void} callback
3448  */
3449 chrome.cookies.get = function(details, callback) {};
3453  * @param {Object} details
3454  * @param {function(Array<Cookie>): void} callback
3455  */
3456 chrome.cookies.getAll = function(details, callback) {};
3460  * @param {function(Array<CookieStore>): void} callback
3461  */
3462 chrome.cookies.getAllCookieStores = function(callback) {};
3466  * @param {!chrome.cookies.CookieIdentifier} details
3467  * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
3468  *     removal failed for any reason, the parameter will be "null", and
3469  *     "chrome.runtime.lastError" will be set.
3470  */
3471 chrome.cookies.remove = function(details, opt_callback) {};
3475  * @typedef {?{
3476  *   url: string,
3477  *   name: (string|undefined),
3478  *   value: (string|undefined),
3479  *   domain: (string|undefined),
3480  *   path: (string|undefined),
3481  *   secure: (boolean|undefined),
3482  *   httpOnly: (boolean|undefined),
3483  *   expirationDate: (number|undefined),
3484  *   storeId: (string|undefined)
3485  * }}
3486  */
3487 chrome.cookies.CookieSetDetails;
3491  * @param {!chrome.cookies.CookieSetDetails} details
3492  * @param {function(Cookie): void=} opt_callback If setting failed for any
3493  *    reason, the parameter will be "null", and "chrome.runtime.lastError" will
3494  *    be set.
3495  */
3496 chrome.cookies.set = function(details, opt_callback) {};
3500  * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
3501  * @type {!ChromeEvent}
3502  */
3503 chrome.cookies.onChanged;
3507 /** @constructor */
3508 function CookieChangeInfo() {}
3511 /** @type {boolean} */
3512 CookieChangeInfo.prototype.removed;
3515 /** @type {Cookie} */
3516 CookieChangeInfo.prototype.cookie;
3519 /** @type {string} */
3520 CookieChangeInfo.prototype.cause;
3523 /** @const */
3524 chrome.management = {};
3528  * @typedef {?{
3529  *   showConfirmDialog: (boolean|undefined)
3530  * }}
3531  */
3532 chrome.management.InstallOptions;
3536  * @param {string} id
3537  * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3538  *     function.
3539  */
3540 chrome.management.get = function(id, opt_callback) {};
3544  * @param {function(!Array<!ExtensionInfo>): void=} opt_callback Optional
3545  *     callback function.
3546  * @return {!Array<!ExtensionInfo>}
3547  */
3548 chrome.management.getAll = function(opt_callback) {};
3552  * @param {string} id The id of an already installed extension.
3553  * @param {function(!Array<string>)=} opt_callback Optional callback function.
3554  */
3555 chrome.management.getPermissionWarningsById = function(id, opt_callback) {};
3559  * @param {string} manifestStr Extension's manifest JSON string.
3560  * @param {function(!Array<string>)=} opt_callback Optional callback function.
3561  */
3562 chrome.management.getPermissionWarningsByManifest =
3563     function(manifestStr, opt_callback) {};
3567  * @param {string} id The id of an already installed extension.
3568  * @param {function(): void=} opt_callback Optional callback function.
3569  */
3570 chrome.management.launchApp = function(id, opt_callback) {};
3574  * @param {string} id The id of an already installed extension.
3575  * @param {boolean} enabled Whether this item should be enabled.
3576  * @param {function(): void=} opt_callback Optional callback function.
3577  */
3578 chrome.management.setEnabled = function(id, enabled, opt_callback) {};
3582  * @param {string} id The id of an already installed extension.
3583  * @param {(!chrome.management.InstallOptions|function(): void)=}
3584  *     opt_optionsOrCallback An optional uninstall options object or an optional
3585  *     callback function.
3586  * @param {function(): void=} opt_callback Optional callback function.
3587  */
3588 chrome.management.uninstall =
3589     function(id, opt_optionsOrCallback, opt_callback) {};
3593  * @param {(!chrome.management.InstallOptions|function(): void)=}
3594  *     opt_optionsOrCallback An optional uninstall options object or an optional
3595  *     callback function.
3596  * @param {function(): void=} opt_callback An optional callback function.
3597  */
3598 chrome.management.uninstallSelf =
3599     function(opt_optionsOrCallback, opt_callback) {};
3603  * @param {string} id The id of an already installed extension.
3604  * @param {function(): void=} opt_callback Optional callback function.
3605  */
3606 chrome.management.createAppShortcut = function(id, opt_callback) {};
3610  * @param {string} id The id of an already installed extension.
3611  * @param {string} launchType The LaunchType enum value to set. Make sure this
3612  *     value is in ExtensionInfo.availableLaunchTypes because the available
3613  *     launch types vary on different platforms and configurations.
3614  * @param {function(): void=} opt_callback Optional callback function.
3615  */
3616 chrome.management.setLaunchType = function(id, launchType, opt_callback) {};
3620  * @param {string} url The URL of a web page. The scheme of the URL can only be
3621  *     "http" or "https".
3622  * @param {string} title The title of the generated app.
3623  * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3624  *     function.
3625  */
3626 chrome.management.generateAppForLink = function(url, title, opt_callback) {};
3629 /** @type {!ChromeExtensionInfoEvent} */
3630 chrome.management.onDisabled;
3633 /** @type {!ChromeExtensionInfoEvent} */
3634 chrome.management.onEnabled;
3637 /** @type {!ChromeExtensionInfoEvent} */
3638 chrome.management.onInstalled;
3641 /** @type {!ChromeStringEvent} */
3642 chrome.management.onUninstalled;
3646  * @const
3647  * @see https://developer.chrome.com/extensions/idle.html
3648  */
3649 chrome.idle = {};
3653  * @param {number} thresholdSeconds Threshold in seconds, used to determine
3654  *     when a machine is in the idle state.
3655  * @param {function(string): void} callback Callback to handle the state.
3656  */
3657 chrome.idle.queryState = function(thresholdSeconds, callback) {};
3661  * @param {number} intervalInSeconds Threshold, in seconds, used to determine
3662  *    when the system is in an idle state.
3663  */
3664 chrome.idle.setDetectionInterval = function(intervalInSeconds) {};
3667 /** @type {!ChromeEvent} */
3668 chrome.idle.onStateChanged;
3672  * Chrome Text-to-Speech API.
3673  * @const
3674  * @see https://developer.chrome.com/extensions/tts.html
3675  */
3676 chrome.tts = {};
3681  * An event from the TTS engine to communicate the status of an utterance.
3682  * @constructor
3683  */
3684 function TtsEvent() {}
3687 /** @type {string} */
3688 TtsEvent.prototype.type;
3691 /** @type {number} */
3692 TtsEvent.prototype.charIndex;
3695 /** @type {string} */
3696 TtsEvent.prototype.errorMessage;
3701  * A description of a voice available for speech synthesis.
3702  * @constructor
3703  */
3704 function TtsVoice() {}
3707 /** @type {string} */
3708 TtsVoice.prototype.voiceName;
3711 /** @type {string} */
3712 TtsVoice.prototype.lang;
3715 /** @type {string} */
3716 TtsVoice.prototype.gender;
3719 /** @type {string} */
3720 TtsVoice.prototype.extensionId;
3723 /** @type {Array<string>} */
3724 TtsVoice.prototype.eventTypes;
3728  * Gets an array of all available voices.
3729  * @param {function(Array<TtsVoice>)=} opt_callback An optional callback
3730  *     function.
3731  */
3732 chrome.tts.getVoices = function(opt_callback) {};
3736  * Checks if the engine is currently speaking.
3737  * @param {function(boolean)=} opt_callback The callback function.
3738  */
3739 chrome.tts.isSpeaking = function(opt_callback) {};
3743  * Speaks text using a text-to-speech engine.
3744  * @param {string} utterance The text to speak, either plain text or a complete,
3745  *     well-formed SSML document. Speech engines that do not support SSML will
3746  *     strip away the tags and speak the text. The maximum length of the text is
3747  *     32,768 characters.
3748  * @param {Object=} opt_options The speech options.
3749  * @param {function()=} opt_callback Called right away, before speech finishes.
3750  */
3751 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
3755  * Stops any current speech.
3756  */
3757 chrome.tts.stop = function() {};
3761  * @const
3762  * @see https://developer.chrome.com/extensions/ttsEngine.html
3763  */
3764 chrome.ttsEngine = {};
3767 /** @type {!ChromeEvent} */
3768 chrome.ttsEngine.onSpeak;
3771 /** @type {!ChromeEvent} */
3772 chrome.ttsEngine.onStop;
3776  * @const
3777  * @see https://developer.chrome.com/extensions/contentSettings.html
3778  */
3779 chrome.contentSettings = {};
3782 /** @type {!ContentSetting} */
3783 chrome.contentSettings.cookies;
3786 /** @type {!ContentSetting} */
3787 chrome.contentSettings.images;
3790 /** @type {!ContentSetting} */
3791 chrome.contentSettings.javascript;
3794 /** @type {!ContentSetting} */
3795 chrome.contentSettings.plugins;
3798 /** @type {!ContentSetting} */
3799 chrome.contentSettings.popups;
3802 /** @type {!ContentSetting} */
3803 chrome.contentSettings.notifications;
3807  * @const
3808  * @see https://developer.chrome.com/extensions/fileBrowserHandler
3809  */
3810 chrome.fileBrowserHandler = {};
3814  * @typedef {?{
3815  *   suggestedName: string,
3816  *   allowedFileExtensions: (!Array<string>|undefined)
3817  * }}
3818  */
3819 chrome.fileBrowserHandler.SelectFileSelectionParams;
3823  * Prompts user to select file path under which file should be saved.
3824  * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3825  * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3826  *     Parameters that will be used while selecting the file.
3827  * @param {function(!Object)} callback Function called upon completion.
3828  */
3829 chrome.fileBrowserHandler.selectFile = function(selectionParams, callback) {};
3833  * @interface
3834  * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3835  */
3836 chrome.fileBrowserHandler.ExecuteEvent = function() {};
3840  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3841  */
3842 chrome.fileBrowserHandler.ExecuteEvent.prototype.addListener = function(
3843     callback) {};
3847  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3848  */
3849 chrome.fileBrowserHandler.ExecuteEvent.prototype.removeListener = function(
3850     callback) {};
3854  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3855  * @return {boolean}
3856  */
3857 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListener = function(
3858     callback) {};
3862  * @return {boolean}
3863  */
3864 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListeners = function() {};
3868  * Fired when file system action is executed from ChromeOS file browser.
3869  * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3870  * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3871  */
3872 chrome.fileBrowserHandler.onExecute;
3876  * @const
3877  * @see https://developer.chrome.com/extensions/gcm
3878  */
3879 chrome.gcm = {};
3883  * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3884  * @type {number}
3885  */
3886 chrome.gcm.MAX_MESSAGE_SIZE;
3890  * Registers the application with GCM. The registration ID will be returned by
3891  * the callback. If register is called again with the same list of senderIds,
3892  * the same registration ID will be returned.
3893  * @see https://developer.chrome.com/extensions/gcm#method-register
3894  * @param {!Array<string>} senderIds A list of server IDs that are allowed to
3895  *     send messages to the application.
3896  * @param {function(string): void} callback Function called when
3897  *     registration completes with registration ID as argument.
3898  */
3899 chrome.gcm.register = function(senderIds, callback) {};
3903  * Unregisters the application from GCM.
3904  * @see https://developer.chrome.com/extensions/gcm#method-unregister
3905  * @param {function(): void} callback Called when unregistration is done.
3906  */
3907 chrome.gcm.unregister = function(callback) {};
3911  * Sends an upstream message using GCM.
3912  * @see https://developer.chrome.com/extensions/gcm#method-send
3913  * @param {!chrome.gcm.Message} message Message to be sent.
3914  * @param {function(string): void} callback Called with message ID.
3915  */
3916 chrome.gcm.send = function(message, callback) {};
3920  * Outgoing message.
3921  * @typedef {?{
3922  *   destinationId: string,
3923  *   messageId: string,
3924  *   timeToLive: (number|undefined),
3925  *   data: !Object<string, string>
3926  * }}
3927  */
3928 chrome.gcm.Message;
3932  * An event, fired when a message is received through GCM.
3933  * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3934  * @type {!chrome.gcm.OnMessageEvent}
3935  */
3936 chrome.gcm.onMessage;
3940  * An event, fired when GCM server had to delete messages to the application
3941  * from its queue in order to manage its size.
3942  * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3943  * @type {!ChromeEvent}
3944  */
3945 chrome.gcm.onMessagesDeleted;
3949  * An event indicating problems with sending messages.
3950  * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3951  * @type {!chrome.gcm.OnSendErrorEvent}
3952  */
3953 chrome.gcm.onSendError;
3958  * @constructor
3959  */
3960 chrome.gcm.OnMessageEvent = function() {};
3964  * @param {function(!Object): void} callback Callback.
3965  */
3966 chrome.gcm.OnMessageEvent.prototype.addListener = function(callback) {};
3970  * @param {function(!Object): void} callback Callback.
3971  */
3972 chrome.gcm.OnMessageEvent.prototype.removeListener = function(callback) {};
3976  * @param {function(!Object): void} callback Callback.
3977  * @return {boolean}
3978  */
3979 chrome.gcm.OnMessageEvent.prototype.hasListener = function(callback) {};
3983  * @return {boolean}
3984  */
3985 chrome.gcm.OnMessageEvent.prototype.hasListeners = function() {};
3990  * @constructor
3991  */
3992 chrome.gcm.OnSendErrorEvent = function() {};
3996  * @param {function(!Object): void} callback Callback.
3997  */
3998 chrome.gcm.OnSendErrorEvent.prototype.addListener = function(callback) {};
4002  * @param {function(!Object): void} callback Callback.
4003  */
4004 chrome.gcm.OnSendErrorEvent.prototype.removeListener = function(callback) {};
4008  * @param {function(!Object): void} callback Callback.
4009  * @return {boolean}
4010  */
4011 chrome.gcm.OnSendErrorEvent.prototype.hasListener = function(callback) {};
4015  * @return {boolean}
4016  */
4017 chrome.gcm.OnSendErrorEvent.prototype.hasListeners = function() {};
4021  * @const
4022  * @see https://developer.chrome.com/extensions/history.html
4023  */
4024 chrome.history = {};
4028  * @param {Object<string, string>} details Object with a 'url' key.
4029  */
4030 chrome.history.addUrl = function(details) {};
4034  * @param {function(): void} callback Callback function.
4035  */
4036 chrome.history.deleteAll = function(callback) {};
4040  * @param {Object<string, string>} range Object with 'startTime'
4041  *     and 'endTime' keys.
4042  * @param {function(): void} callback Callback function.
4043  */
4044 chrome.history.deleteRange = function(range, callback) {};
4048  * @param {Object<string, string>} details Object with a 'url' key.
4049  */
4050 chrome.history.deleteUrl = function(details) {};
4054  * @param {Object<string, string>} details Object with a 'url' key.
4055  * @param {function(!Array<!VisitItem>): void} callback Callback function.
4056  * @return {!Array<!VisitItem>}
4057  */
4058 chrome.history.getVisits = function(details, callback) {};
4062  * @param {Object<string, string>} query Object with a 'text' (string)
4063  *     key and optional 'startTime' (number), 'endTime' (number) and
4064  *     'maxResults' keys.
4065  * @param {function(!Array<!HistoryItem>): void} callback Callback function.
4066  * @return {!Array<!HistoryItem>}
4067  */
4068 chrome.history.search = function(query, callback) {};
4071 /** @type {!ChromeEvent} */
4072 chrome.history.onVisitRemoved;
4075 /** @type {!ChromeEvent} */
4076 chrome.history.onVisited;
4080  * @const
4081  * @see http://developer.chrome.com/apps/identity.html
4082  */
4083 chrome.identity = {};
4087  * @param {(chrome.identity.TokenDetails|function(string=): void)}
4088  *     detailsOrCallback Token options or a callback function if no options are
4089  *     specified.
4090  * @param {function(string=): void=} opt_callback A callback function if options
4091  *     are specified.
4092  */
4093 chrome.identity.getAuthToken = function(detailsOrCallback, opt_callback) {};
4096 /** @typedef {{interactive: (boolean|undefined)}} */
4097 chrome.identity.TokenDetails;
4101  * @param {chrome.identity.InvalidTokenDetails} details
4102  * @param {function(): void} callback
4103  */
4104 chrome.identity.removeCachedAuthToken = function(details, callback) {};
4107 /** @typedef {{token: string}} */
4108 chrome.identity.InvalidTokenDetails;
4112  * @param {chrome.identity.WebAuthFlowDetails} details
4113  * @param {function(string=): void} callback
4114  */
4115 chrome.identity.launchWebAuthFlow = function(details, callback) {};
4118 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
4119 chrome.identity.WebAuthFlowDetails;
4122 /** @param {function(!Object):void} callback */
4123 chrome.identity.getProfileUserInfo = function(callback) {};
4126 /** @type {!ChromeEvent} */
4127 chrome.identity.onSignInChanged;
4131  * @const
4132  * @see https://developer.chrome.com/extensions/input.ime.html
4133  */
4134 chrome.input = {};
4137 /** @const */
4138 chrome.input.ime = {};
4143  * The OnKeyEvent event takes an extra argument.
4144  * @constructor
4145  */
4146 function ChromeInputImeOnKeyEventEvent() {}
4150  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4151  *     callback.
4152  * @param {Array<string>=} opt_extraInfoSpec Array of extra information.
4153  */
4154 ChromeInputImeOnKeyEventEvent.prototype.addListener =
4155     function(callback, opt_extraInfoSpec) {};
4159  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4160  *     callback.
4161  */
4162 ChromeInputImeOnKeyEventEvent.prototype.removeListener = function(callback) {};
4166  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4167  *     callback.
4168  */
4169 ChromeInputImeOnKeyEventEvent.prototype.hasListener = function(callback) {};
4173  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4174  *     callback.
4175  */
4176 ChromeInputImeOnKeyEventEvent.prototype.hasListeners = function(callback) {};
4180  * @param {!Object<string,number>} parameters An object with a
4181  *     'contextID' (number) key.
4182  * @param {function(boolean): void} callback Callback function.
4183  */
4184 chrome.input.ime.clearComposition = function(parameters, callback) {};
4188  * @param {!Object<string,(string|number)>} parameters An object with
4189  *     'contextID' (number) and 'text' (string) keys.
4190  * @param {function(boolean): void=} opt_callback Callback function.
4191  */
4192 chrome.input.ime.commitText = function(parameters, opt_callback) {};
4196  * @param {!Object<string,(string|number)>} parameters An object with
4197  *     'contextID' (number) and 'text' (string) keys.
4198  * @param {function(boolean): void=} opt_callback Callback function.
4199  */
4200 chrome.input.ime.deleteSurroundingText = function(parameters, opt_callback) {};
4204  * @param {!Object<string,(number|Object<string,(string|number|boolean)>)>}
4205  *     parameters An object with 'engineID' (string) and 'properties'
4206  *     (Object) keys.
4207  * @param {function(boolean): void=} opt_callback Callback function.
4208  */
4209 chrome.input.ime.setCandidateWindowProperties =
4210     function(parameters, opt_callback) {};
4214  * @param {!Object<string,(number|Object<string,(string|number)>)>}
4215  *     parameters An object with 'contextID' (number) and 'candidates'
4216  *     (array of object) keys.
4217  * @param {function(boolean): void=} opt_callback Callback function.
4218  */
4219 chrome.input.ime.setCandidates = function(parameters, opt_callback) {};
4223  * @param {!Object<string,(string|number|Object<string,(string|number)>)>}
4224  *     parameters An object with 'contextID' (number), 'text' (string),
4225  *     'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
4226  *     and 'segments' (array of object) keys.
4227  * @param {function(boolean): void=} opt_callback Callback function.
4228  */
4229 chrome.input.ime.setComposition = function(parameters, opt_callback) {};
4233  * @param {!Object<string,number>} parameters An object with
4234  *     'contextID' (number) and 'candidateID' (number) keys.
4235  * @param {function(boolean): void=} opt_callback Callback function.
4236  */
4237 chrome.input.ime.setCursorPosition = function(parameters, opt_callback) {};
4241  * @param {!Object<string,(string|Array<Object<string,(string|boolean)>>)>}
4242  *     parameters An object with 'engineID' (string) and 'items'
4243  *     (array of object) keys.
4244  * @param {function(): void=} opt_callback Callback function.
4245  */
4246 chrome.input.ime.setMenuItems = function(parameters, opt_callback) {};
4250  * @param {!Object<string,(string|Array<Object<string,(string|boolean)>>)>}
4251  *     parameters An object with  'engineID' (string) and 'items'
4252  *     (array of object) keys.
4253  * @param {function(): void=} opt_callback Callback function.
4254  */
4255 chrome.input.ime.updateMenuItems = function(parameters, opt_callback) {};
4259  * @param {string} requestId Request id of the event that was handled. This
4260  *     should come from keyEvent.requestId.
4261  * @param {boolean} response True if the keystroke was handled, false if not.
4262  */
4263 chrome.input.ime.keyEventHandled = function(requestId, response) {};
4266 /** @type {!ChromeEvent} */
4267 chrome.input.ime.onActivate;
4270 /** @type {!ChromeEvent} */
4271 chrome.input.ime.onBlur;
4274 /** @type {!ChromeEvent} */
4275 chrome.input.ime.onCandidateClicked;
4278 /** @type {!ChromeEvent} */
4279 chrome.input.ime.onDeactivated;
4282 /** @type {!ChromeEvent} */
4283 chrome.input.ime.onFocus;
4286 /** @type {!ChromeEvent} */
4287 chrome.input.ime.onInputContextUpdate;
4290 /** @type {!ChromeInputImeOnKeyEventEvent} */
4291 chrome.input.ime.onKeyEvent;
4294 /** @type {!ChromeEvent} */
4295 chrome.input.ime.onMenuItemActivated;
4298 /** @type {!ChromeEvent} */
4299 chrome.input.ime.onReset;
4302 /** @type {!ChromeEvent} */
4303 chrome.input.ime.onSurroundingTextChanged;
4307  * namespace
4308  * @see http://developer.chrome.com/apps/mediaGalleries
4309  * @const
4310  */
4311 chrome.mediaGalleries = {};
4315  * @param {{interactive: (string|undefined)}|function(!Array<!FileSystem>)}
4316  *     detailsOrCallback A details object for whether the request should be
4317  *     interactive if permissions haven't been granted yet or the callback.
4318  * @param {function(!Array<!FileSystem>)=} opt_callback A success callback if
4319  *     no details were supplied as arg1.
4320  */
4321 chrome.mediaGalleries.getMediaFileSystems = function(
4322     detailsOrCallback, opt_callback) {};
4326  * @param {function(!Array<!FileSystem>, string)} callback Callback function.
4327  */
4328 chrome.mediaGalleries.addUserSelectedFolder = function(callback) {};
4332  * @param {string} galleryId ID of the media gallery.
4333  * @param {function()=} opt_callback Optional callback function.
4334  */
4335 chrome.mediaGalleries.dropPermissionForMediaFileSystem =
4336     function(galleryId, opt_callback) {};
4339 chrome.mediaGalleries.startMediaScan = function() {};
4342 chrome.mediaGalleries.cancelMediaScan = function() {};
4346  * @param {function(!Array<!FileSystem>)} callback Callback function.
4347  */
4348 chrome.mediaGalleries.addScanResults = function(callback) {};
4352  * @typedef {{
4353  *   name: string,
4354  *   galleryId: string,
4355  *   deviceId: (string|undefined),
4356  *   isRemovable: boolean,
4357  *   isMediaDevice: boolean,
4358  *   isAvailable: boolean
4359  * }}
4360  */
4361 chrome.mediaGalleries.MediaFileSystemMetadata;
4365  * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
4366  * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
4367  */
4368 chrome.mediaGalleries.getMediaFileSystemMetadata = function(mediaFileSystem) {};
4372  * @param {function(!Array<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
4373  *     callback Callback function.
4374  */
4375 chrome.mediaGalleries.getAllMediaFileSystemMetadata = function(callback) {};
4379  * @typedef {{
4380  *   mimeType: string,
4381  *   height: (number|undefined),
4382  *   width: (number|undefined),
4383  *   xResolution: (number|undefined),
4384  *   yResolution: (number|undefined),
4385  *   duration: (number|undefined),
4386  *   rotation: (number|undefined),
4387  *   cameraMake: (string|undefined),
4388  *   cameraModel: (string|undefined),
4389  *   exposureTimeSeconds: (number|undefined),
4390  *   flashFired: (boolean|undefined),
4391  *   fNumber: (number|undefined),
4392  *   focalLengthMm: (number|undefined),
4393  *   isoEquivalent: (number|undefined),
4394  *   album: (string|undefined),
4395  *   artist: (string|undefined),
4396  *   comment: (string|undefined),
4397  *   copyright: (string|undefined),
4398  *   disc: (number|undefined),
4399  *   genre: (string|undefined),
4400  *   language: (string|undefined),
4401  *   title: (string|undefined),
4402  *   track: (number|undefined),
4403  *   rawTags: !Array<!chrome.mediaGalleries.metadata.RawTag>,
4404  *   attachedImages: !Array<!Blob>
4405  * }}
4406  */
4407 chrome.mediaGalleries.MetaData;
4410 /** @const */
4411 chrome.mediaGalleries.metadata = {};
4414 /** @constructor */
4415 chrome.mediaGalleries.metadata.RawTag = function() {};
4418 /** @type {string} */
4419 chrome.mediaGalleries.metadata.RawTag.prototype.type;
4422 /** @type {!Object<string, string>} */
4423 chrome.mediaGalleries.metadata.RawTag.prototype.tags;
4427  * @param {!Blob} mediaFile The media file for which to get metadata.
4428  * @param {{metadataType: (string|undefined)}|
4429  *     function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
4430  *     for the metadata to retrieve or the callback to invoke with the metadata.
4431  *     The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
4432  *     'all' if the metadataType is omitted.
4433  * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
4434  *     were passed as arg2, the callback to invoke with the metadata.
4435  */
4436 chrome.mediaGalleries.getMetadata = function(
4437     mediaFile, optionsOrCallback, opt_callback) {};
4441  * @typedef {function({galleryId: string, success: boolean}): void}
4442  */
4443 chrome.mediaGalleries.AddGalleryWatchCallback;
4447  * @param {string} galleryId The media gallery's ID.
4448  * @param {!chrome.mediaGalleries.AddGalleryWatchCallback} callback Fired with
4449  *     success or failure result.
4450  */
4451 chrome.mediaGalleries.addGalleryWatch = function(galleryId, callback) {};
4455  * @param {string} galleryId The media gallery's ID.
4456  */
4457 chrome.mediaGalleries.removeGalleryWatch = function(galleryId) {};
4461  * @param {function(!Array<string>): void} callback Callback function notifies
4462  *     which galleries are being watched.
4463  */
4464 chrome.mediaGalleries.getAllGalleryWatch = function(callback) {};
4467 chrome.mediaGalleries.removeAllGalleryWatch = function() {};
4472  * @constructor
4473  */
4474 chrome.mediaGalleries.GalleryChangeEvent = function() {};
4478  * @typedef {function({type: string, galleryId: string}): void}
4479  */
4480 chrome.mediaGalleries.GalleryChangeCallback;
4484  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4485  */
4486 chrome.mediaGalleries.GalleryChangeEvent.prototype.addListener =
4487     function(callback) {};
4491  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4492  */
4493 chrome.mediaGalleries.GalleryChangeEvent.prototype.removeListener =
4494     function(callback) {};
4498  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4499  */
4500 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListener =
4501     function(callback) {};
4505  * @return {boolean}
4506  */
4507 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListeners = function() {};
4511  * @type {!chrome.mediaGalleries.GalleryChangeEvent}
4512  */
4513 chrome.mediaGalleries.onGalleryChanged;
4517  * @typedef {{
4518  *   type: string,
4519  *   galleryCount: (number|undefined),
4520  *   audioCount: (number|undefined),
4521  *   imageCount: (number|undefined),
4522  *   videoCount: (number|undefined)
4523  * }}
4524  */
4525 chrome.mediaGalleries.OnScanProgressDetails;
4530  * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
4531  * parameter.
4532  * @constructor
4533  */
4534 chrome.mediaGalleries.ScanProgressEvent = function() {};
4537 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4538 chrome.mediaGalleries.ScanProgressEvent.prototype.addListener =
4539     function(callback) {};
4542 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4543 chrome.mediaGalleries.ScanProgressEvent.prototype.removeListener =
4544     function(callback) {};
4548  * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
4549  * @return {boolean}
4550  */
4551 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListener =
4552     function(callback) {};
4555 /** @return {boolean} */
4556 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListeners = function() {};
4559 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
4560 chrome.mediaGalleries.onScanProgress;
4564  * @const
4565  * @see https://developer.chrome.com/extensions/pageCapture.html
4566  */
4567 chrome.pageCapture = {};
4571  * @param {Object<string, number>} details Object with a 'tabId' (number) key.
4572  * @param {function(Blob=): void} callback Callback function.
4573  */
4574 chrome.pageCapture.saveAsMHTML = function(details, callback) {};
4578  * @const
4579  * @see https://developer.chrome.com/extensions/permissions.html
4580  */
4581 chrome.permissions = {};
4585  * @typedef {{
4586  *   permissions: (Array<string>|undefined),
4587  *   origins: (Array<string>|undefined)
4588  * }}
4589  * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
4590  */
4591 chrome.permissions.Permissions;
4595  * @param {!chrome.permissions.Permissions} permissions
4596  * @param {function(boolean): void} callback Callback function.
4597  */
4598 chrome.permissions.contains = function(permissions, callback) {};
4602  * @param {function(!chrome.permissions.Permissions): void} callback
4603  *     Callback function.
4604  */
4605 chrome.permissions.getAll = function(callback) {};
4609  * @param {!chrome.permissions.Permissions} permissions
4610  * @param {function(boolean): void=} opt_callback Callback function.
4611  */
4612 chrome.permissions.remove = function(permissions, opt_callback) {};
4616  * @param {!chrome.permissions.Permissions} permissions
4617  * @param {function(boolean): void=} opt_callback Callback function.
4618  */
4619 chrome.permissions.request = function(permissions, opt_callback) {};
4622 /** @type {!ChromeEvent} */
4623 chrome.permissions.onAdded;
4626 /** @type {!ChromeEvent} */
4627 chrome.permissions.onRemoved;
4631  * @see http://developer.chrome.com/dev/extensions/power.html
4632  */
4633 chrome.power = {};
4637  * @param {string} level A string describing the degree to which power
4638  *     management should be disabled, should be either "system" or "display".
4639  */
4640 chrome.power.requestKeepAwake = function(level) {};
4644  * Releases a request previously made via requestKeepAwake().
4645  */
4646 chrome.power.releaseKeepAwake = function() {};
4650  * @const
4651  * @see https://developer.chrome.com/extensions/privacy.html
4652  */
4653 chrome.privacy = {};
4656 /** @type {!Object<string,!ChromeSetting>} */
4657 chrome.privacy.network;
4660 /** @type {!Object<string,!ChromeSetting>} */
4661 chrome.privacy.services;
4664 /** @type {!Object<string,!ChromeSetting>} */
4665 chrome.privacy.websites;
4669  * @const
4670  * @see https://developer.chrome.com/extensions/proxy.html
4671  */
4672 chrome.proxy = {};
4675 /** @type {!Object<string,!ChromeSetting>} */
4676 chrome.proxy.settings;
4679 /** @type {!ChromeEvent} */
4680 chrome.proxy.onProxyError;
4684  * @const
4685  * @see http://developer.chrome.com/apps/socket.html
4686  */
4687 chrome.socket = {};
4692  * @constructor
4693  */
4694 chrome.socket.CreateInfo = function() {};
4697 /** @type {number} */
4698 chrome.socket.CreateInfo.prototype.socketId;
4703  * @constructor
4704  */
4705 chrome.socket.ReadInfo = function() {};
4708 /** @type {number} */
4709 chrome.socket.ReadInfo.prototype.resultCode;
4712 /** @type {!ArrayBuffer} */
4713 chrome.socket.ReadInfo.prototype.data;
4718  * @constructor
4719  */
4720 chrome.socket.WriteInfo = function() {};
4723 /** @type {number} */
4724 chrome.socket.WriteInfo.prototype.bytesWritten;
4729  * @constructor
4730  */
4731 chrome.socket.RecvFromInfo = function() {};
4734 /** @type {number} */
4735 chrome.socket.RecvFromInfo.prototype.resultCode;
4738 /** @type {!ArrayBuffer} */
4739 chrome.socket.RecvFromInfo.prototype.data;
4742 /** @type {string} */
4743 chrome.socket.RecvFromInfo.prototype.address;
4746 /** @type {number} */
4747 chrome.socket.RecvFromInfo.prototype.port;
4752  * @constructor
4753  */
4754 chrome.socket.AcceptInfo = function() {};
4757 /** @type {number} */
4758 chrome.socket.AcceptInfo.prototype.resultCode;
4761 /** @type {(number|undefined)} */
4762 chrome.socket.AcceptInfo.prototype.socketId;
4767  * @constructor
4768  */
4769 chrome.socket.SocketInfo = function() {};
4772 /** @type {string} */
4773 chrome.socket.SocketInfo.prototype.socketType;
4776 /** @type {boolean} */
4777 chrome.socket.SocketInfo.prototype.connected;
4780 /** @type {(string|undefined)} */
4781 chrome.socket.SocketInfo.prototype.peerAddress;
4784 /** @type {(number|undefined)} */
4785 chrome.socket.SocketInfo.prototype.peerPort;
4788 /** @type {(string|undefined)} */
4789 chrome.socket.SocketInfo.prototype.localAddress;
4792 /** @type {(number|undefined)} */
4793 chrome.socket.SocketInfo.prototype.localPort;
4798  * @constructor
4799  */
4800 chrome.socket.NetworkAdapterInfo = function() {};
4803 /** @type {string} */
4804 chrome.socket.NetworkAdapterInfo.prototype.name;
4807 /** @type {string} */
4808 chrome.socket.NetworkAdapterInfo.prototype.address;
4812  * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4813  * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4814  *     socket options or callback.
4815  * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4816  *     socket has been created.
4817  */
4818 chrome.socket.create = function(type, optionsOrCallback, opt_callback) {};
4822  * @param {number} socketId The id of the socket to destroy.
4823  */
4824 chrome.socket.destroy = function(socketId) {};
4828  * @param {number} socketId The id of the socket.
4829  * @param {string} hostname The hostname or IP address of the remote machine.
4830  * @param {number} port The port of the remote machine.
4831  * @param {function(number)} callback Called when the connection attempt is
4832  *     complete.
4833  */
4834 chrome.socket.connect = function(socketId, hostname, port, callback) {};
4838  * @param {number} socketId The id of the socket.
4839  * @param {string} address The address of the local machine.
4840  * @param {number} port The port of the local machine.
4841  * @param {function(number)} callback Called when the bind attempt is complete.
4842  */
4843 chrome.socket.bind = function(socketId, address, port, callback) {};
4847  * @param {number} socketId The id of the socket to disconnect.
4848  */
4849 chrome.socket.disconnect = function(socketId) {};
4853  * @param {number} socketId The id of the socket to read from.
4854  * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4855  *     read buffer size or the callback.
4856  * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4857  *     that was available to be read without blocking.
4858  */
4859 chrome.socket.read = function(socketId, bufferSizeOrCallback, opt_callback) {};
4863  * @param {number} socketId The id of the socket to write to.
4864  * @param {!ArrayBuffer} data The data to write.
4865  * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4866  *     operation completes without blocking or an error occurs.
4867  */
4868 chrome.socket.write = function(socketId, data, callback) {};
4872  * @param {number} socketId The id of the socket to read from.
4873  * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4874  *     The read buffer size or the callback.
4875  * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4876  *     that was available to be read without blocking.
4877  */
4878 chrome.socket.recvFrom = function(socketId, bufferSizeOrCallback,
4879     opt_callback) {};
4883  * @param {number} socketId The id of the socket to write to.
4884  * @param {!ArrayBuffer} data The data to write.
4885  * @param {string} address The address of the remote machine.
4886  * @param {number} port The port of the remote machine.
4887  * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4888  *     operation completes without blocking or an error occurs.
4889  */
4890 chrome.socket.sendTo = function(socketId, data, address, port, callback) {};
4894  * @param {number} socketId The id of the socket to listen on.
4895  * @param {string} address The address of the local machine to listen on. Use
4896  *     '0' to listen on all addresses.
4897  * @param {number} port The port of the local machine.
4898  * @param {(number|function(number))} backlogOrCallback The length of the
4899  *     socket's listen queue or the callback.
4900  * @param {function(number)=} opt_callback Called when the listen operation
4901  *     completes.
4902  */
4903 chrome.socket.listen =
4904     function(socketId, address, port, backlogOrCallback, opt_callback) {};
4908  * @param {number} socketId The id of the socket to accept a connection on.
4909  * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4910  *     socket is accepted.
4911  */
4912 chrome.socket.accept = function(socketId, callback) {};
4916  * @param {number} socketId The id of the socket to listen on.
4917  * @param {boolean} enable If true, enable keep-alive functionality.
4918  * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4919  *     between the last packet received and the first keepalive probe (default
4920  *     is 0) or the callback
4921  * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4922  *     is complete.
4923  */
4924 chrome.socket.setKeepAlive = function(socketId, enable, delayOrCallback,
4925     opt_callback) {};
4929  * @param {number} socketId The id of the socket to listen on.
4930  * @param {boolean} noDelay If true, disables Nagle's algorithm.
4931  * @param {function(boolean)} callback Called when the setNoDelay attempt is
4932  *     complete.
4933  */
4934 chrome.socket.setNoDelay = function(socketId, noDelay, callback) {};
4938  * @param {number} socketId The id of the socket.
4939  * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4940  *     is available.
4941  */
4942 chrome.socket.getInfo = function(socketId, callback) {};
4946  * @param {function(!Array<!chrome.socket.NetworkAdapterInfo>)} callback Called
4947  *     when local adapter information is available.
4948  */
4949 chrome.socket.getNetworkList = function(callback) {};
4953  * @param {number} socketId The id of the socket.
4954  * @param {string} address The group address to join. Domain names are not
4955  *     supported.
4956  * @param {function(number)} callback Called when the join operation is done.
4957  */
4958 chrome.socket.joinGroup = function(socketId, address, callback) {};
4962  * @param {number} socketId The id of the socket.
4963  * @param {string} address The group address to leave. Domain names are not
4964  *     supported.
4965  * @param {function(number)} callback Called when the leave operation is done.
4966  */
4967 chrome.socket.leaveGroup = function(socketId, address, callback) {};
4971  * @param {number} socketId The id of the socket.
4972  * @param {number} ttl The time-to-live value.
4973  * @param {function(number)} callback Called when the configuration operation is
4974  *     done.
4975  */
4976 chrome.socket.setMulticastTimeToLive = function(socketId, ttl, callback) {};
4980  * @param {number} socketId The id of the socket.
4981  * @param {boolean} enabled True to enable loopback mode.
4982  * @param {function(number)} callback Called when the configuration operation is
4983  *     done.
4984  */
4985 chrome.socket.setMulticastLoopbackMode = function(socketId, enabled,
4986     callback) {};
4990  * @param {number} socketId The id of the socket.
4991  * @param {function(!Array<string>)} callback Called with an array of string
4992  *     groups.
4993  */
4994 chrome.socket.getJoinedGroups = function(socketId, callback) {};
4998   * @const
4999   */
5000 chrome.sockets = {};
5004   * @const
5005   * @see https://developer.chrome.com/apps/sockets_tcp
5006   */
5007 chrome.sockets.tcp = {};
5012  * @constructor
5013  * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketInfo
5014  */
5015 chrome.sockets.tcp.SocketInfo = function() {};
5018 /** @type {number} */
5019 chrome.sockets.tcp.SocketInfo.prototype.socketId;
5022 /** @type {boolean} */
5023 chrome.sockets.tcp.SocketInfo.prototype.persistent;
5026 /** @type {string|undefined} */
5027 chrome.sockets.tcp.SocketInfo.prototype.name;
5030 /** @type {number|undefined} */
5031 chrome.sockets.tcp.SocketInfo.prototype.bufferSize;
5034 /** @type {boolean} */
5035 chrome.sockets.tcp.SocketInfo.prototype.paused;
5038 /** @type {boolean} */
5039 chrome.sockets.tcp.SocketInfo.prototype.connected;
5042 /** @type {string|undefined} */
5043 chrome.sockets.tcp.SocketInfo.prototype.localAddress;
5046 /** @type {number|undefined} */
5047 chrome.sockets.tcp.SocketInfo.prototype.localPort;
5050 /** @type {string|undefined} */
5051 chrome.sockets.tcp.SocketInfo.prototype.peerAddress;
5054 /** @type {number|undefined} */
5055 chrome.sockets.tcp.SocketInfo.prototype.peerPort;
5059  * @typedef {?{
5060  *   persistent: (boolean|undefined),
5061  *   name: (string|undefined),
5062  *   bufferSize: (number|undefined)
5063  * }}
5064  * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketProperties
5065  */
5066 chrome.sockets.tcp.SocketProperties;
5070  * @typedef {?{
5071  *   min: (string|undefined),
5072  *   max: (string|undefined)
5073  * }}
5074  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5075  */
5076 chrome.sockets.tcp.SecurePropertiesTlsVersion;
5080  * @typedef {?{
5081  *   tlsVersion: (chrome.sockets.tcp.SecurePropertiesTlsVersion|undefined)
5082  * }}
5083  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5084  */
5085 chrome.sockets.tcp.SecureProperties;
5089  * @param {!chrome.sockets.tcp.SocketProperties|
5090  *     function(!Object)} propertiesOrCallback
5091  * @param {function(!Object)=} opt_callback
5092  * @see https://developer.chrome.com/apps/sockets_tcp#method-create
5093  */
5094 chrome.sockets.tcp.create = function(propertiesOrCallback, opt_callback) {};
5098  * @param {number} socketId
5099  * @param {!chrome.sockets.tcp.SocketProperties} properties
5100  * @param {function()=} opt_callback
5101  * @see https://developer.chrome.com/apps/sockets_tcp#method-update
5102  */
5103 chrome.sockets.tcp.update = function(socketId, properties, opt_callback) {};
5107  * @param {number} socketId
5108  * @param {boolean} paused
5109  * @param {function()=} opt_callback
5110  * @see https://developer.chrome.com/apps/sockets_tcp#method-setPaused
5111  */
5112 chrome.sockets.tcp.setPaused = function(socketId, paused, opt_callback) {};
5116  * @param {number} socketId
5117  * @param {boolean} enable
5118  * @param {(number|function(number))} delayOrCallback
5119  * @param {function(number)=} opt_callback
5120  * @see https://developer.chrome.com/apps/sockets_tcp#method-setKeepAlive
5121  */
5122 chrome.sockets.tcp.setKeepAlive = function(socketId, enable, delayOrCallback,
5123     opt_callback) {};
5127  * @param {number} socketId
5128  * @param {boolean} noDelay
5129  * @param {function(number)} callback
5130  * @see https://developer.chrome.com/apps/sockets_tcp#method-setNoDelay
5131  */
5132 chrome.sockets.tcp.setNoDelay = function(socketId, noDelay, callback) {};
5136  * @param {number} socketId
5137  * @param {string} peerAddress
5138  * @param {number} peerPort
5139  * @param {function(number)} callback
5140  * @see https://developer.chrome.com/apps/sockets_tcp#method-connect
5141  */
5142 chrome.sockets.tcp.connect = function(socketId, peerAddress, peerPort,
5143     callback) {};
5147  * @param {number} socketId The id of the socket to disconnect.
5148  * @param {function()=} opt_callback
5149  * @see https://developer.chrome.com/apps/sockets_tcp#method-disconnect
5150  */
5151 chrome.sockets.tcp.disconnect = function(socketId, opt_callback) {};
5155  * @param {number} socketId
5156  * @param {!chrome.sockets.tcp.SecureProperties|function(number)}
5157  *     optionsOrCallback
5158  * @param {function(number)=} opt_callback
5159  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5160  */
5161 chrome.sockets.tcp.secure = function(socketId, optionsOrCallback,
5162     opt_callback) {};
5166  * @param {number} socketId
5167  * @param {!ArrayBuffer} data
5168  * @param {function(!Object)} callback
5169  * @see https://developer.chrome.com/apps/sockets_tcp#method-send
5170  */
5171 chrome.sockets.tcp.send = function(socketId, data, callback) {};
5175  * @param {number} socketId
5176  * @param {function()=} opt_callback
5177  * @see https://developer.chrome.com/apps/sockets_tcp#method-close
5178  */
5179 chrome.sockets.tcp.close = function(socketId, opt_callback) {};
5183  * @param {number} socketId
5184  * @param {function(!chrome.sockets.tcp.SocketInfo)} callback
5185  * @see https://developer.chrome.com/apps/sockets_tcp#method-getInfo
5186  */
5187 chrome.sockets.tcp.getInfo = function(socketId, callback) {};
5191  * @param {function(!Array<!chrome.sockets.tcp.SocketInfo>)} callback
5192  * @see https://developer.chrome.com/apps/sockets_tcp#method-getSockets
5193  */
5194 chrome.sockets.tcp.getSockets = function(callback) {};
5199  * @constructor
5200  * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceive
5201  */
5202 chrome.sockets.tcp.ReceiveEventData = function() {};
5205 /** @type {number} */
5206 chrome.sockets.tcp.ReceiveEventData.prototype.socketId;
5209 /** @type {!ArrayBuffer} */
5210 chrome.sockets.tcp.ReceiveEventData.prototype.data;
5215  * Event whose listeners take a ReceiveEventData parameter.
5216  * @constructor
5217  */
5218 chrome.sockets.tcp.ReceiveEvent = function() {};
5222  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5223  */
5224 chrome.sockets.tcp.ReceiveEvent.prototype.addListener =
5225     function(callback) {};
5229  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5230  */
5231 chrome.sockets.tcp.ReceiveEvent.prototype.removeListener =
5232     function(callback) {};
5236  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5237  * @return {boolean}
5238  */
5239 chrome.sockets.tcp.ReceiveEvent.prototype.hasListener =
5240     function(callback) {};
5243 /** @return {boolean} */
5244 chrome.sockets.tcp.ReceiveEvent.prototype.hasListeners = function() {};
5247 /** @type {!chrome.sockets.tcp.ReceiveEvent} */
5248 chrome.sockets.tcp.onReceive;
5253  * @constructor
5254  * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceiveError
5255  */
5256 chrome.sockets.tcp.ReceiveErrorEventData = function() {};
5259 /** @type {number} */
5260 chrome.sockets.tcp.ReceiveErrorEventData.prototype.socketId;
5263 /** @type {number} */
5264 chrome.sockets.tcp.ReceiveErrorEventData.prototype.resultCode;
5269  * Event whose listeners take a ReceiveErrorEventData parameter.
5270  * @constructor
5271  */
5272 chrome.sockets.tcp.ReceiveErrorEvent = function() {};
5276  * @param {function(
5277  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5278  */
5279 chrome.sockets.tcp.ReceiveErrorEvent.prototype.addListener =
5280     function(callback) {};
5284  * @param {function(
5285  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5286  */
5287 chrome.sockets.tcp.ReceiveErrorEvent.prototype.removeListener =
5288     function(callback) {};
5292  * @param {function(
5293  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5294  * @return {boolean}
5295  */
5296 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListener =
5297     function(callback) {};
5300 /** @return {boolean} */
5301 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListeners =
5302     function() {};
5305 /** @type {!chrome.sockets.tcp.ReceiveErrorEvent} */
5306 chrome.sockets.tcp.onReceiveError;
5310  * @const
5311  * @see https://developer.chrome.com/extensions/storage.html
5312  */
5313 chrome.storage = {};
5316 /** @type {!StorageArea} */
5317 chrome.storage.sync;
5320 /** @type {!StorageArea} */
5321 chrome.storage.local;
5324 /** @type {!StorageChangeEvent} */
5325 chrome.storage.onChanged;
5328 /** @const */
5329 chrome.system = {};
5333  * @const
5334  * @see https://developer.chrome.com/extensions/system_cpu.html
5335  */
5336 chrome.system.cpu = {};
5340  * @param {function(!Object)} callback
5341  */
5342 chrome.system.cpu.getInfo = function(callback) {};
5346  * @const
5347  * @see http://developer.chrome.com/apps/system_display.html
5348  */
5349 chrome.system.display = {};
5352 /** @type {!ChromeEvent} */
5353 chrome.system.display.onDisplayChanged;
5358  * @constructor
5359  */
5360 chrome.system.display.Bounds = function() {};
5363 /** @type {number} */
5364 chrome.system.display.Bounds.prototype.left;
5367 /** @type {number} */
5368 chrome.system.display.Bounds.prototype.top;
5371 /** @type {number} */
5372 chrome.system.display.Bounds.prototype.width;
5375 /** @type {number} */
5376 chrome.system.display.Bounds.prototype.height;
5380  * @typedef {{
5381  *   left: (number|undefined),
5382  *   top: (number|undefined),
5383  *   right: (number|undefined),
5384  *   bottom: (number|undefined)
5385  * }}
5386  */
5387 chrome.system.display.Insets;
5392  * @constructor
5393  */
5394 chrome.system.display.DisplayInfo = function() {};
5397 /** @type {string} */
5398 chrome.system.display.DisplayInfo.prototype.id;
5401 /** @type {string} */
5402 chrome.system.display.DisplayInfo.prototype.name;
5405 /** @type {string} */
5406 chrome.system.display.DisplayInfo.prototype.mirroringSourceId;
5409 /** @type {boolean} */
5410 chrome.system.display.DisplayInfo.prototype.isPrimary;
5413 /** @type {boolean} */
5414 chrome.system.display.DisplayInfo.prototype.isInternal;
5417 /** @type {boolean} */
5418 chrome.system.display.DisplayInfo.prototype.isEnabled;
5421 /** @type {number} */
5422 chrome.system.display.DisplayInfo.prototype.dpiX;
5425 /** @type {number} */
5426 chrome.system.display.DisplayInfo.prototype.dpiY;
5429 /** @type {number} */
5430 chrome.system.display.DisplayInfo.prototype.rotation;
5433 /** @type {!chrome.system.display.Bounds} */
5434 chrome.system.display.DisplayInfo.prototype.bounds;
5437 /** @type {!chrome.system.display.Insets} */
5438 chrome.system.display.DisplayInfo.prototype.overscan;
5441 /** @type {!chrome.system.display.Bounds} */
5442 chrome.system.display.DisplayInfo.prototype.workArea;
5446  * @typedef {{
5447  *   mirroringSourceId: (string|undefined),
5448  *   isPrimary: (boolean|undefined),
5449  *   overscan: (!chrome.system.display.Insets|undefined),
5450  *   rotation: (number|undefined),
5451  *   boundsOriginX: (number|undefined),
5452  *   boundsOriginY: (number|undefined)
5453  * }}
5454  */
5455 chrome.system.display.SettableDisplayInfo;
5458 chrome.types = {};
5462  * @typedef {?{
5463  *   format: (string|undefined),
5464  *   quality: (number|undefined)
5465  * }}
5466  */
5467 chrome.types.ImageDetails;
5471  * @param {function(!Array<!chrome.system.display.DisplayInfo>)}
5472  *     callback Called with an array of objects representing display info.
5473  */
5474 chrome.system.display.getInfo = function(callback) {};
5478  * @param {string} id The display's unique identifier.
5479  * @param {!chrome.system.display.SettableDisplayInfo} info The information
5480  *     about display properties that should be changed.
5481  * @param {function()=} opt_callback The callback to execute when the display
5482  *     info has been changed.
5483  */
5484 chrome.system.display.setDisplayProperties =
5485     function(id, info, opt_callback) {};
5489  * @const
5490  * @see https://developer.chrome.com/extensions/types.html
5491  */
5492 chrome.chromeSetting = {};
5495 /** @type {!ChromeEvent} */
5496 chrome.chromeSetting.onChange;
5500  * @const
5501  * @see https://developer.chrome.com/extensions/webNavigation.html
5502  */
5503 chrome.webNavigation = {};
5507  * @param {Object} details Object with a 'tabId' (number) key.
5508  * @param {function(!Array<Object<string, (boolean|number|string)>>)} callback
5509  *     Callback function.
5510  */
5511 chrome.webNavigation.getAllFrames = function(details, callback) {};
5515  * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
5516  *     keys.
5517  * @param {function(Object<string, (boolean|string)>)} callback
5518  *     Callback function.
5519  */
5520 chrome.webNavigation.getFrame = function(details, callback) {};
5523 /** @type {!ChromeEvent} */
5524 chrome.webNavigation.onBeforeNavigate;
5527 /** @type {!ChromeEvent} */
5528 chrome.webNavigation.onCommitted;
5531 /** @type {!ChromeEvent} */
5532 chrome.webNavigation.onDOMContentLoaded;
5535 /** @type {!ChromeEvent} */
5536 chrome.webNavigation.onCompleted;
5539 /** @type {!ChromeEvent} */
5540 chrome.webNavigation.onErrorOccurred;
5543 /** @type {!ChromeEvent} */
5544 chrome.webNavigation.onCreatedNavigationTarget;
5547 /** @type {!ChromeEvent} */
5548 chrome.webNavigation.onReferenceFragmentUpdated;
5551 /** @type {!ChromeEvent} */
5552 chrome.webNavigation.onTabReplaced;
5555 /** @type {!ChromeEvent} */
5556 chrome.webNavigation.onHistoryStateUpdated;
5561  * Most event listeners for WebRequest take extra arguments.
5562  * @see https://developer.chrome.com/extensions/webRequest.html.
5563  * @constructor
5564  */
5565 function WebRequestEvent() {}
5569  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5570  *     function.
5571  * @param {!RequestFilter} filter A set of filters that restrict
5572  *     the events that will be sent to this listener.
5573  * @param {Array<string>=} opt_extraInfoSpec Array of extra information
5574  *     that should be passed to the listener function.
5575  */
5576 WebRequestEvent.prototype.addListener =
5577     function(listener, filter, opt_extraInfoSpec) {};
5581  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5582  *     function.
5583  */
5584 WebRequestEvent.prototype.removeListener = function(listener) {};
5588  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5589  *     function.
5590  */
5591 WebRequestEvent.prototype.hasListener = function(listener) {};
5595  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5596  *     function.
5597  */
5598 WebRequestEvent.prototype.hasListeners = function(listener) {};
5603  * The onErrorOccurred event takes one less parameter than the others.
5604  * @see https://developer.chrome.com/extensions/webRequest.html.
5605  * @constructor
5606  */
5607 function WebRequestOnErrorOccurredEvent() {}
5611  * @param {function(!Object): void} listener Listener function.
5612  * @param {!RequestFilter} filter A set of filters that restrict
5613  *     the events that will be sent to this listener.
5614  */
5615 WebRequestOnErrorOccurredEvent.prototype.addListener =
5616     function(listener, filter) {};
5620  * @param {function(!Object): void} listener Listener function.
5621  */
5622 WebRequestOnErrorOccurredEvent.prototype.removeListener = function(listener) {};
5626  * @param {function(!Object): void} listener Listener function.
5627  */
5628 WebRequestOnErrorOccurredEvent.prototype.hasListener = function(listener) {};
5632  * @param {function(!Object): void} listener Listener function.
5633  */
5634 WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
5638  * @const
5639  * @see https://developer.chrome.com/extensions/webRequest.html
5640  */
5641 chrome.webRequest = {};
5645  * @param {function(): void=} opt_callback Callback function.
5646  */
5647 chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
5650 /** @type {!WebRequestEvent} */
5651 chrome.webRequest.onAuthRequired;
5654 /** @type {!WebRequestEvent} */
5655 chrome.webRequest.onBeforeRedirect;
5658 /** @type {!WebRequestEvent} */
5659 chrome.webRequest.onBeforeRequest;
5662 /** @type {!WebRequestEvent} */
5663 chrome.webRequest.onBeforeSendHeaders;
5666 /** @type {!WebRequestEvent} */
5667 chrome.webRequest.onCompleted;
5670 /** @type {!WebRequestOnErrorOccurredEvent} */
5671 chrome.webRequest.onErrorOccurred;
5674 /** @type {!WebRequestEvent} */
5675 chrome.webRequest.onHeadersReceived;
5678 /** @type {!WebRequestEvent} */
5679 chrome.webRequest.onResponseStarted;
5682 /** @type {!WebRequestEvent} */
5683 chrome.webRequest.onSendHeaders;
5686 // Classes
5691  * @see https://developer.chrome.com/extensions/management.html
5692  * @constructor
5693  */
5694 function ExtensionInfo() {}
5697 /** @type {string} */
5698 ExtensionInfo.prototype.id;
5701 /** @type {string} */
5702 ExtensionInfo.prototype.name;
5705 /** @type {string} */
5706 ExtensionInfo.prototype.shortName;
5709 /** @type {string} */
5710 ExtensionInfo.prototype.description;
5713 /** @type {string} */
5714 ExtensionInfo.prototype.version;
5717 /** @type {boolean} */
5718 ExtensionInfo.prototype.mayDisable;
5721 /** @type {boolean} */
5722 ExtensionInfo.prototype.enabled;
5725 /** @type {string|undefined} */
5726 ExtensionInfo.prototype.disabledReason;
5729 /** @type {boolean} */
5730 ExtensionInfo.prototype.isApp;
5733 /** @type {string} */
5734 ExtensionInfo.prototype.type;
5737 /** @type {string|undefined} */
5738 ExtensionInfo.prototype.appLaunchUrl;
5741 /** @type {string|undefined} */
5742 ExtensionInfo.prototype.homepageUrl;
5745 /** @type {string|undefined} */
5746 ExtensionInfo.prototype.updateUrl;
5749 /** @type {boolean} */
5750 ExtensionInfo.prototype.offlineEnabled;
5753 /** @type {string} */
5754 ExtensionInfo.prototype.optionsUrl;
5757 /** @type {!Array<!IconInfo>|undefined} */
5758 ExtensionInfo.prototype.icons;
5761 /** @type {!Array<string>} */
5762 ExtensionInfo.prototype.permissions;
5765 /** @type {!Array<string>} */
5766 ExtensionInfo.prototype.hostPermissions;
5769 /** @type {string} */
5770 ExtensionInfo.prototype.installType;
5773 /** @type {string|undefined} */
5774 ExtensionInfo.prototype.launchType;
5777 /** @type {!Array<string>|undefined} */
5778 ExtensionInfo.prototype.availableLaunchTypes;
5783  * @see https://developer.chrome.com/extensions/management.html
5784  * @constructor
5785  */
5786 function IconInfo() {}
5789 /** @type {number} */
5790 IconInfo.prototype.size;
5793 /** @type {string} */
5794 IconInfo.prototype.url;
5801  * @see https://developer.chrome.com/extensions/windows.html
5802  * @constructor
5803  */
5804 function ChromeWindow() {}
5807 /** @type {number} */
5808 ChromeWindow.prototype.id;
5811 /** @type {boolean} */
5812 ChromeWindow.prototype.focused;
5815 /** @type {number} */
5816 ChromeWindow.prototype.top;
5819 /** @type {number} */
5820 ChromeWindow.prototype.left;
5823 /** @type {number} */
5824 ChromeWindow.prototype.width;
5827 /** @type {number} */
5828 ChromeWindow.prototype.height;
5831 /** @type {Array<Tab>} */
5832 ChromeWindow.prototype.tabs;
5835 /** @type {boolean} */
5836 ChromeWindow.prototype.incognito;
5839 /** @type {string} */
5840 ChromeWindow.prototype.type;
5843 /** @type {string} */
5844 ChromeWindow.prototype.state;
5847 /** @type {boolean} */
5848 ChromeWindow.prototype.alwaysOnTop;
5853  * Event whose listeners take an ExtensionInfo parameter.
5854  * @constructor
5855  */
5856 function ChromeExtensionInfoEvent() {}
5859 /** @param {function(!ExtensionInfo): void} callback */
5860 ChromeExtensionInfoEvent.prototype.addListener = function(callback) {};
5863 /** @param {function(!ExtensionInfo): void} callback */
5864 ChromeExtensionInfoEvent.prototype.removeListener = function(callback) {};
5868  * @param {function(!ExtensionInfo): void} callback
5869  * @return {boolean}
5870  */
5871 ChromeExtensionInfoEvent.prototype.hasListener = function(callback) {};
5874 /** @return {boolean} */
5875 ChromeExtensionInfoEvent.prototype.hasListeners = function() {};
5880  * @see http://developer.chrome.com/extensions/pushMessaging.html
5881  * @const
5882  */
5883 chrome.pushMessaging = {};
5887  * @type {!chrome.pushMessaging.PushMessageEvent}
5888  */
5889 chrome.pushMessaging.onMessage;
5893  * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
5894  *     interactiveOrCallback Either a flag(optional), if set to true, user will
5895  *     be asked to log in if they are not already logged in, or, when he flag is
5896  *     not given, the callback.
5897  * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
5898  *     Callback.
5899  */
5900 chrome.pushMessaging.getChannelId =
5901     function(interactiveOrCallback, opt_callback) {};
5906  * Event whose listeners take a chrome.pushMessaging.Message parameter.
5907  * @constructor
5908  */
5909 chrome.pushMessaging.PushMessageEvent = function() {};
5913  * @param {function(!chrome.pushMessaging.Message): void} callback
5914  */
5915 chrome.pushMessaging.PushMessageEvent.prototype.addListener =
5916     function(callback) {};
5920  * @param {function(!chrome.pushMessaging.Message): void} callback
5921  */
5922 chrome.pushMessaging.PushMessageEvent.prototype.removeListener =
5923     function(callback) {};
5927  * @param {function(!chrome.pushMessaging.Message): void} callback
5928  * @return {boolean}
5929  */
5930 chrome.pushMessaging.PushMessageEvent.prototype.hasListener =
5931     function(callback) {};
5935  * @return {boolean}
5936  */
5937 chrome.pushMessaging.PushMessageEvent.prototype.hasListeners = function() {};
5943  * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
5944  * @constructor
5945  */
5946 function BookmarkTreeNode() {}
5949 /** @type {string} */
5950 BookmarkTreeNode.prototype.id;
5953 /** @type {string|undefined} */
5954 BookmarkTreeNode.prototype.parentId;
5957 /** @type {number|undefined} */
5958 BookmarkTreeNode.prototype.index;
5961 /** @type {string|undefined} */
5962 BookmarkTreeNode.prototype.url;
5965 /** @type {string} */
5966 BookmarkTreeNode.prototype.title;
5969 /** @type {number|undefined} */
5970 BookmarkTreeNode.prototype.dateAdded;
5973 /** @type {number|undefined} */
5974 BookmarkTreeNode.prototype.dateGroupModified;
5977 /** @type {string|undefined} */
5978 BookmarkTreeNode.prototype.unmodifiable;
5981 /** @type {!Array<!BookmarkTreeNode>|undefined} */
5982 BookmarkTreeNode.prototype.children;
5987  * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
5988  * @constructor
5989  */
5990 function Cookie() {}
5993 /** @type {string} */
5994 Cookie.prototype.name;
5997 /** @type {string} */
5998 Cookie.prototype.value;
6001 /** @type {string} */
6002 Cookie.prototype.domain;
6005 /** @type {boolean} */
6006 Cookie.prototype.hostOnly;
6009 /** @type {string} */
6010 Cookie.prototype.path;
6013 /** @type {boolean} */
6014 Cookie.prototype.secure;
6017 /** @type {boolean} */
6018 Cookie.prototype.httpOnly;
6021 /** @type {boolean} */
6022 Cookie.prototype.session;
6025 /** @type {number} */
6026 Cookie.prototype.expirationDate;
6029 /** @type {string} */
6030 Cookie.prototype.storeId;
6035  * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
6036  * @constructor
6037  */
6038 function CookieStore() {}
6041 /** @type {string} */
6042 CookieStore.prototype.id;
6045 /** @type {Array<number>} */
6046 CookieStore.prototype.tabIds;
6051  * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
6052  * @constructor
6053  */
6054 function OnClickData() {}
6057 /** @type {number} */
6058 OnClickData.prototype.menuItemId;
6061 /** @type {number} */
6062 OnClickData.prototype.parentMenuItemId;
6065 /** @type {string} */
6066 OnClickData.prototype.mediaType;
6069 /** @type {string} */
6070 OnClickData.prototype.linkUrl;
6073 /** @type {string} */
6074 OnClickData.prototype.srcUrl;
6077 /** @type {string} */
6078 OnClickData.prototype.pageUrl;
6081 /** @type {string} */
6082 OnClickData.prototype.frameUrl;
6085 /** @type {string} */
6086 OnClickData.prototype.selectionText;
6089 /** @type {string} */
6090 OnClickData.prototype.editable;
6095  * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
6096  * @constructor
6097  */
6098 function Debuggee() {}
6101 /** @type {number} */
6102 Debuggee.prototype.tabId;
6107  * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
6108  * @constructor
6109  */
6110 function ResourceIdentifier() {}
6113 /** @type {string} */
6114 ResourceIdentifier.prototype.id;
6117 /** @type {string} */
6118 ResourceIdentifier.prototype.description;
6123  * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
6124  * @constructor
6125  */
6126 function ContentSetting() {}
6130  * @param {!Object<string,string>} details Settings details.
6131  * @param {function(): void=} opt_callback Callback function.
6132  */
6133 ContentSetting.prototype.clear = function(details, opt_callback) {};
6137  * @param {!Object<string,(string|boolean|ResourceIdentifier)>} details
6138  *     Settings details.
6139  * @param {function(): void} callback Callback function.
6140  */
6141 ContentSetting.prototype.get = function(details, callback) {};
6145  * @param {function(): void} callback Callback function.
6146  */
6147 ContentSetting.prototype.getResourceIdentifiers = function(callback) {};
6151  * @param {!Object<string,(string|ResourceIdentifier)>} details
6152  *     Settings details.
6153  * @param {function(): void=} opt_callback Callback function.
6154  */
6155 ContentSetting.prototype.set = function(details, opt_callback) {};
6160  * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
6161  * @constructor
6162  */
6163 function HistoryItem() {}
6166 /** @type {string} */
6167 HistoryItem.prototype.id;
6170 /** @type {string} */
6171 HistoryItem.prototype.url;
6174 /** @type {string} */
6175 HistoryItem.prototype.title;
6178 /** @type {number} */
6179 HistoryItem.prototype.lastVisitTime;
6182 /** @type {number} */
6183 HistoryItem.prototype.visitCount;
6186 /** @type {number} */
6187 HistoryItem.prototype.typedCount;
6192  * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
6193  * @constructor
6194  */
6195 function VisitItem() {}
6198 /** @type {string} */
6199 VisitItem.prototype.id;
6202 /** @type {string} */
6203 VisitItem.prototype.visitId;
6206 /** @type {number} */
6207 VisitItem.prototype.visitTime;
6210 /** @type {string} */
6211 VisitItem.prototype.referringVisitId;
6214 /** @type {string} */
6215 VisitItem.prototype.transition;
6220  * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
6221  * @constructor
6222  */
6223 function FileHandlerExecuteEventDetails() {}
6226 /** @type {!Array<!FileEntry>} */
6227 FileHandlerExecuteEventDetails.prototype.entries;
6230 /** @type {number|undefined} */
6231 FileHandlerExecuteEventDetails.prototype.tab_id;
6236  * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
6237  * @constructor
6238  */
6239 function ChromeKeyboardEvent() {}
6242 /** @type {string} */
6243 ChromeKeyboardEvent.prototype.type;
6246 /** @type {string} */
6247 ChromeKeyboardEvent.prototype.requestId;
6250 /** @type {string|undefined} */
6251 ChromeKeyboardEvent.prototype.extensionId;
6254 /** @type {string} */
6255 ChromeKeyboardEvent.prototype.key;
6258 /** @type {string} */
6259 ChromeKeyboardEvent.prototype.code;
6262 /** @type {number|undefined} */
6263 ChromeKeyboardEvent.prototype.keyCode;
6266 /** @type {boolean|undefined} */
6267 ChromeKeyboardEvent.prototype.altKey;
6270 /** @type {boolean|undefined} */
6271 ChromeKeyboardEvent.prototype.ctrlKey;
6274 /** @type {boolean|undefined} */
6275 ChromeKeyboardEvent.prototype.shiftKey;
6278 /** @type {boolean|undefined} */
6279 ChromeKeyboardEvent.prototype.capsLock;
6284  * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
6285  * @constructor
6286  */
6287 function InputContext() {}
6290 /** @type {number} */
6291 InputContext.prototype.contextID;
6294 /** @type {string} */
6295 InputContext.prototype.type;
6300  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
6301  * @constructor
6302  */
6303 function ProxyServer() {}
6306 /** @type {string} */
6307 ProxyServer.prototype.scheme;
6310 /** @type {string} */
6311 ProxyServer.prototype.host;
6314 /** @type {number} */
6315 ProxyServer.prototype.port;
6320  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
6321  * @constructor
6322  */
6323 function ProxyRules() {}
6326 /** @type {ProxyServer} */
6327 ProxyRules.prototype.singleProxy;
6330 /** @type {ProxyServer} */
6331 ProxyRules.prototype.proxyForHttp;
6334 /** @type {ProxyServer} */
6335 ProxyRules.prototype.proxyForHttps;
6338 /** @type {ProxyServer} */
6339 ProxyRules.prototype.proxyForFtp;
6342 /** @type {ProxyServer} */
6343 ProxyRules.prototype.fallbackProxy;
6346 /** @type {!Array<string>} */
6347 ProxyRules.prototype.bypassList;
6352  * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
6353  * @constructor
6354  */
6355 function PacScript() {}
6358 /** @type {string} */
6359 PacScript.prototype.url;
6362 /** @type {string} */
6363 PacScript.prototype.data;
6366 /** @type {boolean} */
6367 PacScript.prototype.mandatory;
6372  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
6373  * @constructor
6374  */
6375 function ProxyConfig() {}
6378 /** @type {ProxyRules} */
6379 ProxyConfig.prototype.rules;
6382 /** @type {PacScript} */
6383 ProxyConfig.prototype.pacScript;
6386 /** @type {string} */
6387 ProxyConfig.prototype.mode;
6392  * The event listener for Storage receives an Object mapping each
6393  * key that changed to its corresponding StorageChange for that item.
6395  * @see https://developer.chrome.com/extensions/storage.html
6396  * @constructor
6397  */
6398 function StorageChangeEvent() {}
6402  * @param {function(!Object<string, !StorageChange>, string)} callback
6403  *    Listener will receive an object that maps each key to its StorageChange,
6404  *    and the namespace ("sync" or "local") of the storage area the changes
6405  *    are for.
6406  */
6407 StorageChangeEvent.prototype.addListener = function(callback) {};
6410 /** @param {function(!Object<string, !StorageChange>, string)} callback */
6411 StorageChangeEvent.prototype.removeListener = function(callback) {};
6414 /** @param {function(!Object<string, !StorageChange>, string)} callback */
6415 StorageChangeEvent.prototype.hasListener = function(callback) {};
6418 /** @param {function(!Object<string, !StorageChange>, string)} callback */
6419 StorageChangeEvent.prototype.hasListeners = function(callback) {};
6424  * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
6425  * @constructor
6426  */
6427 function StorageChange() {}
6430 /** @type {?} */
6431 StorageChange.prototype.oldValue;
6434 /** @type {?} */
6435 StorageChange.prototype.newValue;
6440  * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
6441  * @constructor
6442  */
6443 function StorageArea() {}
6447  * Removes all items from storage.
6448  * @param {function(): void=} opt_callback Callback function.
6449  */
6450 StorageArea.prototype.clear = function(opt_callback) {};
6454  * @param {(string|!Array<string>|!Object|null)=} opt_keys
6455  *    A single key to get, list of keys to get, or a dictionary
6456  *    specifying default values (see description of the
6457  *    object). An empty list or object will return an empty
6458  *    result object. Pass in null to get the entire contents of storage.
6459  * @param {function(Object)=} opt_callback Callback with storage items, or null
6460  *    on failure.
6461  */
6462 StorageArea.prototype.get = function(opt_keys, opt_callback) {};
6466  * @param {(string|!Array<string>)} keys
6467  *    A single key or a list of keys for items to remove.
6468  * @param {function()=} opt_callback Callback.
6469  */
6470 StorageArea.prototype.remove = function(keys, opt_callback) {};
6474  * @param {!Object<string>} keys
6475  *    Object specifying items to augment storage
6476  *    with. Values that cannot be serialized (functions, etc) will be ignored.
6477  * @param {function()=} opt_callback Callback.
6478  */
6479 StorageArea.prototype.set = function(keys, opt_callback) { };
6483  * @param {(string|!Array<string>|null)=} opt_keys
6484  *    A single key or list of keys to get the total usage for. An empty list
6485  *    will return 0. Pass in null to get the total usage of all of storage.
6486  * @param {function(number)=} opt_callback
6487  *    Callback with the amount of space being used by storage.
6488  */
6489 StorageArea.prototype.getBytesInUse = function(opt_keys, opt_callback) { };
6494  * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
6495  * @constructor
6496  */
6497 function ChromeSetting() {}
6501  * @param {Object} details Object with a 'scope' (string) key.
6502  * @param {function(): void=} opt_callback Callback function.
6503  */
6504 ChromeSetting.prototype.clear = function(details, opt_callback) {};
6508  * @param {Object} details Object with an 'incognito' (boolean) key.
6509  * @param {function(Object<string, *>): void} callback Callback function.
6510  */
6511 ChromeSetting.prototype.get = function(details, callback) {};
6515  * @param {Object} details Object with a 'value' (*) key and an optional
6516  *     'scope' (string) key.
6517  * @param {function(): void=} opt_callback Callback function.
6518  */
6519 ChromeSetting.prototype.set = function(details, opt_callback) {};
6522 /** @type {!ChromeObjectEvent} */
6523 ChromeSetting.prototype.onChange;
6528  * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
6529  * @constructor
6530  */
6531 function RequestFilter() {}
6534 /** @type {!Array<string>} */
6535 RequestFilter.prototype.urls;
6538 /** @type {!Array<string>} */
6539 RequestFilter.prototype.types;
6542 /** @type {number} */
6543 RequestFilter.prototype.tabId;
6546 /** @type {number} */
6547 RequestFilter.prototype.windowId;
6552  * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6553  * @constructor
6554  */
6555 function HttpHeader() {}
6558 /** @type {string} */
6559 HttpHeader.prototype.name;
6562 /** @type {string} */
6563 HttpHeader.prototype.value;
6566 /** @type {!Array<number>} */
6567 HttpHeader.prototype.binaryValue;
6571  * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6572  * @typedef {Array<!HttpHeader>}
6573  * @private
6574  */
6575 var HttpHeaders_;
6580  * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
6581  * @constructor
6582  */
6583 function BlockingResponse() {}
6586 /** @type {boolean} */
6587 BlockingResponse.prototype.cancel;
6590 /** @type {string} */
6591 BlockingResponse.prototype.redirectUrl;
6594 /** @type {!HttpHeaders_} */
6595 BlockingResponse.prototype.requestHeaders;
6598 /** @type {!HttpHeaders_} */
6599 BlockingResponse.prototype.responseHeaders;
6602 /** @type {Object<string,string>} */
6603 BlockingResponse.prototype.authCredentials;
6608  * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
6609  * @constructor
6610  */
6611 chrome.pushMessaging.Message = function() {};
6615  * @type {number}
6616  */
6617 chrome.pushMessaging.Message.prototype.subchannelId;
6621  * @type {string}
6622  */
6623 chrome.pushMessaging.Message.prototype.payload;
6628  * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
6629  * @constructor
6630  */
6631 chrome.pushMessaging.ChannelIdResult = function() {};
6635  * @type {string}
6636  */
6637 chrome.pushMessaging.ChannelIdResult.prototype.channelId;
6641  * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
6642  * defined in {@code javascript/externs/fileapi.js}.
6643  * @const
6644  * @see http://developer.chrome.com/apps/fileSystem.html
6645  */
6646 chrome.fileSystem = {};
6650  * @param {!Entry} entry The entry to get the display path for. The entry can
6651  *     originally be obtained through
6652  *     {@code chrome.fileSystem.chooseEntry} or
6653  *     {@code chrome.fileSystem.restoreEntry}.
6654  * @param {function(string)} callback A success callback.
6655  * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
6656  */
6657 chrome.fileSystem.getDisplayPath = function(entry, callback) {};
6661  * @param {!Entry} entry The entry to get a writable entry for.
6662  * @param {function(!Entry)} callback A success callback.
6663  * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
6664  */
6665 chrome.fileSystem.getWritableEntry = function(entry, callback) {};
6669  * @param {!Entry} entry The entry to query writability.
6670  * @param {function(boolean)} callback A success callback.
6671  * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
6672  */
6673 chrome.fileSystem.isWritableEntry = function(entry, callback) {};
6677  * @typedef {{
6678  *   description: (string|undefined),
6679  *   mimeTypes: (!Array<string>|undefined),
6680  *   extensions: (!Array<string>|undefined)
6681  * }}
6682  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6683  */
6684 chrome.fileSystem.AcceptsOption;
6688  * @typedef {{
6689  *   type: (string|undefined),
6690  *   suggestedName: (string|undefined),
6691  *   accepts: (!Array<!chrome.fileSystem.AcceptsOption>|undefined),
6692  *   acceptsAllTypes: (boolean|undefined),
6693  *   acceptsMultiple: (boolean|undefined)
6694  * }}
6695  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6696  */
6697 chrome.fileSystem.ChooseEntryOptions;
6701  * @typedef {?{
6702  *   volumeId: string,
6703  *   writable: (boolean|undefined)
6704  * }}
6705  * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6706  */
6707 chrome.fileSystem.RequestFileSystemOptions;
6711  * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6712  * @constructor
6713  */
6714 chrome.fileSystem.Volume = function() {};
6717 /** @type {string} */
6718 chrome.fileSystem.Volume.prototype.volumeId;
6721 /** @type {boolean} */
6722 chrome.fileSystem.Volume.prototype.writable;
6726  * @param {!chrome.fileSystem.ChooseEntryOptions|
6727  *     function(Entry=, !Array<!FileEntry>=)} optionsOrCallback The
6728  *     options for the file prompt or the callback.
6729  * @param {function(Entry=, !Array<!FileEntry>=)=} opt_callback A success
6730  *     callback, if arg1 is options.
6731  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6732  */
6733 chrome.fileSystem.chooseEntry = function(optionsOrCallback, opt_callback) {};
6737  * @param {string} id The ID of the file entry to restore.
6738  * @param {function(!Entry)} callback A success callback.
6739  * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
6740  */
6741 chrome.fileSystem.restoreEntry = function(id, callback) {};
6745  * @param {string} id The ID of the file entry to query restorability.
6746  * @param {function(boolean)} callback A success callback.
6747  * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
6748  */
6749 chrome.fileSystem.isRestorable = function(id, callback) {};
6753  * @param {!Entry} entry The entry to regain access to.
6754  * @return {string} The ID that can be passed to restoreEntry to regain access
6755  *     to the given file entry.
6756  * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
6757  */
6758 chrome.fileSystem.retainEntry = function(entry) {};
6762  * @param {!chrome.fileSystem.RequestFileSystemOptions} options Options for the
6763  *     request.
6764  * @param {function(!FileSystem=)} callback A completion callback with the file
6765  *     system in case of a success. Otherwise the error is passed as
6766  *     chrome.runtime.lastError.
6767  * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6768  */
6769 chrome.fileSystem.requestFileSystem = function(options, callback) {};
6773  * @param {function(!Array<!chrome.fileSystem.Volume>=)} callback A completion
6774  *     callback with the file system list in case of a success. Otherwise the
6775  *     error is passed as chrome.runtime.lastError.
6776  * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6777  */
6778 chrome.fileSystem.getVolumeList = function(callback) {};
6782  * @const
6783  * @see https://developer.chrome.com/apps/syncFileSystem
6784  */
6785 chrome.syncFileSystem = {};
6789  * Returns a syncable filesystem backed by Google Drive. The returned
6790  * DOMFileSystem instance can be operated on in the same way as
6791  * the Temporary and Persistant file systems (see
6792  * http://www.w3.org/TR/file-system-api/), except that the filesystem
6793  * object returned for Sync FileSystem does NOT support directory
6794  * operations (yet). You can get a list of file entries by reading
6795  * the root directory (by creating a new DirectoryReader),
6796  * but cannot create a new directory in it.
6798  * <p>Calling this multiple times from the same app will return the same
6799  * handle to the same file system.
6801  * <p>Note this call can fail. For example, if the user is not signed in
6802  * to Chrome or if there is no network operation. To handle these errors
6803  * it is important chrome.runtime.lastError is checked in the callback.
6805  * @param {function(!FileSystem)} callback A callback type for
6806  *     requestFileSystem.
6807  * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
6808  */
6809 chrome.syncFileSystem.requestFileSystem = function(callback) {};
6813  * Sets the default conflict resolution policy for the 'syncable' file
6814  * storage for the app. By default it is set to 'last_write_win'.
6815  * When conflict resolution policy is set to 'last_write_win' conflicts
6816  * for existing files are automatically resolved next time the file is updated.
6817  * {@code callback} can be optionally given to know if the request has
6818  * succeeded or not.
6820  * @param {string} policy Any of 'last_write_win' or 'manual'
6821  * @param {function()=} opt_callback
6823  * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
6824  */
6825 chrome.syncFileSystem.setConflictResolutionPolicy =
6826     function(policy, opt_callback) {};
6830  * Gets the current conflict resolution policy.
6832  * @param {function(string)} callback Accepting any of 'last_write_win'
6833  *     or 'manual'.
6834  * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
6835  */
6836 chrome.syncFileSystem.getConflictResolutionPolicy = function(callback) {};
6840  * Returns the current usage and quota in bytes for the 'syncable' file
6841  * storage for the app.
6843  * @param {!FileSystem} fileSystem
6844  * @param {function(!Object)} callback Taking an object substantially similar
6845  *     to {@code {'usageBytes': number, quotaBytes: number}}.
6846  * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
6847  */
6848 chrome.syncFileSystem.getUsageAndQuota = function(fileSystem, callback) {};
6852  * Returns the FileStatus for the given fileEntry. The status value can be
6853  * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
6854  * happens when the service's conflict resolution policy is set to 'manual'.
6856  * @param {!Entry} fileEntry
6857  * @param {function(string)} callback Called with any of 'synced', 'pending'
6858  *     or 'conflicting'.
6860  * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
6861  */
6862 chrome.syncFileSystem.getFileStatus = function(fileEntry, callback) {};
6866  * Returns each FileStatus for the given fileEntry array. Typically called
6867  * with the result from dirReader.readEntries().
6869  * @param {!Array<!FileEntry>} fileEntries
6870  * @param {function(!Array<!Object>)} callback Each object will look like:
6871  *     {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
6873  * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
6874  */
6875 chrome.syncFileSystem.getFileStatuses = function(fileEntries, callback) {};
6879  * Since Chrome 31.
6881  * <p>Returns the current sync backend status.
6883  * @param {function(string)} callback Arg is any of 'initializing', 'running',
6884  *     'authentication_required', 'temporary_unavailable', or 'disabled'.
6886  * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
6887  */
6888 chrome.syncFileSystem.getServiceStatus = function(callback) {};
6892  * Fired when an error or other status change has happened in the sync
6893  * backend (for example, when the sync is temporarily disabled due
6894  * to network or authentication error).
6896  * @type {!ChromeObjectEvent}
6898  * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
6899  */
6900 chrome.syncFileSystem.onServiceStatusChanged;
6904  * Fired when a file has been updated by the background sync service.
6906  * @type {!ChromeObjectEvent}
6908  * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
6909  */
6910 chrome.syncFileSystem.onFileStatusChanged;
6914  * @const
6915  * @see http://developer.chrome.com/extensions/alarms.html
6916  */
6917 chrome.alarms = {};
6921  * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
6922  * is fired. If there is another alarm with the same name (or no name if none is
6923  * specified), it will be cancelled and replaced by this alarm.
6924  * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
6925  *     the name to identify this alarm or the info used to create the alarm. If
6926  *     no name is passed, the empty string is used to identify the alarm.
6927  * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
6928  *     as arg1, the info used to create the alarm.
6929  * @see http://developer.chrome.com/extensions/alarms.html#method-create
6930  */
6931 chrome.alarms.create = function(nameOrAlarmCreateInfo, opt_alarmInfo) {};
6935  * Retrieves details about the specified alarm.
6936  * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
6937  *     of the alarm to get or the callback to invoke with the alarm. If no name
6938  *     is passed, the empty string is used to get the alarm.
6939  * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
6940  *     as arg1, the callback to invoke with the alarm.
6941  * @see http://developer.chrome.com/extensions/alarms.html#method-get
6942  */
6943 chrome.alarms.get = function(nameOrCallback, opt_callback) {};
6947  * Gets an array of all the alarms.
6948  * @param {function(!Array<!chrome.alarms.Alarm>)} callback
6949  * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
6950  */
6951 chrome.alarms.getAll = function(callback) {};
6955  * Clears the alarm with the given name.
6956  * @param {string=} opt_name
6957  * @param {function(boolean)=} opt_callback A callback that will be called with
6958  *     a boolean for whether the alarm was cleared.
6959  * @see http://developer.chrome.com/extensions/alarms.html#method-clear
6960  */
6961 chrome.alarms.clear = function(opt_name, opt_callback) {};
6965  * Clears all alarms.
6966  * @param {function(boolean)=} opt_callback A callback that will be called with
6967  *     a boolean for whether the alarms were cleared.
6968  * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
6969  */
6970 chrome.alarms.clearAll = function(opt_callback) {};
6974  * Fired when an alarm has elapsed. Useful for event pages.
6975  * @type {!chrome.alarms.AlarmEvent}
6976  * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
6977  */
6978 chrome.alarms.onAlarm;
6983  * @constructor
6984  */
6985 chrome.alarms.AlarmEvent = function() {};
6989  * @param {function(!chrome.alarms.Alarm): void} callback
6990  */
6991 chrome.alarms.AlarmEvent.prototype.addListener = function(callback) {};
6995  * @param {function(!chrome.alarms.Alarm): void} callback
6996  */
6997 chrome.alarms.AlarmEvent.prototype.removeListener = function(callback) {};
7001  * @param {function(!chrome.alarms.Alarm): void} callback
7002  * @return {boolean}
7003  */
7004 chrome.alarms.AlarmEvent.prototype.hasListener = function(callback) {};
7008  * @return {boolean}
7009  */
7010 chrome.alarms.AlarmEvent.prototype.hasListeners = function() {};
7015  * @interface
7016  * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
7017  */
7018 chrome.alarms.Alarm = function() {};
7022  * Name of this alarm.
7023  * @type {string}
7024  */
7025 chrome.alarms.Alarm.prototype.name;
7029  * Time at which this alarm was scheduled to fire, in milliseconds past the
7030  * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
7031  * delayed an arbitrary amount beyond this.
7032  * @type {number}
7033  */
7034 chrome.alarms.Alarm.prototype.scheduledTime;
7038  * If not null, the alarm is a repeating alarm and will fire again in
7039  * periodInMinutes minutes.
7040  * @type {?number}
7041  */
7042 chrome.alarms.Alarm.prototype.periodInMinutes;
7046  * @typedef {{
7047  *   when: (number|undefined),
7048  *   delayInMinutes: (number|undefined),
7049  *   periodInMinutes: (number|undefined)
7050  * }}
7051  * @see http://developer.chrome.com/extensions/alarms.html#method-create
7052  */
7053 chrome.alarms.AlarmCreateInfo;
7057  * @see https://developer.chrome.com/apps/hid
7058  * @const
7059  */
7060 chrome.hid = {};
7064  * @typedef {?{
7065  *   vendorId: number,
7066  *   productId: number
7067  * }}
7068  * @see https://developer.chrome.com/apps/hid#method-getDevices
7069  */
7070 chrome.hid.HidGetDevicesOptions;
7074  * @typedef {?{
7075  *   usagePage: number,
7076  *   usage: number,
7077  *   reportIds: !Array<number>
7078  * }}
7079 * @see https://developer.chrome.com/apps/hid#method-getDevices
7081 chrome.hid.HidDeviceUsage;
7085  * @typedef {?{
7086  *   deviceId: number,
7087  *   vendorId: number,
7088  *   productId: number,
7089  *   collections: !Array<!chrome.hid.HidDeviceUsage>,
7090  *   maxInputReportSize: number,
7091  *   maxOutputReportSize: number,
7092  *   maxFeatureReportSize: number
7093  * }}
7094 * @see https://developer.chrome.com/apps/hid#method-getDevices
7096 chrome.hid.HidDeviceInfo;
7100  * @typedef {?{
7101  *   connectionId: number
7102  * }}
7103  * @see https://developer.chrome.com/apps/hid#method-connect
7104  */
7105 chrome.hid.HidConnectInfo;
7109  * @see https://developer.chrome.com/apps/hid#method-getDevices
7110  * Enumerates all the connected HID devices specified by the
7111  * vendorId/productId/interfaceId tuple.
7112  * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
7113  *     for on target devices.
7114  * @param {function(!Array<!Object>)} callback Invoked with a list of
7115  *     |HidDeviceInfo|s on complete.
7116  */
7117 chrome.hid.getDevices = function(options, callback) {};
7121  * @see https://developer.chrome.com/apps/hid#method-connect
7122  * Opens a connection to a HID device for communication.
7123  * @param {number} deviceId The ID of the device to open.
7124  * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
7125  *     connection succeeds, or undefined if it fails.
7126  */
7127 chrome.hid.connect = function(deviceId, callback) {};
7131  * @see https://developer.chrome.com/apps/hid#method-disconnect
7132  * Disconnects from a device.
7133  * @param {number} connectionId The connection to close.
7134  * @param {function()=} opt_callback The callback to invoke once the connection
7135  *     is closed.
7136  */
7137 chrome.hid.disconnect = function(connectionId, opt_callback) {};
7141  * @see https://developer.chrome.com/apps/hid#method-receive
7142  * Receives an input report from an HID device.
7143  * @param {number} connectionId The connection from which to receive the report.
7144  * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
7145  *     the received report.
7146  */
7147 chrome.hid.receive = function(connectionId, callback) {};
7151  * @see https://developer.chrome.com/apps/hid#method-send
7152  * Sends an output report to an HID device.
7153  * @param {number} connectionId The connection to which to send the report.
7154  * @param {number} reportId The report ID to use, or 0 if none.
7155  * @param {!ArrayBuffer} data The report data.
7156  * @param {function()} callback The callback to invoke once the write is
7157  *     finished.
7158  */
7159 chrome.hid.send = function(connectionId, reportId, data, callback) {};
7163  * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
7164  * Receives a feature report from the device.
7165  * @param {number} connectionId The connection from which to read the feature
7166  *     report.
7167  * @param {number} reportId The report ID to use, or 0 if none.
7168  * @param {number} size The size of the feature report to receive.
7169  * @param {function(!ArrayBuffer)} callback The callback to invoke with the
7170  *     received report.
7171  */
7172 chrome.hid.receiveFeatureReport =
7173     function(connectionId, reportId, size, callback) {};
7177  * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
7178  * Sends a feature report to the device.
7179  * @param {number} connectionId The connection to which to send the feature
7180  *     report.
7181  * @param {number} reportId The report ID to use, or 0 if none.
7182  * @param {!ArrayBuffer} data The report data.
7183  * @param {function()} callback The callback to invoke once the write is
7184  *     finished.
7185  */
7186 chrome.hid.sendFeatureReport =
7187     function(connectionId, reportId, data, callback) {};
7191  * @see http://developer.chrome.com/extensions/notifications.html
7192  * @const
7193  */
7194 chrome.notifications = {};
7198  * @typedef {{
7199  *   title: string,
7200  *   iconUrl: (string|undefined)
7201  * }}
7202  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7203  */
7204 chrome.notifications.NotificationButton;
7208  * @typedef {{
7209  *   title: string,
7210  *   message: string
7211  * }}
7212  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7213  */
7214 chrome.notifications.NotificationItem;
7218  * @typedef {{
7219  *   type: (string|undefined),
7220  *   iconUrl: (string|undefined),
7221  *   title: (string|undefined),
7222  *   message: (string|undefined),
7223  *   contextMessage: (string|undefined),
7224  *   priority: (number|undefined),
7225  *   eventTime: (number|undefined),
7226  *   buttons: (!Array<!chrome.notifications.NotificationButton>|undefined),
7227  *   imageUrl: (string|undefined),
7228  *   items: (!Array<!chrome.notifications.NotificationItem>|undefined),
7229  *   progress: (number|undefined),
7230  *   isClickable: (boolean|undefined)
7231  * }}
7232  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7233  */
7234 chrome.notifications.NotificationOptions;
7238  * @typedef {function(boolean): void}
7239  * @see http://developer.chrome.com/extensions/notifications.html#method-update
7240  * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7241  */
7242 chrome.notifications.BooleanCallback;
7246  * @typedef {function(!Object): void}
7247  * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7248  */
7249 chrome.notifications.ObjectCallback;
7253  * @typedef {function(string, boolean): void}
7254  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7255  */
7256 chrome.notifications.ClosedCallback;
7260  * @typedef {function(string, number): void}
7261  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7262  */
7263 chrome.notifications.ButtonCallback;
7267  * @param {string|!chrome.notifications.NotificationOptions}
7268  *     notificationIdOrOptions
7269  * @param {(!chrome.notifications.NotificationOptions|function(string): void)=}
7270  *     opt_optionsOrCallback
7271  * @param {(function(string): void)=} opt_callback
7272  * @see http://developer.chrome.com/extensions/notifications.html#method-create
7273  */
7274 chrome.notifications.create = function(notificationIdOrOptions,
7275     opt_optionsOrCallback, opt_callback) {};
7279  * @param {string} notificationId
7280  * @param {!chrome.notifications.NotificationOptions} options
7281  * @param {chrome.notifications.BooleanCallback=} opt_callback
7282  * @see http://developer.chrome.com/extensions/notifications.html#method-update
7283  */
7284 chrome.notifications.update =
7285     function(notificationId, options, opt_callback) {};
7289  * @param {string} notificationId
7290  * @param {!chrome.notifications.BooleanCallback=} opt_callback
7291  * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7292  */
7293 chrome.notifications.clear = function(notificationId, opt_callback) {};
7297  * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7298  * @param {!chrome.notifications.ObjectCallback} callback
7299  */
7300 chrome.notifications.getAll = function(callback) {};
7304  * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
7305  * @param {function(string): void} callback takes 'granted' or 'denied'
7306  */
7307 chrome.notifications.getPermissionLevel = function(callback) {};
7311  * @type {!chrome.notifications.ClosedEvent}
7312  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7313  */
7314 chrome.notifications.onClosed;
7318  * The user clicked a non-button area of the notification. Callback receives a
7319  * notificationId.
7320  * @type {!ChromeStringEvent}
7321  * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
7322  */
7323 chrome.notifications.onClicked;
7327  * @type {!chrome.notifications.ButtonClickedEvent}
7328  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7329  */
7330 chrome.notifications.onButtonClicked;
7334  * Indicates permission level change. Callback should expect 'granted' or
7335  * 'denied'.
7336  * @type {!ChromeStringEvent}
7337  * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
7338  */
7339 chrome.notifications.onPermissionLevelChanged;
7343  * @type {!ChromeEvent}
7344  * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
7345  */
7346 chrome.notifications.onShowSettings;
7351  * @interface
7352  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7353  */
7354 chrome.notifications.ClosedEvent = function() {};
7358  * @param {!chrome.notifications.ClosedCallback} callback
7359  */
7360 chrome.notifications.ClosedEvent.prototype.addListener = function(callback) {};
7364  * @param {!chrome.notifications.ClosedCallback} callback
7365  */
7366 chrome.notifications.ClosedEvent.prototype.removeListener =
7367     function(callback) {};
7371  * @param {!chrome.notifications.ClosedCallback} callback
7372  * @return {boolean}
7373  */
7374 chrome.notifications.ClosedEvent.prototype.hasListener = function(callback) {};
7378  * @return {boolean}
7379  */
7380 chrome.notifications.ClosedEvent.prototype.hasListeners = function() {};
7385  * @interface
7386  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7387  */
7388 chrome.notifications.ButtonClickedEvent = function() {};
7392  * @param {!chrome.notifications.ButtonCallback} callback
7393  */
7394 chrome.notifications.ButtonClickedEvent.prototype.addListener =
7395     function(callback) {};
7399  * @param {!chrome.notifications.ButtonCallback} callback
7400  */
7401 chrome.notifications.ButtonClickedEvent.prototype.removeListener =
7402     function(callback) {};
7406  * @param {!chrome.notifications.ButtonCallback} callback
7407  * @return {boolean}
7408  */
7409 chrome.notifications.ButtonClickedEvent.prototype.hasListener =
7410     function(callback) {};
7414  * @return {boolean}
7415  */
7416 chrome.notifications.ButtonClickedEvent.prototype.hasListeners = function() {};
7420  * @const
7421  * @see http://developer.chrome.com/apps/system_storage.html
7422  */
7423 chrome.system.storage = {};
7427 /** @constructor */
7428 chrome.system.storage.StorageUnitInfo = function() {};
7431 /** @type {string} */
7432 chrome.system.storage.StorageUnitInfo.id;
7435 /** @type {string} */
7436 chrome.system.storage.StorageUnitInfo.name;
7439 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
7440 chrome.system.storage.StorageUnitInfo.type;
7443 /** @type {number} */
7444 chrome.system.storage.StorageUnitInfo.capacity;
7449  * Event whose listeners take a StorageUnitInfoEvent parameter.
7450  * @constructor
7451  */
7452 chrome.system.storage.StorageUnitInfoEvent = function() {};
7455 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7456 chrome.system.storage.StorageUnitInfoEvent.prototype.addListener =
7457     function(callback) {};
7460 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7461 chrome.system.storage.StorageUnitInfoEvent.prototype.removeListener =
7462     function(callback) {};
7466  * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
7467  * @return {boolean}
7468  */
7469 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListener =
7470     function(callback) {};
7473 /** @return {boolean} */
7474 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListeners =
7475     function() {};
7478 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
7479 chrome.system.storage.onAttached;
7482 /** @type {!ChromeStringEvent} */
7483 chrome.system.storage.onDetached;
7487  * Gets the storage information from the system.
7488  * @param {function(!Array<!chrome.system.storage.StorageUnitInfo>)} callback
7489  */
7490 chrome.system.storage.getInfo = function(callback) {};
7494  * Ejects a removable storage device.
7495  * @param {string} id The transient device ID from StorageUnitInfo.
7496  * @param {function(string)} callback Callback function where the value
7497  *     is any of: "success", "in_use", "no_such_device", "failure"
7498  */
7499 chrome.system.storage.ejectDevice = function(id, callback) {};
7503  * Gets the available capacity of a specified storage device.
7504  * @param {string} id The transient device ID from StorageUnitInfo.
7505  * @param {function(Object<string, number>)} callback A callback function that
7506  *     accepts an object with {@code id} and {@code availableCapacity} fields.
7507  */
7508 chrome.system.storage.getAvailableCapacity = function(id, callback) {};
7512  * @see http://developer.chrome.com/apps/usb.html
7513  * @const
7514  */
7515 chrome.usb = {};
7519 /** @constructor */
7520 chrome.usb.Device = function Device() {};
7523 /** @type {number} */
7524 chrome.usb.Device.prototype.device;
7527 /** @type {number} */
7528 chrome.usb.Device.prototype.vendorId;
7531 /** @type {number} */
7532 chrome.usb.Device.prototype.productId;
7536 /** @constructor */
7537 chrome.usb.ConnectionHandle = function ConnectionHandle() {};
7540 /** @type {number} */
7541 chrome.usb.ConnectionHandle.prototype.handle;
7544 /** @type {number} */
7545 chrome.usb.ConnectionHandle.prototype.vendorId;
7548 /** @type {number} */
7549 chrome.usb.ConnectionHandle.prototype.productId;
7553  * @typedef {?{
7554  *   direction: string,
7555  *   endpoint: number,
7556  *   length: (number|undefined),
7557  *   data: (!ArrayBuffer|undefined)
7558  * }}
7559  */
7560 chrome.usb.GenericTransferInfo;
7564  * @typedef {?{
7565  *   direction: string,
7566  *   recipient: string,
7567  *   requestType: string,
7568  *   request: number,
7569  *   value: number,
7570  *   index: number,
7571  *   length: (number|undefined),
7572  *   data: (!ArrayBuffer|undefined)
7573  * }}
7574  */
7575 chrome.usb.ControlTransferInfo;
7579 /** @constructor */
7580 chrome.usb.TransferResultInfo = function() {};
7583 /** @type {number|undefined} */
7584 chrome.usb.TransferResultInfo.prototype.resultCode;
7587 /** @type {!ArrayBuffer|undefined} */
7588 chrome.usb.TransferResultInfo.prototype.data;
7592  * @typedef {?{
7593  *   deviceId: number,
7594  *   productId: number,
7595  *   interfaceId: (number|undefined)
7596  * }}
7597  */
7598 chrome.usb.FindDevicesOptions;
7602  * @see http://developer.chrome.com/apps/usb.html#method-getDevices
7603  * @param {!Object} options The properties to search for on target devices.
7604  * @param {function(!Array<!chrome.usb.Device>)} callback Invoked with a list
7605  *     of |Device|s on complete.
7606  */
7607 chrome.usb.getDevices = function(options, callback) {};
7611  * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
7612  * @param {!chrome.usb.Device} device The device to request access to.
7613  * @param {number} interfaceId
7614  * @param {function(boolean)} callback
7615  */
7616 chrome.usb.requestAccess = function(device, interfaceId, callback) {};
7620  * @see http://developer.chrome.com/apps/usb.html#method-openDevice
7621  * @param {!chrome.usb.Device} device The device to open.
7622  * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
7623  *     created ConnectionHandle on complete.
7624  */
7625 chrome.usb.openDevice = function(device, callback) {};
7629  * @see http://developer.chrome.com/apps/usb.html#method-findDevices
7630  * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
7631  *     on target devices.
7632  * @param {function(!Array<!chrome.usb.ConnectionHandle>)} callback Invoked
7633  *     with the opened ConnectionHandle on complete.
7634  */
7635 chrome.usb.findDevices = function(options, callback) {};
7639  * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
7640  * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
7641  * @param {function()=} opt_callback The callback to invoke once the device is
7642  *     closed.
7643  */
7644 chrome.usb.closeDevice = function(handle, opt_callback) {};
7648  * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
7649  * @param {!chrome.usb.ConnectionHandle} handle The device from which the
7650  *     interfaces should be listed.
7651  * @param {function(!Array<!Object>)} callback
7652  *     The callback to invoke when the interfaces are enumerated.
7653  */
7654 chrome.usb.listInterfaces = function(handle, callback) {};
7658  * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
7659  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7660  *     interface is to be claimed.
7661  * @param {number} interfaceNumber
7662  * @param {function()} callback The callback to invoke once the interface is
7663  *     claimed.
7664  */
7665 chrome.usb.claimInterface = function(handle, interfaceNumber, callback) {};
7669  * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
7670  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7671  *     interface is to be released.
7672  * @param {number} interfaceNumber
7673  * @param {function()} callback The callback to invoke once the interface is
7674  *     released.
7675  */
7676 chrome.usb.releaseInterface = function(handle, interfaceNumber, callback) {};
7680  * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
7681  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7682  *     interface settings are to be set.
7683  * @param {number} interfaceNumber
7684  * @param {number} alternateSetting The alternate setting to set.
7685  * @param {function()} callback The callback to invoke once the interface
7686  *     setting is set.
7687  */
7688 chrome.usb.setInterfaceAlternateSetting = function(
7689     handle, interfaceNumber, alternateSetting, callback) {};
7693  * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
7694  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7695  *     transfer on.
7696  * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
7697  *     transfer.
7698  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7699  *     transfer has completed.
7700  */
7701 chrome.usb.controlTransfer = function(handle, transferInfo, callback) {};
7705  * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
7706  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
7707  *     the transfer on.
7708  * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7709  *     transfer. See GenericTransferInfo.
7710  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7711  *     transfer has completed.
7712  */
7713 chrome.usb.bulkTransfer = function(handle, transferInfo, callback) {};
7717  * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
7718  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7719  *     transfer on.
7720  * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7721  *     transfer. See GenericTransferInfo.
7722  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7723  *     transfer has completed.
7724  */
7725 chrome.usb.interruptTransfer = function(handle, transferInfo, callback) {};
7729  * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
7730  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7731  *     transfer on.
7732  * @param {!Object} transferInfo The parameters to the transfer. See
7733  *     IsochronousTransferInfo.
7734  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7735  *     transfer has been completed.
7736  */
7737 chrome.usb.isochronousTransfer = function(handle, transferInfo, callback) {};
7741  * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
7742  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
7743  * @param {function(boolean)} callback Invoked once the device is reset with a
7744  *     boolean indicating whether the reset completed successfully.
7745  */
7746 chrome.usb.resetDevice = function(handle, callback) {};
7750  * @see https://developer.chrome.com/apps/serial
7751  * @const
7752  */
7753 chrome.serial = {};
7758  * @typedef {?{
7759  *   persistent: (boolean|undefined),
7760  *   name: (string|undefined),
7761  *   bufferSize: (number|undefined),
7762  *   bitRate: (number|undefined),
7763  *   dataBits: (string|undefined),
7764  *   parityBits: (string|undefined),
7765  *   stopBits: (string|undefined),
7766  *   ctsFlowControl: (boolean|undefined),
7767  *   receiveTimeout: (number|undefined),
7768  *   sendTimeout: (number|undefined)
7769  * }}
7770  * @see https://developer.chrome.com/apps/serial#type-ConnectionOptions
7771  */
7772 chrome.serial.ConnectionOptions;
7776  * @typedef {?{
7777  *   connectionId: number,
7778  *   paused: boolean,
7779  *   persistent: boolean,
7780  *   name: string,
7781  *   bufferSize: number,
7782  *   receiveTimeout: number,
7783  *   sendTimeout: number,
7784  *   bitRate: (number|undefined),
7785  *   dataBits: (string|undefined),
7786  *   parityBits: (string|undefined),
7787  *   stopBits: (string|undefined),
7788  *   ctsFlowControl: (boolean|undefined)
7789  * }}
7790  * @see https://developer.chrome.com/apps/serial#type-ConnectionInfo
7791  */
7792 chrome.serial.ConnectionInfo;
7796  * Returns information about available serial devices on the system. The
7797  * list is regenerated each time this method is called.
7798  * @param {function(!Array<!Object>)} callback Invoked with a
7799  *     list of ports on complete.
7800  * @see https://developer.chrome.com/apps/serial#method-getDevices
7801  */
7802 chrome.serial.getDevices = function(callback) {};
7806  * Connects to a given serial port.
7807  * @param {string} path The system path of the serial port to open.
7808  * @param {!chrome.serial.ConnectionOptions|
7809  *         function(!chrome.serial.ConnectionInfo)} optionsOrCallback
7810  *     Port configuration options, or the callback invoked with the created
7811  *     ConnectionInfo on complete.
7812  * @param {function(!chrome.serial.ConnectionInfo)=} opt_callback Invoked with
7813  *     the created ConnectionInfo on complete.
7814  * @see https://developer.chrome.com/apps/serial#method-connect
7815  */
7816 chrome.serial.connect = function(path, optionsOrCallback, opt_callback) {};
7820  * Update the option settings on an open serial port connection.
7821  * @param {number} connectionId The id of the opened connection.
7822  * @param {!chrome.serial.ConnectionOptions} options Port configuration
7823  *     options.
7824  * @param {function(boolean)} callback Called when the configuration has
7825  *     completed.
7826  * @see https://developer.chrome.com/apps/serial#method-update
7827  */
7828 chrome.serial.update = function(connectionId, options, callback) {};
7832  * Disconnects from a serial port.
7833  * @param {number} connectionId The id of the opened connection.
7834  * @param {function(boolean)} callback Called when the connection
7835  *     has been closed.
7836  * @see https://developer.chrome.com/apps/serial#method-disconnect
7837  */
7838 chrome.serial.disconnect = function(connectionId, callback) {};
7842  * Pauses or unpauses an open connection.
7843  * @param {number} connectionId The id of the opened connection.
7844  * @param {boolean} paused Flag to indicate whether to pause or unpause.
7845  * @param {function()} callback Called when the configuration has completed.
7846  * @see https://developer.chrome.com/apps/serial#method-setPaused
7847  */
7848 chrome.serial.setPaused = function(connectionId, paused, callback) {};
7852  * Retrieves the state of a given connection.
7853  * @param {number} connectionId The id of the opened connection.
7854  * @param {function(!chrome.serial.ConnectionInfo)} callback
7855  *     Called with connection state information when available.
7856  * @see https://developer.chrome.com/apps/serial#method-getInfo
7857  */
7858 chrome.serial.getInfo = function(connectionId, callback) {};
7862  * Retrieves the list of currently opened serial port connections owned by
7863  * the application.
7864  * @param {function(!Array<!chrome.serial.ConnectionInfo>)} callback
7865  *     Called with the list of |ConnectionInfo|s when available.
7866  * @see https://developer.chrome.com/apps/serial#method-getConnections
7867  */
7868 chrome.serial.getConnections = function(callback) {};
7872  * Writes data to the given connection.
7873  * @param {number} connectionId The id of the opened connection.
7874  * @param {!ArrayBuffer} data The data to send.
7875  * @param {function(!Object)} callback Called when the operation has
7876  *     completed.
7877  * @see https://developer.chrome.com/apps/serial#method-send
7878  */
7879 chrome.serial.send = function(connectionId, data, callback) {};
7883  * Flushes all bytes in the given connection's input and output buffers.
7884  * @param {number} connectionId The id of the opened connection.
7885  * @param {function(boolean)} callback
7886  * @see https://developer.chrome.com/apps/serial#method-flush
7887  */
7888 chrome.serial.flush = function(connectionId, callback) {};
7894  * Retrieves the state of control signals on a given connection.
7895  * @param {number} connectionId The id of the opened connection.
7896  * @param {function(!Object)} callback
7897  * @see https://developer.chrome.com/apps/serial#method-getControlSignals
7898  */
7899 chrome.serial.getControlSignals = function(connectionId, callback) {};
7903  * @typedef {?{
7904  *   dtr: (boolean|undefined),
7905  *   rts: (boolean|undefined)
7906  * }}
7907  */
7908 chrome.serial.ControlSignals;
7912  * Sets the state of control signals on a given connection.
7913  * @param {number} connectionId The id of the opened connection.
7914  * @param {!chrome.serial.ControlSignals} signals
7915  *     The set of signal changes to send to the device.
7916  * @param {function(boolean)} callback Called once the control signals
7917  *     have been set.
7918  * @see https://developer.chrome.com/apps/serial#method-setControlSignals
7919  */
7920 chrome.serial.setControlSignals = function(connectionId, signals, callback) {};
7924  * Event raised when data has been read from the connection.
7925  * @type {!ChromeObjectEvent}
7926  * @see https://developer.chrome.com/apps/serial#event-onReceive
7927  */
7928 chrome.serial.onReceive;
7932  * Event raised when an error occurred while the runtime was waiting for
7933  * data on the serial port. Once this event is raised, the connection may
7934  * be set to paused. A "timeout" error does not pause the connection.
7935  * @type {!ChromeObjectEvent}
7936  * @see https://developer.chrome.com/apps/serial#event-onReceiveError
7937  */
7938 chrome.serial.onReceiveError;
7942 ////////////////////////////////////////////////////////////////////////////////
7943 /////////////////////////// Chrome Private APIs ////////////////////////////////
7944 ////////////////////////////////////////////////////////////////////////////////
7947 /** @const */
7948 chrome.screenlockPrivate = {};
7952  * @param {string} message Displayed on the unlock screen.
7953  */
7954 chrome.screenlockPrivate.showMessage = function(message) {};
7958  * @param {function(boolean)} callback
7959  */
7960 chrome.screenlockPrivate.getLocked = function(callback) {};
7964  * @param {boolean} locked If true and the screen is unlocked, locks the screen.
7965  *     If false and the screen is locked, unlocks the screen.
7966  */
7967 chrome.screenlockPrivate.setLocked = function(locked) {};
7970 /** @type {!ChromeBooleanEvent} */
7971 chrome.screenlockPrivate.onChanged;
7975  * @const
7976  */
7977 chrome.musicManagerPrivate = {};
7981  * @param {function(string): void} callback
7982  */
7983 chrome.musicManagerPrivate.getDeviceId = function(callback) {};
7987  * @const
7988  */
7989 chrome.mediaGalleriesPrivate = {};
7993  * @typedef {function({deviceId: string, deviceName: string}): void}
7994  */
7995 chrome.mediaGalleriesPrivate.DeviceCallback;
7999  * @typedef {function({galleryId: string}): void}
8000  */
8001 chrome.mediaGalleriesPrivate.GalleryChangeCallback;
8005  * @typedef {function({galleryId: string, success: boolean}): void}
8006  */
8007 chrome.mediaGalleriesPrivate.AddGalleryWatchCallback;
8011  * @param {string} galleryId
8012  * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
8013  */
8014 chrome.mediaGalleriesPrivate.addGalleryWatch = function(galleryId, callback) {};
8018  * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8019  * @deprecated Use {chrome.system.storage.onAttach}.
8020  */
8021 chrome.mediaGalleriesPrivate.onDeviceAttached;
8025  * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8026  * @deprecated Use {chrome.system.storage.onDetach}.
8027  */
8028 chrome.mediaGalleriesPrivate.onDeviceDetached;
8032  * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
8033  */
8034 chrome.mediaGalleriesPrivate.onGalleryChanged;
8039  * @interface
8040  * @deprecated Use {chrome.system.storage.DeviceEvent}.
8041  */
8042 chrome.mediaGalleriesPrivate.DeviceEvent = function() {};
8046  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8047  * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
8048  */
8049 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.addListener =
8050     function(callback) {};
8054  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8055  * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
8056  */
8057 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.removeListener =
8058     function(callback) {};
8062  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8063  * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
8064  */
8065 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListener =
8066     function(callback) {};
8070  * @return {boolean}
8071  * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
8072  */
8073 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListeners =
8074     function(callback) {};
8079  * @interface
8080  */
8081 chrome.mediaGalleriesPrivate.GalleryChangeEvent = function() {};
8085  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8086  */
8087 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.addListener =
8088     function(callback) {};
8092  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8093  */
8094 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.removeListener =
8095     function(callback) {};
8099  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8100  */
8101 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListener =
8102     function(callback) {};
8106  * @return {boolean}
8107  */
8108 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners =
8109     function() {};
8113  * Externs for networking_private.idl:
8114  * https://code.google.com/p/chromium/codesearch#chromium/src/extensions/common/api/networking_private.idl
8115  * WARNING(2015/04/09): This API is still under active development and has a few
8116  * issues with typing:
8118  * 1. This API uses the ONC specification:
8119  *    http://www.chromium.org/chromium-os/chromiumos-design-docs/open-network-configuration
8120  * 2. The types for getProperties and getManagedProperties are not currently
8121  *    defined. They correspond to ONC Property dictionaries. They are treated as
8122  *    Objects rather than types.
8123  * 3. NetworkStateProperties defines a subset of NetworkProperties used by
8124  *    getState and getNetworks. Since these match ONC property names they
8125  *    use ONC PascalCase naming conventions instead of traditional JS
8126  *    camelCase naming.
8127  * 4. The types for setProperties and createNetwork are not currently defined.
8128  *    These use a subset of ONC properties and the complete set (and their
8129  *    relationship to the type for getProperties) is still being determined.
8131  * Because of the above issues, this API should not be used as an example for
8132  * other APIs. Please contact stevenjb@ for questions on and maintenance.
8133  * @const
8134  * @see https://developer.chrome.com/extensions/networkingPrivate
8135  */
8136 chrome.networkingPrivate = {};
8140  * @constructor
8141  * @struct
8142  * @see https://developer.chrome.com/extensions/networkingPrivate#type-CellularStateProperties
8143  */
8144 chrome.networkingPrivate.CellularStateProperties = function() {};
8148  * @type {string|undefined}
8149  */
8150 chrome.networkingPrivate.CellularStateProperties.prototype.ActivationState;
8154  * @type {string|undefined}
8155  */
8156 chrome.networkingPrivate.CellularStateProperties.prototype.NetworkTechnology;
8160  * @type {string|undefined}
8161  */
8162 chrome.networkingPrivate.CellularStateProperties.prototype.RoamingState;
8166  * @type {number|undefined}
8167  */
8168 chrome.networkingPrivate.CellularStateProperties.prototype.SignalStrength;
8172  * @constructor
8173  * @struct
8174  * @see https://developer.chrome.com/extensions/networkingPrivate#type-DeviceStateProperties
8175  */
8176 chrome.networkingPrivate.DeviceStateProperties = function() {};
8180  * @type {boolean|undefined}
8181  */
8182 chrome.networkingPrivate.DeviceStateProperties.prototype.Scanning;
8186  * @type {string}
8187  */
8188 chrome.networkingPrivate.DeviceStateProperties.prototype.State;
8192  * @type {string}
8193  */
8194 chrome.networkingPrivate.DeviceStateProperties.prototype.Type;
8198  * @constructor
8199  * @struct
8200  * @see https://developer.chrome.com/extensions/networkingPrivate#type-EthernetStateProperties
8201  */
8202 chrome.networkingPrivate.EthernetStateProperties = function() {};
8206  * @type {string}
8207  */
8208 chrome.networkingPrivate.EthernetStateProperties.prototype.Authentication;
8212  * @constructor
8213  * @struct
8214  * @see https://developer.chrome.com/extensions/networkingPrivate#type-IPSecProperties
8215  */
8216 chrome.networkingPrivate.IPSecProperties = function() {};
8220  * @type {string}
8221  */
8222 chrome.networkingPrivate.IPSecProperties.prototype.AuthenticationType;
8226  * @constructor
8227  * @struct
8228  * @see https://developer.chrome.com/extensions/networkingPrivate#type-ThirdPartyVPNProperties
8229  */
8230 chrome.networkingPrivate.ThirdPartyVPNProperties = function() {};
8234  * @type {string}
8235  */
8236 chrome.networkingPrivate.ThirdPartyVPNProperties.prototype.ExtensionID;
8240  * @constructor
8241  * @struct
8242  * @see https://developer.chrome.com/extensions/networkingPrivate#type-VPNStateProperties
8243  */
8244 chrome.networkingPrivate.VPNStateProperties = function() {};
8248  * @type {!chrome.networkingPrivate.IPSecProperties|undefined}
8249  */
8250 chrome.networkingPrivate.VPNStateProperties.prototype.IPSec;
8254  * @type {!chrome.networkingPrivate.ThirdPartyVPNProperties|undefined}
8255  */
8256 chrome.networkingPrivate.VPNStateProperties.prototype.ThirdPartyVPN;
8260  * @type {string}
8261  */
8262 chrome.networkingPrivate.VPNStateProperties.prototype.Type;
8266  * @constructor
8267  * @struct
8268  * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8269  */
8270 chrome.networkingPrivate.WiFiStateProperties = function() {};
8274  * @type {string}
8275  */
8276 chrome.networkingPrivate.WiFiStateProperties.prototype.Security;
8280  * @type {number|undefined}
8281  */
8282 chrome.networkingPrivate.WiFiStateProperties.prototype.SignalStrength;
8286  * @constructor
8287  * @struct
8288  * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8289  */
8290 chrome.networkingPrivate.WiMAXStateProperties = function() {};
8294  * @type {number|undefined}
8295  */
8296 chrome.networkingPrivate.WiMAXStateProperties.prototype.SignalStrength;
8300  * @typedef {?{
8301  *   Cellular: (!chrome.networkingPrivate.CellularStateProperties|undefined),
8302  *   Connectable: (boolean|undefined),
8303  *   ConnectionState: (string|undefined),
8304  *   ErrorState: (string|undefined),
8305  *   Ethernet: (!chrome.networkingPrivate.EthernetStateProperties|undefined),
8306  *   GUID: string,
8307  *   Name: (string|undefined),
8308  *   Priority: (number|undefined),
8309  *   Source: (string|undefined),
8310  *   Type: string,
8311  *   VPN: (!chrome.networkingPrivate.VPNStateProperties|undefined),
8312  *   WiFi: (!chrome.networkingPrivate.WiFiStateProperties|undefined),
8313  *   WiMAX: (!chrome.networkingPrivate.WiMAXStateProperties|undefined)
8314  * }}
8315  */
8316 chrome.networkingPrivate.NetworkStateProperties;
8320  * @typedef {?{
8321  *   certificate: string,
8322  *   intermediateCertificates: (!Array<string>|undefined),
8323  *   publicKey: string,
8324  *   nonce: string,
8325  *   signedData: string,
8326  *   deviceSerial: string,
8327  *   deviceSsid: string,
8328  *   deviceBssid: string
8329  * }}
8330  */
8331 chrome.networkingPrivate.VerificationProperties;
8335  * @typedef {?{
8336  *   networkType: string,
8337  *   visible: (boolean|undefined),
8338  *   configured: (boolean|undefined),
8339  *   limit: (number|undefined)
8340  * }}
8341  */
8342 chrome.networkingPrivate.NetworkFilter;
8346  * @param {string} guid
8347  * @param {function(!Object)} callback
8348  */
8349 chrome.networkingPrivate.getProperties = function(guid, callback) {};
8353  * @param {string} guid
8354  * @param {function(!Object)} callback
8355  */
8356 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {};
8360  * @param {string} guid
8361  * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback
8362  */
8363 chrome.networkingPrivate.getState = function(guid, callback) {};
8367  * TODO: Use NetworkConfigProperties for |properties| once fully
8368  * defined.
8369  * @param {string} guid
8370  * @param {!Object} properties
8371  * @param {function()=} opt_callback
8372  */
8373 chrome.networkingPrivate.setProperties =
8374     function(guid, properties, opt_callback) {};
8378  * TODO: Use NetworkConfigProperties for |properties| once fully
8379  * defined.
8380  * @param {boolean} shared
8381  * @param {!Object} properties
8382  * @param {function(string)=} opt_callback Returns guid of the configured
8383  *     configuration.
8384  */
8385 chrome.networkingPrivate.createNetwork =
8386     function(shared, properties, opt_callback) {};
8390  * @param {string} guid
8391  * @param {function()=} opt_callback Called when the operation has completed.
8392  */
8393 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {};
8397  * @param {!chrome.networkingPrivate.NetworkFilter} filter
8398  * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>)}
8399  *     callback
8400  */
8401 chrome.networkingPrivate.getNetworks = function(filter, callback) {};
8405  * @param {string} type
8406  * @param {function(!Array<!chrome.networkingPrivate.NetworkStateProperties>)}
8407  *      callback
8408  * @deprecated Use chrome.networkingPrivate.getNetworks with filter.visible=true
8409  */
8410 chrome.networkingPrivate.getVisibleNetworks = function(type, callback) {};
8414  * @param {function(!Array<string>)} callback
8415  * @deprecated Use chrome.networkingPrivate.getDeviceStates.
8416  */
8417 chrome.networkingPrivate.getEnabledNetworkTypes = function(callback) {};
8421  * @param {function(!Array<!chrome.networkingPrivate.DeviceStateProperties>)}
8422  *     callback
8423  */
8424 chrome.networkingPrivate.getDeviceStates = function(callback) {};
8427 /** @param {string} networkType */
8428 chrome.networkingPrivate.enableNetworkType = function(networkType) {};
8431 /** @param {string} networkType */
8432 chrome.networkingPrivate.disableNetworkType = function(networkType) {};
8436  * Requests that the networking subsystem scan for new networks and update the
8437  * list returned by getVisibleNetworks.
8438  */
8439 chrome.networkingPrivate.requestNetworkScan = function() {};
8443  * @param {string} guid
8444  * @param {function()=} opt_callback
8445  */
8446 chrome.networkingPrivate.startConnect = function(guid, opt_callback) {};
8450  * @param {string} guid
8451  * @param {function()=} opt_callback
8452  */
8453 chrome.networkingPrivate.startDisconnect = function(guid, opt_callback) {};
8457  * @param {string} guid
8458  * @param {(string|function())=} opt_carrierOrCallback
8459  * @param {function()=} opt_callback
8460  */
8461 chrome.networkingPrivate.startActivate =
8462     function(guid, opt_carrierOrCallback, opt_callback) {};
8466  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8467  * @param {function(boolean)} callback
8468  */
8469 chrome.networkingPrivate.verifyDestination =
8470     function(verificationInfo, callback) {};
8474  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8475  * @param {string} guid
8476  * @param {function(string)} callback
8477  */
8478 chrome.networkingPrivate.verifyAndEncryptCredentials =
8479     function(verificationInfo, guid, callback) {};
8483  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8484  * @param {string} data
8485  * @param {function(string)} callback
8486  */
8487 chrome.networkingPrivate.verifyAndEncryptData =
8488     function(verificationInfo, data, callback) {};
8492  * @param {string} ipOrMacAddress
8493  * @param {boolean} enabled
8494  * @param {function(string)=} opt_callback
8495  */
8496 chrome.networkingPrivate.setWifiTDLSEnabledState =
8497     function(ipOrMacAddress, enabled, opt_callback) {};
8501  * @param {string} ipOrMacAddress
8502  * @param {function(string)} callback
8503  */
8504 chrome.networkingPrivate.getWifiTDLSStatus =
8505     function(ipOrMacAddress, callback) {};
8509  * @param {string} guid
8510  * @param {function(string)} callback
8511  */
8512 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {};
8515 /** @type {!ChromeStringArrayEvent} */
8516 chrome.networkingPrivate.onNetworksChanged;
8519 /** @type {!ChromeStringArrayEvent} */
8520 chrome.networkingPrivate.onNetworkListChanged;
8523 /** @type {!ChromeEvent} */
8524 chrome.networkingPrivate.onDeviceStateListChanged;
8527 /** @type {!ChromeStringStringEvent} */
8528 chrome.networkingPrivate.onPortalDetectionCompleted;
8532  * WARNING(2014/08/14): This API is still under active initial development and
8533  * unstable. The types are not well defined or documented, and this API
8534  * definition here should not be used as an example for other APIs added to this
8535  * file. Please contact mednik@ for questions on and maintenance for this API.
8536  * @const
8537  * @see http://goo.gl/afV8wB
8538  */
8539 chrome.mdns = {};
8543  * Data type sent to the event handler of chrome.mdns.onServiceList.
8544  * @constructor
8545  */
8546 chrome.mdns.MdnsService = function() {};
8549 /** @type {string} */
8550 chrome.mdns.MdnsService.prototype.serviceName;
8553 /** @type {string} */
8554 chrome.mdns.MdnsService.prototype.serviceHostPort;
8557 /** @type {string} */
8558 chrome.mdns.MdnsService.prototype.ipAddress;
8561 /** @type {!Array<string>} */
8562 chrome.mdns.MdnsService.prototype.serviceData;
8566  * Event whose listeners take an array of MdnsService parameter.
8567  * @constructor
8568  */
8569 chrome.mdns.ServiceListEvent = function() {};
8573  * @param {function(!Array<!chrome.mdns.MdnsService>): void} callback
8574  * @param {!Object=} opt_filter
8575  */
8576 chrome.mdns.ServiceListEvent.prototype.addListener =
8577     function(callback, opt_filter) {};
8580 /** @param {function(!Array<!chrome.mdns.MdnsService>): void} callback */
8581 chrome.mdns.ServiceListEvent.prototype.removeListener = function(callback) {};
8585  * @param {function(!Array<!chrome.mdns.MdnsService>): void} callback
8586  * @return {boolean}
8587  */
8588 chrome.mdns.ServiceListEvent.prototype.hasListener = function(callback) {};
8591 /** @return {boolean} */
8592 chrome.mdns.ServiceListEvent.prototype.hasListeners = function() {};
8595 /** @type {!chrome.mdns.ServiceListEvent} */
8596 chrome.mdns.onServiceList;
8599 /** @param {function()} callback */
8600 chrome.mdns.forceDiscovery = function(callback) {};
8604  * @const
8605  * @see http://goo.gl/79p5h5
8606  */
8607 chrome.gcdPrivate = {};
8611  * Represents a GCD device discovered locally or registered to a given user.
8612  * deviceId: Opaque device identifier to be passed to API.
8613  * setupType: How this device was discovered.
8614  * cloudId: Cloud identifier string.
8615  * deviceName: Device human readable name.
8616  * deviceType: Device type (camera, printer, etc).
8617  * deviceDescription: Device human readable description.
8618  * @typedef {?{
8619  *   deviceId: string,
8620  *   setupType: string,
8621  *   cloudId: (string|undefined),
8622  *   deviceType: string,
8623  *   deviceName: string,
8624  *   deviceDescription: string
8625  * }}
8626  */
8627 chrome.gcdPrivate.Device;
8631  * Returns the list of cloud devices visible locally or available in the
8632  * cloud for user account.
8633  * @param {function(!Array<!chrome.gcdPrivate.Device>): void} callback
8634  */
8635 chrome.gcdPrivate.getCloudDeviceList = function(callback) {};
8639  * Queries network for local devices. Triggers onDeviceStateChanged and
8640  * onDeviceRemoved events. Call this function *only* after registering for
8641  * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
8642  */
8643 chrome.gcdPrivate.queryForNewLocalDevices = function() {};
8647  * Cache the WiFi password in the browser process for use during
8648  * provisioning. This is done to allow the gathering of the wifi password to
8649  * not be done while connected to the device's network. Callback is called
8650  * with true if wifi password was cached and false if it was unavailable.
8651  * @param {string} ssid
8652  * @param {function(boolean): void} callback
8653  */
8654 chrome.gcdPrivate.prefetchWifiPassword = function(ssid, callback) {};
8658  * Returns local device information.
8659  * @param {string} serviceName The mDNS service name of the device.
8660  * @param {function(string, !Object): void}
8661  *     callback Called when when the device info is available or on error.
8662  *     |status|: The status of the operation (success or type of error).
8663  *     |deviceInfo|: Content of /privet/info response.
8664  *     https://developers.google.com/cloud-devices/v1/reference/local-api/info
8665  */
8666 chrome.gcdPrivate.getDeviceInfo = function(serviceName, callback) {};
8670  * Create new pairing session.
8671  * @param {string} serviceName The mDNS service name of the device.
8672  * @param {function(number, string, !Array<string>): void}
8673  *     callback Called when the session is established or on error. 1st param,
8674  *     |sessionId|, is the session ID (identifies the session for future calls).
8675  *     2nd param, |status|, is the status (success or type of error). 3rd param,
8676  *     |pairingTypes|, is a list of pairing types supported by this device.
8677  */
8678 chrome.gcdPrivate.createSession = function(serviceName, callback) {};
8682  * Start pairing with the selected method.
8683  * @param {number} sessionId
8684  * @param {string} pairingType
8685  * @param {function(string): void} callback
8686  */
8687 chrome.gcdPrivate.startPairing = function(sessionId, pairingType, callback) {};
8691  * Confirm pairing code.
8692  * @param {number} sessionId
8693  * @param {string} code
8694  * @param {function(string): void} callback
8695  */
8696 chrome.gcdPrivate.confirmCode = function(sessionId, code, callback) {};
8700  * Send an encrypted message to the device. If the message is a setup message
8701  * with a wifi ssid specified but no password, the password cached from
8702  * prefetchWifiPassword() will be used and the call will fail if it's not
8703  * available. For open networks use an empty string as the password.
8704  * @param {number} sessionId
8705  * @param {string} api The API path.
8706  * @param {!Object} input The input message to be sent over the encrypted
8707  *     channel.
8708  * @param {function(string, ?Object): void} callback
8709  */
8710 chrome.gcdPrivate.sendMessage = function(sessionId, api, input, callback) {};
8714  * Terminate the session with the device.
8715  * @param {number} sessionId
8716  */
8717 chrome.gcdPrivate.terminateSession = function(sessionId) {};
8721  * Returns command definitions.
8722  * @param {string} deviceId The device to get command definitions for.
8723  * @param {function(!Object): void} callback The result callback.
8724  */
8725 chrome.gcdPrivate.getCommandDefinitions = function(deviceId, callback) {};
8729  * Creates and sends a new command.
8730  * @param {string} deviceId The device to send the command to.
8731  * @param {number} expireInMs The number of milliseconds since now before the
8732  *     command expires. An expired command should not be executed by the device.
8733  *     Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
8734  *     inclusive. All values outside that range will be replaced by 30 days.
8735  * @param {!Object} command Described at
8736  *     https://developers.google.com/cloud-devices/v1/reference/commands.
8737  * @param {function(!Object): void} callback  The result callback.
8738  */
8739 chrome.gcdPrivate.insertCommand = function(
8740     deviceId, expireInMs, command, callback) {};
8744  * Returns a particular command.
8745  * @param {string} commandId Unique command ID.
8746  * @param {function(!Object): void} callback  The result callback.
8747  */
8748 chrome.gcdPrivate.getCommand = function(commandId, callback) {};
8752  * Cancels a command.
8753  * @param {string} commandId Unique command ID.
8754  * @param {function(!Object): void} callback  The result callback.
8755  */
8756 chrome.gcdPrivate.cancelCommand = function(commandId, callback) {};
8760  * Lists all commands in order of creation.
8761  * @param {string} deviceId The device to send the command to.
8762  * @param {string} byUser List all the commands issued by the user. Special
8763  *     value 'me' can be used to list by the current user.
8764  * @param {string} state Command state.
8765  * @param {function(!Array<!Object>): void} callback  The result callback.
8766  */
8767 chrome.gcdPrivate.getCommandsList = function(
8768     deviceId, byUser, state, callback) {};
8773  * Event whose listeners take a chrome.gcdPrivate.Device.
8774  * @constructor
8775  */
8776 chrome.gcdPrivate.DeviceEvent = function() {};
8779 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8780 chrome.gcdPrivate.DeviceEvent.prototype.addListener = function(callback) {};
8783 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8784 chrome.gcdPrivate.DeviceEvent.prototype.removeListener = function(callback) {};
8788  * @param {function(!chrome.gcdPrivate.Device): void} callback
8789  * @return {boolean}
8790  */
8791 chrome.gcdPrivate.DeviceEvent.prototype.hasListener = function(callback) {};
8794 /** @return {boolean} */
8795 chrome.gcdPrivate.DeviceEvent.prototype.hasListeners = function() {};
8799  * Fires when a device's state changes. When a listener is first added, this
8800  * event fires for all known devices on the network. Afterwards, it will fire
8801  * with device status updates.
8802  * @type {!chrome.gcdPrivate.DeviceEvent}
8803  */
8804 chrome.gcdPrivate.onDeviceStateChanged;
8808  * Fires when a given device disappears.
8809  * |deviceId| The device that has disappeared.
8810  * @type {!ChromeStringEvent}
8811  */
8812 chrome.gcdPrivate.onDeviceRemoved;
8816  * @const
8817  * @see http://goo.gl/bKHibo
8818  */
8819 chrome.bluetoothPrivate = {};
8823 /** @constructor */
8824 chrome.bluetoothPrivate.PairingEvent = function() {};
8827 /** @type {string} */
8828 chrome.bluetoothPrivate.PairingEvent.prototype.pairing;
8831 /** @type {!chrome.bluetooth.Device} */
8832 chrome.bluetoothPrivate.PairingEvent.prototype.device;
8835 /** @type {string|undefined} */
8836 chrome.bluetoothPrivate.PairingEvent.prototype.pincode;
8839 /** @type {number|undefined} */
8840 chrome.bluetoothPrivate.PairingEvent.prototype.passkey;
8843 /** @type {number|undefined} */
8844 chrome.bluetoothPrivate.PairingEvent.prototype.enteredKey;
8848  * @typedef {{
8849  *   name: (string|undefined),
8850  *   powered: (boolean|undefined),
8851  *   discoverable: (boolean|undefined)
8852  * }}
8853  */
8854 chrome.bluetoothPrivate.NewAdapterState;
8858  * @typedef {{
8859  *   device: !chrome.bluetooth.Device,
8860  *   response: (string|undefined),
8861  *   pincode: (string|undefined),
8862  *   passkey: (number|undefined),
8863  *   enteredKey: (number|undefined)
8864  * }}
8865  */
8866 chrome.bluetoothPrivate.SetPairingResponseOptions;
8870  * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
8871  * @param {function()} callback
8872  */
8873 chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
8877  * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
8878  * @param {function()} callback
8879  */
8880 chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
8885  * Event whose listeners take a PairingEvent parameter.
8886  * @constructor
8887  */
8888 chrome.bluetoothPrivate.PairingEventEvent = function() {};
8891 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8892 chrome.bluetoothPrivate.PairingEventEvent.prototype.addListener =
8893     function(callback) {};
8896 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8897 chrome.bluetoothPrivate.PairingEventEvent.prototype.removeListener =
8898     function(callback) {};
8902  * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
8903  * @return {boolean}
8904  */
8905 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListener =
8906     function(callback) {};
8909 /** @return {boolean} */
8910 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListeners =
8911     function() {};
8914 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
8915 chrome.bluetoothPrivate.onPairing;
8920  * @const
8921  * @see http://goo.gl/XmVdHm
8922  */
8923 chrome.inlineInstallPrivate = {};
8927  * Installs the given app ID.
8928  * @param {string} id
8929  * @param {function(string, string): void=} opt_callback Response callback that
8930  *     returns two string: (1) an error string (or empty string on success) and
8931  *     (2) an error code in case of error
8932  */
8933 chrome.inlineInstallPrivate.install = function(id, opt_callback) {};