Bumping closure compiler:
[chromium-blink-merge.git] / third_party / closure_compiler / externs / chrome_extensions.js
blob32e25c88b6a18aa9b62877353f0915394df4b02f
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;
268  * @constructor
269  * @see http://developer.chrome.com/apps/app_runtime.html
270  */
271 chrome.app.runtime.LaunchData = function() {};
274 /** @type {string|undefined} */
275 chrome.app.runtime.LaunchData.prototype.id;
278 /** @type {!Array.<!chrome.app.runtime.LaunchItem>|undefined} */
279 chrome.app.runtime.LaunchData.prototype.items;
282 /** @type {string|undefined} */
283 chrome.app.runtime.LaunchData.prototype.url;
286 /** @type {string|undefined} */
287 chrome.app.runtime.LaunchData.prototype.referrerUrl;
290 /** @type {boolean|undefined} */
291 chrome.app.runtime.LaunchData.prototype.isKioskSession;
296  * The type of chrome.app.runtime.onLaunched.
297  * @constructor
298  */
299 chrome.app.runtime.LaunchEvent = function() {};
303  * @param {function(!chrome.app.runtime.LaunchData)} callback
304  * @see http://developer.chrome.com/apps/app.runtime.html#event-onLaunched
305  */
306 chrome.app.runtime.LaunchEvent.prototype.addListener = function(callback) {};
310  * @param {function(!chrome.app.runtime.LaunchData)} callback
311  */
312 chrome.app.runtime.LaunchEvent.prototype.removeListener = function(callback) {};
316  * @param {function(!chrome.app.runtime.LaunchData)} callback
317  * @return {boolean}
318  */
319 chrome.app.runtime.LaunchEvent.prototype.hasListener = function(callback) {};
323  * @return {boolean}
324  */
325 chrome.app.runtime.LaunchEvent.prototype.hasListeners = function() {};
328 /** @type {!chrome.app.runtime.LaunchEvent} */
329 chrome.app.runtime.onLaunched;
333  * @type {!ChromeEvent}
334  * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
335  */
336 chrome.app.runtime.onRestarted;
340  * @const
341  * @see http://developer.chrome.com/apps/app.window.html
342  */
343 chrome.app.window = {};
347  * @see https://developer.chrome.com/apps/app_window#method-getAll
348  * @return {!Array.<!chrome.app.window.AppWindow>}
349  */
350 chrome.app.window.getAll = function() {};
354  * @see https://developer.chrome.com/apps/app_window#method-get
355  * @param {string} id
356  * @return {chrome.app.window.AppWindow}
357  */
358 chrome.app.window.get = function(id) {};
363  * @constructor
364  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
365  */
366 chrome.app.window.AppWindow = function() {};
370  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
371  */
372 chrome.app.window.AppWindow.prototype.focus = function() {};
376  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
377  */
378 chrome.app.window.AppWindow.prototype.fullscreen = function() {};
382  * @return {boolean}
383  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
384  */
385 chrome.app.window.AppWindow.prototype.isFullscreen = function() {};
389  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
390  */
391 chrome.app.window.AppWindow.prototype.minimize = function() {};
395  * @return {boolean}
396  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
397  */
398 chrome.app.window.AppWindow.prototype.isMinimized = function() {};
402  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
403  */
404 chrome.app.window.AppWindow.prototype.maximize = function() {};
408  * @return {boolean}
409  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
410  */
411 chrome.app.window.AppWindow.prototype.isMaximized = function() {};
415  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
416  */
417 chrome.app.window.AppWindow.prototype.restore = function() {};
421  * @param {number} left The new left position, in pixels.
422  * @param {number} top The new top position, in pixels.
423  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
424  */
425 chrome.app.window.AppWindow.prototype.moveTo = function(left, top) {};
429  * @param {number} width The new width, in pixels.
430  * @param {number} height The new height, in pixels.
431  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
432  */
433 chrome.app.window.AppWindow.prototype.resizeTo = function(width, height) {};
437  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
438  */
439 chrome.app.window.AppWindow.prototype.drawAttention = function() {};
443  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
444  */
445 chrome.app.window.AppWindow.prototype.clearAttention = function() {};
449  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
450  */
451 chrome.app.window.AppWindow.prototype.close = function() {};
455  * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
456  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
457  */
458 chrome.app.window.AppWindow.prototype.show = function(opt_focus) {};
462  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
463  */
464 chrome.app.window.AppWindow.prototype.hide = function() {};
468  * @return {!chrome.app.window.Bounds} The current window bounds.
469  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
470  */
471 chrome.app.window.AppWindow.prototype.getBounds = function() {};
475  * @param {!chrome.app.window.Bounds} bounds The new window bounds.
476  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
477  */
478 chrome.app.window.AppWindow.prototype.setBounds = function(bounds) {};
482  * @return {boolean}
483  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
484  */
485 chrome.app.window.AppWindow.prototype.isAlwaysOnTop = function() {};
489  * @param {boolean} alwaysOnTop Set whether the window should stay above most
490  *     other windows.
491  * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
492  */
493 chrome.app.window.AppWindow.prototype.setAlwaysOnTop = function(alwaysOnTop) {};
496 /** @type {!ChromeEvent} */
497 chrome.app.window.AppWindow.prototype.onBoundsChanged;
500 /** @type {!ChromeEvent} */
501 chrome.app.window.AppWindow.prototype.onClosed;
504 /** @type {!ChromeEvent} */
505 chrome.app.window.AppWindow.prototype.onFullscreened;
508 /** @type {!ChromeEvent} */
509 chrome.app.window.AppWindow.prototype.onMinimized;
512 /** @type {!ChromeEvent} */
513 chrome.app.window.AppWindow.prototype.onMaximized;
516 /** @type {!ChromeEvent} */
517 chrome.app.window.AppWindow.prototype.onRestored;
520 /** @type {!Window} */
521 chrome.app.window.AppWindow.prototype.contentWindow;
525  * @typedef {{
526  *   left: (number|undefined),
527  *   top: (number|undefined),
528  *   width: (number|undefined),
529  *   height: (number|undefined)
530  * }}
531  * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
532  */
533 chrome.app.window.Bounds;
537  * @typedef {{
538  *   id: (string|undefined),
539  *   minWidth: (number|undefined),
540  *   minHeight: (number|undefined),
541  *   maxWidth: (number|undefined),
542  *   maxHeight: (number|undefined),
543  *   frame: (string|undefined),
544  *   bounds: (!chrome.app.window.Bounds|undefined),
545  *   transparentBackground: (boolean|undefined),
546  *   state: (string|undefined),
547  *   hidden: (boolean|undefined),
548  *   resizable: (boolean|undefined),
549  *   alwaysOnTop: (boolean|undefined),
550  *   focused: (boolean|undefined)
551  * }}
552  * @see http://developer.chrome.com/apps/app.window.html#method-create
553  */
554 chrome.app.window.CreateWindowOptions;
558  * @param {string} url URL to create.
559  * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
560  *     the new window.
561  * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
562  *     Callback to be run.
563  * @see http://developer.chrome.com/apps/app.window.html#method-create
564  */
565 chrome.app.window.create = function(
566     url, opt_options, opt_createWindowCallback) {};
570  * Returns an AppWindow object for the current script context (ie JavaScript
571  * 'window' object).
572  * @return {!chrome.app.window.AppWindow}
573  * @see http://developer.chrome.com/apps/app.window.html#method-current
574  */
575 chrome.app.window.current = function() {};
579  * @type {!ChromeEvent}
580  * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
581  */
582 chrome.app.window.onBoundsChanged;
586  * @type {!ChromeEvent}
587  * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
588  */
589 chrome.app.window.onClosed;
593  * @type {!ChromeEvent}
594  * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
595  */
596 chrome.app.window.onFullscreened;
600  * @type {!ChromeEvent}
601  * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
602  */
603 chrome.app.window.onMaximized;
607  * @type {!ChromeEvent}
608  * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
609  */
610 chrome.app.window.onMinimized;
614  * @type {!ChromeEvent}
615  * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
616  */
617 chrome.app.window.onRestored;
621  * Private API.
623  * @const
624  * @see https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/audio_modem.idl
625  * @see go/chrome-modem
626  */
627 chrome.audioModem = {};
631  * @typedef {?{
632  *   tokenLength: number,
633  *   crc: (boolean|undefined),
634  *   parity: (boolean|undefined)
635  * }}
636  */
637 chrome.audioModem.TokenEncoding;
641  * @typedef {?{
642  *   timeoutMillis: number,
643  *   band: string,
644  *   encoding: !chrome.audioModem.TokenEncoding
645  * }}
646  */
647 chrome.audioModem.RequestParams;
650 /** @constructor */
651 chrome.audioModem.ReceivedToken = function() {};
654 /** @type {!ArrayBuffer} */
655 chrome.audioModem.ReceivedToken.prototype.token;
658 /** @type {string} */
659 chrome.audioModem.ReceivedToken.prototype.band;
663  * @param {!chrome.audioModem.RequestParams} params
664  * @param {!ArrayBuffer} token
665  * @param {function(string)} callback
666  */
667 chrome.audioModem.transmit = function(params, token, callback) {};
671  * @param {string} band
672  * @param {function(string)} callback
673  */
674 chrome.audioModem.stopTransmit = function(band, callback) {};
678  * @param {!chrome.audioModem.RequestParams} params
679  * @param {function(string)} callback
680  */
681 chrome.audioModem.receive = function(params, callback) {};
685  * @param {string} band
686  * @param {function(string)} callback
687  */
688 chrome.audioModem.stopReceive = function(band, callback) {};
691 /** @constructor */
692 chrome.audioModem.ReceivedEvent = function() {};
696  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
697  */
698 chrome.audioModem.ReceivedEvent.prototype.addListener = function(callback) {};
702  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
703  */
704 chrome.audioModem.ReceivedEvent.prototype.removeListener =
705     function(callback) {};
709  * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
710  * @return {boolean}
711  */
712 chrome.audioModem.ReceivedEvent.prototype.hasListener = function(callback) {};
716  * @return {boolean}
717  */
718 chrome.audioModem.ReceivedEvent.prototype.hasListeners = function() {};
721 /** @type {!chrome.audioModem.ReceivedEvent} */
722 chrome.audioModem.onReceived;
725 /** @type {!ChromeStringEvent} */
726 chrome.audioModem.onTransmitFail;
730  * @const
731  * @see https://developer.chrome.com/apps/bluetooth
732  */
733 chrome.bluetooth = function() {};
738  * @constructor
739  * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
740  */
741 chrome.bluetooth.AdapterState = function() {};
744 /** @type {string} */
745 chrome.bluetooth.AdapterState.prototype.address;
748 /** @type {string} */
749 chrome.bluetooth.AdapterState.prototype.name;
752 /** @type {boolean} */
753 chrome.bluetooth.AdapterState.prototype.powered;
756 /** @type {boolean} */
757 chrome.bluetooth.AdapterState.prototype.available;
760 /** @type {boolean} */
761 chrome.bluetooth.AdapterState.prototype.discovering;
766  * @constructor
767  * @see https://developer.chrome.com/apps/bluetooth#type-Device
768  */
769 chrome.bluetooth.Device = function() {};
772 /** @type {string} */
773 chrome.bluetooth.Device.prototype.address;
776 /** @type {string|undefined} */
777 chrome.bluetooth.Device.prototype.name;
780 /** @type {number|undefined} */
781 chrome.bluetooth.Device.prototype.deviceClass;
784 /** @type {string|undefined} */
785 chrome.bluetooth.Device.prototype.vendorIdSource;
788 /** @type {string|undefined} */
789 chrome.bluetooth.Device.prototype.vendorId;
792 /** @type {number|undefined} */
793 chrome.bluetooth.Device.prototype.productId;
796 /** @type {number|undefined} */
797 chrome.bluetooth.Device.prototype.deviceId;
800 /** @type {string|undefined} */
801 chrome.bluetooth.Device.prototype.type;
804 /** @type {boolean|undefined} */
805 chrome.bluetooth.Device.prototype.paired;
808 /** @type {boolean|undefined} */
809 chrome.bluetooth.Device.prototype.connected;
812 /** @type {!Array.<string>|undefined} */
813 chrome.bluetooth.Device.prototype.uuids;
817  * @param {function(!chrome.bluetooth.AdapterState)} callback
818  * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
819  */
820 chrome.bluetooth.getAdapterState = function(callback) {};
824  * @param {string} deviceAddress
825  * @param {function(!chrome.bluetooth.Device)} callback
826  * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
827  */
828 chrome.bluetooth.getDevice = function(deviceAddress, callback) {};
832  * @param {function(!Array.<!chrome.bluetooth.Device>)} callback
833  * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
834  */
835 chrome.bluetooth.getDevices = function(callback) {};
839  * @param {function()=} opt_callback
840  * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
841  */
842 chrome.bluetooth.startDiscovery = function(opt_callback) {};
846  * @param {function()=} opt_callback
847  * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
848  */
849 chrome.bluetooth.stopDiscovery = function(opt_callback) {};
854  * Event whose listeners take an AdapaterState parameter.
855  * @constructor
856  */
857 chrome.bluetooth.AdapterStateEvent = function() {};
860 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
861 chrome.bluetooth.AdapterStateEvent.prototype.addListener =
862     function(callback) {};
865 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
866 chrome.bluetooth.AdapterStateEvent.prototype.removeListener =
867     function(callback) {};
871  * @param {function(!chrome.bluetooth.AdapterState): void} callback
872  * @return {boolean}
873  */
874 chrome.bluetooth.AdapterStateEvent.prototype.hasListener =
875     function(callback) {};
878 /** @return {boolean} */
879 chrome.bluetooth.AdapterStateEvent.prototype.hasListeners = function() {};
883  * @type {!chrome.bluetooth.AdapterStateEvent}
884  * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
885  */
886 chrome.bluetooth.onAdapterStateChanged;
891  * Event whose listeners take an Device parameter.
892  * @constructor
893  */
894 chrome.bluetooth.DeviceEvent = function() {};
897 /** @param {function(!chrome.bluetooth.Device): void} callback */
898 chrome.bluetooth.DeviceEvent.prototype.addListener = function(callback) {};
901 /** @param {function(!chrome.bluetooth.Device): void} callback */
902 chrome.bluetooth.DeviceEvent.prototype.removeListener = function(callback) {};
906  * @param {function(!chrome.bluetooth.Device): void} callback
907  * @return {boolean}
908  */
909 chrome.bluetooth.DeviceEvent.prototype.hasListener = function(callback) {};
912 /** @return {boolean} */
913 chrome.bluetooth.DeviceEvent.prototype.hasListeners = function() {};
917  * @type {!chrome.bluetooth.DeviceEvent}
918  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
919  */
920 chrome.bluetooth.onDeviceAdded;
924  * @type {!chrome.bluetooth.DeviceEvent}
925  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
926  */
927 chrome.bluetooth.onDeviceChanged;
931  * @type {!chrome.bluetooth.DeviceEvent}
932  * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
933  */
934 chrome.bluetooth.onDeviceRemoved;
938  * @const
939  * @see https://developer.chrome.com/apps/bluetoothSocket
940  */
941 chrome.bluetoothSocket = {};
945  * @typedef {{
946  *   persistent: (boolean|undefined),
947  *   name: (string|undefined),
948  *   bufferSize: (number|undefined)
949  * }}
950  * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
951  */
952 chrome.bluetoothSocket.SocketProperties;
956  * @typedef {{
957  *   channel: (number|undefined),
958  *   psm: (number|undefined),
959  *   backlog: (number|undefined)
960  * }}
961  * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
962  */
963 chrome.bluetoothSocket.ListenOptions;
968  * @constructor
969  * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
970  */
971 chrome.bluetoothSocket.SocketInfo = function() {};
974 /** @type {number} */
975 chrome.bluetoothSocket.SocketInfo.prototype.socketId;
978 /** @type {boolean} */
979 chrome.bluetoothSocket.SocketInfo.prototype.persistent;
982 /** @type {string|undefined} */
983 chrome.bluetoothSocket.SocketInfo.prototype.name;
986 /** @type {number|undefined} */
987 chrome.bluetoothSocket.SocketInfo.prototype.bufferSize;
990 /** @type {boolean} */
991 chrome.bluetoothSocket.SocketInfo.prototype.paused;
994 /** @type {boolean} */
995 chrome.bluetoothSocket.SocketInfo.prototype.connected;
998 /** @type {string|undefined} */
999 chrome.bluetoothSocket.SocketInfo.prototype.address;
1002 /** @type {string|undefined} */
1003 chrome.bluetoothSocket.SocketInfo.prototype.uuid;
1007  * @param {!chrome.bluetoothSocket.SocketProperties|
1008  *     function(!{socketId: number})} propertiesOrCallback
1009  * @param {function(!{socketId: number})=} opt_callback
1010  * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
1011  */
1012 chrome.bluetoothSocket.create = function(propertiesOrCallback, opt_callback) {};
1016  * @param {number} socketId
1017  * @param {!chrome.bluetoothSocket.SocketProperties} properties
1018  * @param {function()=} opt_callback
1019  * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
1020  */
1021 chrome.bluetoothSocket.update = function(socketId, properties, opt_callback) {};
1025  * @param {number} socketId
1026  * @param {boolean} paused
1027  * @param {function()=} opt_callback
1028  * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
1029  */
1030 chrome.bluetoothSocket.setPaused = function(socketId, paused, 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-listenUsingRfcomm
1039  */
1040 chrome.bluetoothSocket.listenUsingRfcomm =
1041     function(socketId, uuid, optionsOrCallback, opt_callback) {};
1045  * @param {number} socketId
1046  * @param {string} uuid
1047  * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1048  * @param {function()=} opt_callback
1049  * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
1050  */
1051 chrome.bluetoothSocket.listenUsingL2cap =
1052     function(socketId, uuid, optionsOrCallback, opt_callback) {};
1056  * @param {number} socketId
1057  * @param {string} address
1058  * @param {string} uuid
1059  * @param {function()} callback
1060  * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
1061  */
1062 chrome.bluetoothSocket.connect = function(socketId, address, uuid, callback) {};
1066  * @param {number} socketId
1067  * @param {function()=} opt_callback
1068  * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
1069  */
1070 chrome.bluetoothSocket.disconnect = function(socketId, opt_callback) {};
1074  * @param {number} socketId
1075  * @param {function()=} opt_callback
1076  * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
1077  */
1078 chrome.bluetoothSocket.close = function(socketId, opt_callback) {};
1082  * @param {number} socketId
1083  * @param {!ArrayBuffer} data
1084  * @param {function(number)=} opt_callback
1085  * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
1086  */
1087 chrome.bluetoothSocket.send = function(socketId, data, opt_callback) {};
1091  * @param {number} socketId
1092  * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
1093  * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
1094  */
1095 chrome.bluetoothSocket.getInfo = function(socketId, callback) {};
1099  * @param {function(!Array.<!chrome.bluetoothSocket.SocketInfo>)} callback
1100  * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
1101  */
1102 chrome.bluetoothSocket.getSockets = function(callback) {};
1107  * @constructor
1108  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
1109  */
1110 chrome.bluetoothSocket.AcceptEventData = function() {};
1113 /** @type {number} */
1114 chrome.bluetoothSocket.AcceptEventData.prototype.socketId;
1117 /** @type {number} */
1118 chrome.bluetoothSocket.AcceptEventData.prototype.clientSocketId;
1123  * Event whose listeners take a AcceptEventData parameter.
1124  * @constructor
1125  */
1126 chrome.bluetoothSocket.AcceptEvent = function() {};
1130  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1131  */
1132 chrome.bluetoothSocket.AcceptEvent.prototype.addListener =
1133     function(callback) {};
1137  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1138  */
1139 chrome.bluetoothSocket.AcceptEvent.prototype.removeListener =
1140     function(callback) {};
1144  * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1145  * @return {boolean}
1146  */
1147 chrome.bluetoothSocket.AcceptEvent.prototype.hasListener =
1148     function(callback) {};
1151 /** @return {boolean} */
1152 chrome.bluetoothSocket.AcceptEvent.prototype.hasListeners = function() {};
1155 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
1156 chrome.bluetoothSocket.onAccept;
1161  * @constructor
1162  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
1163  */
1164 chrome.bluetoothSocket.AcceptErrorEventData = function() {};
1167 /** @type {number} */
1168 chrome.bluetoothSocket.AcceptErrorEventData.prototype.socketId;
1171 /** @type {string} */
1172 chrome.bluetoothSocket.AcceptErrorEventData.prototype.errorMessage;
1175 /** @type {string} */
1176 chrome.bluetoothSocket.AcceptErrorEventData.prototype.error;
1181  * Event whose listeners take a AcceptErrorEventData parameter.
1182  * @constructor
1183  */
1184 chrome.bluetoothSocket.AcceptErrorEvent = function() {};
1188  * @param {function(
1189  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1190  */
1191 chrome.bluetoothSocket.AcceptErrorEvent.prototype.addListener =
1192     function(callback) {};
1196  * @param {function(
1197  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1198  */
1199 chrome.bluetoothSocket.AcceptErrorEvent.prototype.removeListener =
1200     function(callback) {};
1204  * @param {function(
1205  *     !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1206  * @return {boolean}
1207  */
1208 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListener =
1209     function(callback) {};
1212 /** @return {boolean} */
1213 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListeners =
1214     function() {};
1217 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1218 chrome.bluetoothSocket.onAcceptError;
1223  * @constructor
1224  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1225  */
1226 chrome.bluetoothSocket.ReceiveEventData = function() {};
1229 /** @type {number} */
1230 chrome.bluetoothSocket.ReceiveEventData.prototype.socketId;
1233 /** @type {!ArrayBuffer} */
1234 chrome.bluetoothSocket.ReceiveEventData.prototype.data;
1239  * Event whose listeners take a ReceiveEventData parameter.
1240  * @constructor
1241  */
1242 chrome.bluetoothSocket.ReceiveEvent = function() {};
1246  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1247  */
1248 chrome.bluetoothSocket.ReceiveEvent.prototype.addListener =
1249     function(callback) {};
1253  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1254  */
1255 chrome.bluetoothSocket.ReceiveEvent.prototype.removeListener =
1256     function(callback) {};
1260  * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1261  * @return {boolean}
1262  */
1263 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListener =
1264     function(callback) {};
1267 /** @return {boolean} */
1268 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListeners = function() {};
1271 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1272 chrome.bluetoothSocket.onReceive;
1277  * @constructor
1278  * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1279  */
1280 chrome.bluetoothSocket.ReceiveErrorEventData = function() {};
1283 /** @type {number} */
1284 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.socketId;
1287 /** @type {string} */
1288 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.errorMessage;
1291 /** @type {string} */
1292 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.error;
1297  * Event whose listeners take a ReceiveErrorEventData parameter.
1298  * @constructor
1299  */
1300 chrome.bluetoothSocket.ReceiveErrorEvent = function() {};
1304  * @param {function(
1305  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1306  */
1307 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.addListener =
1308     function(callback) {};
1312  * @param {function(
1313  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1314  */
1315 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.removeListener =
1316     function(callback) {};
1320  * @param {function(
1321  *     !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1322  * @return {boolean}
1323  */
1324 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListener =
1325     function(callback) {};
1328 /** @return {boolean} */
1329 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListeners =
1330     function() {};
1333 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1334 chrome.bluetoothSocket.onReceiveError;
1338  * @see https://developer.chrome.com/apps/bluetoothLowEnergy
1339  * @const
1340  */
1341 chrome.bluetoothLowEnergy = {};
1345  * @constructor
1346  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Service
1347  */
1348 chrome.bluetoothLowEnergy.Service = function() {};
1351 /** @type {string} */
1352 chrome.bluetoothLowEnergy.Service.prototype.uuid;
1355 /** @type {boolean} */
1356 chrome.bluetoothLowEnergy.Service.prototype.isPrimary;
1359 /** @type {string|undefined} */
1360 chrome.bluetoothLowEnergy.Service.prototype.instanceId;
1363 /** @type {string|undefined} */
1364 chrome.bluetoothLowEnergy.Service.prototype.deviceAddress;
1368  * @constructor
1369  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Characteristic
1370  */
1371 chrome.bluetoothLowEnergy.Characteristic = function() {};
1374 /** @type {string} */
1375 chrome.bluetoothLowEnergy.Characteristic.prototype.uuid;
1378 /** @type {!chrome.bluetoothLowEnergy.Service} */
1379 chrome.bluetoothLowEnergy.Characteristic.prototype.service;
1382 /** @type {!Array.<string>} */
1383 chrome.bluetoothLowEnergy.Characteristic.prototype.properties;
1386 /** @type {string|undefined} */
1387 chrome.bluetoothLowEnergy.Characteristic.prototype.instanceId;
1390 /** @type {!ArrayBuffer|undefined} */
1391 chrome.bluetoothLowEnergy.Characteristic.prototype.value;
1395  * @constructor
1396  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Descriptor
1397  */
1398 chrome.bluetoothLowEnergy.Descriptor = function() {};
1400 /** @type {string} */
1401 chrome.bluetoothLowEnergy.Descriptor.prototype.uuid;
1404 /** @type {!chrome.bluetoothLowEnergy.Characteristic} */
1405 chrome.bluetoothLowEnergy.Descriptor.prototype.characteristic;
1408 /** @type {string|undefined} */
1409 chrome.bluetoothLowEnergy.Descriptor.prototype.instanceId;
1412 /** @type {!ArrayBuffer|undefined} */
1413 chrome.bluetoothLowEnergy.Descriptor.prototype.value;
1417  * @typedef {?{
1418  *   persistent: boolean
1419  * }}
1420  */
1421 chrome.bluetoothLowEnergy.ConnectionProperties;
1425  * @param {string} deviceAddress
1426  * @param {!chrome.bluetoothLowEnergy.ConnectionProperties|function()}
1427  *     propertiesOrCallback
1428  * @param {function()=} opt_callback
1429  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect
1430  */
1431 chrome.bluetoothLowEnergy.connect =
1432   function(deviceAddress, propertiesOrCallback, opt_callback) {};
1435  * @param {string} deviceAddress
1436  * @param {function()=} opt_callback
1437  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect
1438  */
1439 chrome.bluetoothLowEnergy.disconnect = function(deviceAddress, opt_callback) {};
1443  * @param {string} serviceId
1444  * @param {function(!chrome.bluetoothLowEnergy.Service)} callback
1445  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService
1446  */
1447 chrome.bluetoothLowEnergy.getService = function(serviceId, callback) {};
1451  * @param {string} deviceAddress
1452  * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1453  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices
1454  */
1455 chrome.bluetoothLowEnergy.getServices = function(deviceAddress, callback) {};
1459  * @param {string} characteristicId
1460  * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1461  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic
1462  */
1463 chrome.bluetoothLowEnergy.getCharacteristic =
1464     function(characteristicId, callback) {};
1468  * @param {string} serviceId
1469  * @param {function(!Array.<!chrome.bluetoothLowEnergy.Characteristic>)}
1470  * callback
1471  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics
1472  */
1473 chrome.bluetoothLowEnergy.getCharacteristics =
1474     function(serviceId, callback) {};
1478  * @param {string} serviceId
1479  * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1480  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices
1481  */
1482 chrome.bluetoothLowEnergy.getIncludedServices =
1483   function(serviceId, callback) {};
1487  * @param {string} descriptorId
1488  * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1489  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor
1490  */
1491 chrome.bluetoothLowEnergy.getDescriptor = function(descriptorId, callback) {};
1495  * @param {string} characteristicId
1496  * @param {function(!Array.<!chrome.bluetoothLowEnergy.Descriptor>)} callback
1497  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors
1498  */
1499 chrome.bluetoothLowEnergy.getDescriptors =
1500   function(characteristicId, callback) {};
1504  * @param {string} characteristicId
1505  * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1506  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue
1507  */
1508 chrome.bluetoothLowEnergy.readCharacteristicValue =
1509   function(characteristicId, callback) {};
1513  * @param {string} characteristicId
1514  * @param {!ArrayBuffer} value
1515  * @param {function()} callback
1516  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue
1517  */
1518 chrome.bluetoothLowEnergy.writeCharacteristicValue =
1519   function(characteristicId, value, callback) {};
1523  * @typedef {?{
1524  *   persistent: boolean
1525  * }}
1526  */
1527 chrome.bluetoothLowEnergy.NotificationSessionProperties;
1530   * @param {string} characteristicId
1531   * @param {!chrome.bluetoothLowEnergy.NotificationSessionProperties|function()}
1532   *     propertiesOrCallback
1533   * @param {function()=} opt_callback
1534   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications
1535   */
1536 chrome.bluetoothLowEnergy.startCharacteristicNotifications =
1537   function(characteristicId, propertiesOrCallback, opt_callback) {};
1541   * @param {string} characteristicId
1542   * @param {function()=} opt_callback
1543   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications
1544   */
1545 chrome.bluetoothLowEnergy.stopCharacteristicNotifications =
1546   function(characteristicId, opt_callback) {};
1550  * @param {string} descriptorId
1551  * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1552  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue
1553  */
1554 chrome.bluetoothLowEnergy.readDescriptorValue =
1555   function(descriptorId, callback) {};
1559  * @param {string} descriptorId
1560  * @param {!ArrayBuffer} value
1561  * @param {function()} callback
1562  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue
1563  */
1564 chrome.bluetoothLowEnergy.writeDescriptorValue =
1565   function(descriptorId, value, callback) {};
1569  * Event whose listeners take a Service parameter.
1570  * @constructor
1571  */
1572 chrome.bluetoothLowEnergy.ServiceEvent = function() {};
1575 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1576 chrome.bluetoothLowEnergy.ServiceEvent.prototype.addListener =
1577     function(callback) {};
1580 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1581 chrome.bluetoothLowEnergy.ServiceEvent.prototype.removeListener =
1582     function(callback) {};
1585  * @param {function(!chrome.bluetoothLowEnergy.Service): void} callback
1586  * @return {boolean}
1587  */
1588 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListener =
1589     function(callback) {};
1592 /** @return {boolean} */
1593 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListeners =
1594     function() {};
1597   * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1598   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded
1599   */
1600 chrome.bluetoothLowEnergy.onServiceAdded;
1604  * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1605  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged
1606  */
1607 chrome.bluetoothLowEnergy.onServiceChanged;
1611   * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1612   * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved
1613   */
1614 chrome.bluetoothLowEnergy.onServiceRemoved;
1618  * Event whose listeners take a Characteristic parameter.
1619  * @constructor
1620  */
1621 chrome.bluetoothLowEnergy.CharacteristicEvent = function() {};
1625  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1626  *     callback
1627  */
1628 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.addListener =
1629     function(callback) {};
1633  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1634  *     callback
1635  */
1636 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.removeListener =
1637     function(callback) {};
1641  * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1642  *     callback
1643  * @return {boolean}
1644  */
1645 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListener =
1646     function(callback) {};
1649 /** @return {boolean} */
1650 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListeners =
1651     function() {};
1655  * @type {!chrome.bluetoothLowEnergy.CharacteristicEvent}
1656  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged
1657  */
1658 chrome.bluetoothLowEnergy.onCharacteristicValueChanged;
1662  * Event whose listeners take a Characteristic parameter.
1663  * @constructor
1664  */
1665 chrome.bluetoothLowEnergy.DescriptorEvent = function() {};
1669  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1670  *     callback
1671  */
1672 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.addListener =
1673     function(callback) {};
1677  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1678  *     callback
1679  */
1680 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.removeListener =
1681     function(callback) {};
1685  * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void} callback
1686  * @return {boolean}
1687  */
1688 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListener =
1689     function(callback) {};
1692 /** @return {boolean} */
1693 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListeners =
1694     function() {};
1698  * @type {!chrome.bluetoothLowEnergy.DescriptorEvent}
1699  * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged
1700  */
1701 chrome.bluetoothLowEnergy.onDescriptorValueChanged;
1705  * @see http://developer.chrome.com/extensions/commands.html
1706  * @const
1707  */
1708 chrome.commands = {};
1712  * @param {function(Array.<string>): void} callback Callback function.
1713  */
1714 chrome.commands.getAll = function(callback) {};
1717 /** @type {!ChromeEvent} */
1718 chrome.commands.onCommand;
1722  * @see https://developer.chrome.com/apps/copresence
1723  * @const
1724  */
1725 chrome.copresence = {};
1729  * @typedef {?{
1730  *   lowPower: (boolean|undefined),
1731  *   onlyBroadcast: (boolean|undefined),
1732  *   onlyScan: (boolean|undefined),
1733  *   audible: (boolean|undefined)
1734  * }}
1735  * @see https://developer.chrome.com/apps/copresence#type-Strategy
1736  */
1737 chrome.copresence.Strategy;
1741  * @typedef {?{
1742  *   type: string,
1743  *   payload: ArrayBuffer
1744  * }}
1745  * @see https://developer.chrome.com/apps/copresence#type-Message
1746  */
1747 chrome.copresence.Message;
1751  * @typedef {?{
1752  *   onlyEarshot: (boolean|undefined)
1753  * }}
1754  * https://developer.chrome.com/apps/copresence#type-AccessPolicy
1755  */
1756 chrome.copresence.AccessPolicy;
1760  * @typedef {?{
1761  *   id: string,
1762  *   message: !chrome.copresence.Message,
1763  *   timeToLiveMillis: (number|undefined),
1764  *   policy: (!chrome.copresence.AccessPolicy|undefined),
1765  *   strategies: (!chrome.copresence.Strategy|undefined)
1766  * }}
1767  * @see https://developer.chrome.com/apps/copresence#type-PublishOperation
1768  */
1769 chrome.copresence.PublishOperation;
1772 /** @typedef {?{type: string}} */
1773 chrome.copresence.SubscriptionFilter;
1777  * @typedef {?{
1778  *   id: string,
1779  *   filter: !chrome.copresence.SubscriptionFilter,
1780  *   timeToLiveMillis: (number|undefined),
1781  *   strategies: (!chrome.copresence.Strategy|undefined)
1782  * }}
1783  * @see https://developer.chrome.com/apps/copresence#type-SubscribeOperation
1784  */
1785 chrome.copresence.SubscribeOperation;
1789  * @typedef {?{
1790  *   unpublishId: string
1791  * }}
1792  * @see https://developer.chrome.com/apps/copresence#type-UnpublishOperation
1793  */
1794 chrome.copresence.UnpublishOperation;
1798  * @typedef {?{
1799  *   unsubscribeId: string
1800  * }}
1801  * @see https://developer.chrome.com/apps/copresence#type-UnsubscribeOperation
1802  */
1803 chrome.copresence.UnsubscribeOperation;
1807  * @typedef {?{
1808  *   publish: (!chrome.copresence.PublishOperation|undefined),
1809  *   subscribe: (!chrome.copresence.SubscribeOperation|undefined),
1810  *   unpublish: (!chrome.copresence.UnpublishOperation|undefined),
1811  *   unsubscribe: (!chrome.copresence.UnsubscribeOperation|undefined)
1812  * }}
1813  * @see https://developer.chrome.com/apps/copresence#type-Operation
1814  */
1815 chrome.copresence.Operation;
1819  * @param {!Array.<!chrome.copresence.Operation>} operations
1820  * @param {function(string): void} callback
1821  * @see https://developer.chrome.com/apps/copresence#method-execute
1822  */
1823 chrome.copresence.execute = function(operations, callback) {};
1828  * Event whose listeners take a subscription id and received messages as a
1829  * parameter.
1830  * @constructor
1831  * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1832  */
1833 chrome.copresence.MessagesReceivedEvent = function() {};
1837  * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1838  */
1839 chrome.copresence.MessagesReceivedEvent.prototype.addListener =
1840     function(callback) {};
1844  * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1845  */
1846 chrome.copresence.MessagesReceivedEvent.prototype.removeListener =
1847     function(callback) {};
1851  * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1852  * @return {boolean}
1853  */
1854 chrome.copresence.MessagesReceivedEvent.prototype.hasListener =
1855     function(callback) {};
1858 /** @return {boolean} */
1859 chrome.copresence.MessagesReceivedEvent.prototype.hasListeners = function() {};
1863  * @type {!chrome.copresence.MessagesReceivedEvent}
1864  * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1865  */
1866 chrome.copresence.onMessagesReceived;
1870  * @type {!ChromeStringEvent}
1871  * @see https://developer.chrome.com/apps/copresence#event-onStatusUpdated
1872  */
1873 chrome.copresence.onStatusUpdated;
1877  * @see https://developer.chrome.com/extensions/enterprise_platformKeys
1878  * @const
1879  */
1880 chrome.enterprise = {};
1884  * @constructor
1885  * platformKeys allows for generating hardware-backed keys and the installation
1886  * of certificates for these keys.
1887  * @see https://developer.chrome.com/extensions/enterprise_platformKeys.
1888  */
1889 chrome.enterprise.platformKeys = function() {};
1893  * @constructor
1894  * @see https://developer.chrome.com/extensions/enterprise_platformKeys#type-Token
1895  */
1896 chrome.enterprise.Token = function() {};
1900  * @type {string} Unique id for the Token, either "user" or "system."
1901  */
1902 chrome.enterprise.Token.prototype.id;
1906  * @type {!webCrypto.SubtleCrypto} Implements the WebCrypto's
1907  *     SubtleCrypto interface. The cryptographic operations, including key
1908  *     generation, are hardware-backed.
1909  */
1910 chrome.enterprise.Token.prototype.subtleCrypto;
1914  * @param {function(!Array.<!chrome.enterprise.Token>): void} callback Called
1915  * with an array of Tokens.
1916  */
1917 chrome.enterprise.platformKeys.getTokens = function(callback) {};
1921  * @param {string} tokenId Id of cetificate token either "user" or "system".
1922  * @param {(function(!Array.<!ArrayBuffer>): void)} callback Array of DER
1923  *     encoded x.509 certificates.
1924  */
1925 chrome.enterprise.platformKeys.getCertificates = function(tokenId, callback) {};
1929  * @param {string} tokenId The id of a Token returned by getTokens.
1930  * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1931  * @param {function(): void=} opt_callback Called back when this operation is
1932  *     finished.
1933  */
1934 chrome.enterprise.platformKeys.importCertificate =
1935     function(tokenId, certificate, opt_callback) {};
1939  * @param {string} tokenId The id of a Token returned by getTokens.
1940  * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1941  * @param {(function(): void)=} opt_callback Called back when this operation is
1942  *     finished.
1943  */
1944 chrome.enterprise.platformKeys.removeCertificate =
1945     function(tokenId, certificate, opt_callback) {};
1949  * @see https://developer.chrome.com/extensions/extension.html
1950  * @const
1951  */
1952 chrome.extension = {};
1955 /** @type {!Object|undefined} */
1956 chrome.extension.lastError = {};
1960  * @type {string|undefined}
1961  */
1962 chrome.extension.lastError.message;
1965 /** @type {boolean|undefined} */
1966 chrome.extension.inIncognitoContext;
1969 // TODO: change Object to !Object when it's clear nobody is passing in null
1970 // TODO: change Port to !Port since it should never be null
1972  * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
1973  *     extensionId to connect to, in which case connectInfo params can be
1974  *     passed in the next optional argument, or the connectInfo params.
1975  * @param {Object.<string>=} opt_connectInfo The connectInfo object,
1976  *     if arg1 was the extensionId to connect to.
1977  * @return {Port} New port.
1978  */
1979 chrome.extension.connect = function(
1980     opt_extensionIdOrConnectInfo, opt_connectInfo) {};
1984  * @return {Window} The global JS object for the background page.
1985  */
1986 chrome.extension.getBackgroundPage = function() {};
1990  * @param {string} path A path to a resource within an extension expressed
1991  *     relative to it's install directory.
1992  * @return {string} The fully-qualified URL to the resource.
1993  */
1994 chrome.extension.getURL = function(path) {};
1998  * @param {Object=} opt_fetchProperties An object with optional 'type' and
1999  *     optional 'windowId' keys.
2000  * @return {Array.<Window>} The global JS objects for each content view.
2001  */
2002 chrome.extension.getViews = function(opt_fetchProperties) {};
2006  * @param {function(boolean): void} callback Callback function.
2007  */
2008 chrome.extension.isAllowedFileSchemeAccess = function(callback) {};
2012  * @param {function(boolean): void} callback Callback function.
2013  */
2014 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
2018  * @param {string|*} extensionIdOrRequest Either the extensionId to send the
2019  *     request to, in which case the request is passed as the next arg, or the
2020  *     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.sendMessage = function(
2026     extensionIdOrRequest, opt_request, opt_callback) {};
2030  * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
2031  *     in which case the request is passed as the next arg, or the request.
2032  * @param {*=} opt_request The request value, if arg1 was the extensionId.
2033  * @param {function(*): void=} opt_callback The callback function which
2034  *     takes a JSON response object sent by the handler of the request.
2035  */
2036 chrome.extension.sendRequest = function(opt_arg1, opt_request, opt_callback) {};
2040  * @param {string} data
2041  */
2042 chrome.extension.setUpdateUrlData = function(data) {};
2045 /** @type {!ChromeEvent} */
2046 chrome.extension.onConnect;
2049 /** @type {!ChromeEvent} */
2050 chrome.extension.onConnectExternal;
2053 /** @type {!ChromeEvent} */
2054 chrome.extension.onMessage;
2057 /** @type {!ChromeEvent} */
2058 chrome.extension.onRequest;
2061 /** @type {!ChromeEvent} */
2062 chrome.extension.onRequestExternal;
2066 /** @type {string} */
2067 chrome.runtime.id;
2071  * @param {function(!Window=): void} callback Callback function.
2072  */
2073 chrome.runtime.getBackgroundPage = function(callback) {};
2077  * @param {function(): void=} opt_callback Callback function.
2078  */
2079 chrome.runtime.openOptionsPage = function(opt_callback) {};
2083  * Manifest information returned from chrome.runtime.getManifest. See
2084  * http://developer.chrome.com/extensions/manifest.html. Note that there are
2085  * several other fields not included here. They should be added to these externs
2086  * as needed.
2087  * @constructor
2088  */
2089 chrome.runtime.Manifest = function() {};
2092 /** @type {string} */
2093 chrome.runtime.Manifest.prototype.name;
2096 /** @type {string} */
2097 chrome.runtime.Manifest.prototype.version;
2100 /** @type {number|undefined} */
2101 chrome.runtime.Manifest.prototype.manifest_version;
2104 /** @type {string|undefined} */
2105 chrome.runtime.Manifest.prototype.description;
2108 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
2109 chrome.runtime.Manifest.prototype.oauth2;
2112 /** @type {!Array.<(string|!Object)>} */
2113 chrome.runtime.Manifest.prototype.permissions;
2118  * Oauth2 info in the manifest.
2119  * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
2120  * @constructor
2121  */
2122 chrome.runtime.Manifest.Oauth2 = function() {};
2125 /** @type {string} */
2126 chrome.runtime.Manifest.Oauth2.prototype.client_id;
2129 /**@type {!Array.<string>} */
2130 chrome.runtime.Manifest.Oauth2.prototype.scopes;
2134  * http://developer.chrome.com/extensions/runtime.html#method-getManifest
2135  * @return {!chrome.runtime.Manifest} The full manifest file of the app or
2136  *     extension.
2137  */
2138 chrome.runtime.getManifest = function() {};
2142  * @param {string} path A path to a resource within an extension expressed
2143  *     relative to it's install directory.
2144  * @return {string} The fully-qualified URL to the resource.
2145  */
2146 chrome.runtime.getURL = function(path) {};
2150  * @param {string} url This may be used to clean up server-side data, do
2151  *     analytics, and implement surveys. Maximum 255 characters.
2152  */
2153 chrome.runtime.setUninstallUrl = function(url) {};
2157  * Reloads the app or extension.
2158  */
2159 chrome.runtime.reload = function() {};
2163  * @param {function(string, !Object=): void} callback Called with "throttled",
2164  *     "no_update", or "update_available". If an update is available, the object
2165  *     contains more information about the available update.
2166  */
2167 chrome.runtime.requestUpdateCheck = function(callback) {};
2171  * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
2172  * no-op.
2173  */
2174 chrome.runtime.restart = function() {};
2179  * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
2180  * @param {string} application Name of the registered native messaging host to
2181  *     connect to, like 'com.google.your_product'.
2182  * @return {!Port} New port.
2183  */
2184 chrome.runtime.connectNative = function(application) {};
2188  * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
2189  * @param {string} application Name of the registered native messaging host to
2190  *     connect to, like 'com.google.your_product'.
2191  * @param {Object} message The message that will be passed to the native
2192  *     messaging host.
2193  * @param {function(*)=} opt_callback Called with the response message sent by
2194  *     the native messaging host. If an error occurs while connecting to the
2195  *     native messaging host, the callback will be called with no arguments and
2196  *     chrome.runtime.lastError will be set to the error message.
2197  */
2198 chrome.runtime.sendNativeMessage = function(
2199     application, message, opt_callback) {};
2204  * @param {function(!Object)} callback
2205  */
2206 chrome.runtime.getPlatformInfo = function(callback) {};
2210  * @param {function(!DirectoryEntry)} callback
2211  */
2212 chrome.runtime.getPackageDirectoryEntry = function(callback) {};
2215 /** @type {!chrome.runtime.PortEvent} */
2216 chrome.runtime.onConnect;
2219 /** @type {!chrome.runtime.PortEvent} */
2220 chrome.runtime.onConnectExternal;
2223 /** @type {!ChromeObjectEvent} */
2224 chrome.runtime.onInstalled;
2227 /** @type {!chrome.runtime.MessageSenderEvent} */
2228 chrome.runtime.onMessage;
2231 /** @type {!chrome.runtime.MessageSenderEvent} */
2232 chrome.runtime.onMessageExternal;
2235 /** @type {!ChromeEvent} */
2236 chrome.runtime.onStartup;
2239 /** @type {!ChromeEvent} */
2240 chrome.runtime.onSuspend;
2243 /** @type {!ChromeEvent} */
2244 chrome.runtime.onSuspendCanceled;
2247 /** @type {!ChromeObjectEvent} */
2248 chrome.runtime.onUpdateAvailable;
2251 /** @type {!ChromeStringEvent} */
2252 chrome.runtime.onRestartRequired;
2257  * Event whose listeners take a Port parameter.
2258  * @constructor
2259  */
2260 chrome.runtime.PortEvent = function() {};
2264  * @param {function(!Port): void} callback Callback.
2265  */
2266 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
2270  * @param {function(!Port): void} callback Callback.
2271  */
2272 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
2276  * @param {function(!Port): void} callback Callback.
2277  * @return {boolean}
2278  */
2279 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
2283  * @return {boolean}
2284  */
2285 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
2290  * Event whose listeners take a MessageSender and additional parameters.
2291  * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
2292  * @constructor
2293  */
2294 chrome.runtime.MessageSenderEvent = function() {};
2298  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2299  *     callback Callback.
2300  */
2301 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
2305  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2306  *     callback Callback.
2307  */
2308 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
2309     {};
2313  * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2314  *     callback Callback.
2315  * @return {boolean}
2316  */
2317 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
2321  * @return {boolean}
2322  */
2323 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
2327  * @const
2328  * @see https://developer.chrome.com/extensions/tabs.html
2329  */
2330 chrome.tabs = {};
2334  * @typedef {?{
2335  *   code: (string|undefined),
2336  *   file: (string|undefined),
2337  *   allFrames: (boolean|undefined),
2338  *   matchAboutBlank: (boolean|undefined),
2339  *   runAt: (string|undefined)
2340  * }}
2341  */
2342 chrome.tabs.InjectDetails;
2346  * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
2347  * @param {number|!chrome.types.ImageDetails|function(string):void}
2348  *     windowIdOrOptionsOrCallback One of:
2349  *     The target window.
2350  *     An object defining details about the format and quality of an image, in
2351  *     which case the window defaults to the current window.
2352  *     A callback function which accepts the data URL string of a JPEG encoding
2353  *     of the visible area of the captured tab.
2354  * @param {(!chrome.types.ImageDetails|function(string):void)=}
2355  *     opt_optionsOrCallback Either an object defining details about the
2356  *     format and quality of an image, or a callback function which accepts the
2357  *     data URL string of a JPEG encoding of the visible area of the captured
2358  *     tab.
2359  * @param {function(string):void=} opt_callback A callback function which
2360  *     accepts the data URL string of a JPEG encoding of the visible area of the
2361  *     captured tab.
2362  */
2363 chrome.tabs.captureVisibleTab = function(windowIdOrOptionsOrCallback,
2364     opt_optionsOrCallback, opt_callback) {};
2368  * @param {number} tabId Tab Id.
2369  * @param {{name: (string|undefined)}=} connectInfo Info Object.
2370  */
2371 chrome.tabs.connect = function(tabId, connectInfo) {};
2375  * @typedef {?{
2376  *   windowId: (number|undefined),
2377  *   index: (number|undefined),
2378  *   url: (string|undefined),
2379  *   active: (boolean|undefined),
2380  *   pinned: (boolean|undefined),
2381  *   openerTabId: (number|undefined)
2382  * }}
2383  */
2384 chrome.tabs.CreateProperties;
2388  * @param {!chrome.tabs.CreateProperties} createProperties Info object.
2389  * @param {function(!Tab): void=} opt_callback The callback function.
2390  */
2391 chrome.tabs.create = function(createProperties, opt_callback) {};
2395  * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
2396  * @param {number|function(string): void} tabIdOrCallback The tab id, or a
2397  *     callback function that will be invoked with the language of the active
2398  *     tab in the current window.
2399  * @param {function(string): void=} opt_callback An optional callback function
2400  *     that will be invoked with the language of the tab specified as first
2401  *     argument.
2402  */
2403 chrome.tabs.detectLanguage = function(tabIdOrCallback, opt_callback) {};
2407  * @see https://developer.chrome.com/extensions/tabs#method-executeScript
2408  * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2409  *     Either the id of the tab in which to run the script, or an object
2410  *     containing the details of the script to run, in which case the script
2411  *     will be executed in the active tab of the current window.
2412  * @param {(!chrome.tabs.InjectDetails|function(!Array.<*>):void)=}
2413  *     opt_detailsOrCallback Either an object containing the details of the
2414  *     script to run, if the tab id was speficied as first argument, or a
2415  *     callback that will be invoked with the result of the execution of the
2416  *     script in every injected frame.
2417  * @param {function(!Array.<*>):void=} opt_callback A callback that will be
2418  *     invoked with the result of the execution of the script in every
2419  *     injected frame.
2420  */
2421 chrome.tabs.executeScript = function(tabIdOrDetails, opt_detailsOrCallback,
2422     opt_callback) {};
2426  * @param {number} tabId Tab id.
2427  * @param {function(!Tab): void} callback Callback.
2428  */
2429 chrome.tabs.get = function(tabId, callback) {};
2433  * Note (2014-05-21): Because this function is deprecated, the types of it's
2434  * parameters were not upgraded to make the first parameter optional and to mark
2435  * the Array and Tab in the callback as non-null.
2437  * @param {number?} windowId Window id.
2438  * @param {function(Array.<Tab>): void} callback Callback.
2439  * @deprecated Please use tabs.query {windowId: windowId}.
2440  */
2441 chrome.tabs.getAllInWindow = function(windowId, callback) {};
2445  * @param {function(!Tab=): void} callback Callback.
2446  */
2447 chrome.tabs.getCurrent = function(callback) {};
2451  * Note (2014-05-21): Because this function is deprecated, the types of it's
2452  * parameters were not upgraded to make the first parameter optional and to mark
2453  * the Array and Tab in the callback as non-null.
2455  * @param {number?} windowId Window id.
2456  * @param {function(Tab): void} callback Callback.
2457  * @deprecated Please use tabs.query({active: true}).
2458  */
2459 chrome.tabs.getSelected = function(windowId, callback) {};
2463  * @typedef {?{
2464  *   windowId: (number|undefined),
2465  *   tabs: (number|!Array.<number>)
2466  * }}
2467  */
2468 chrome.tabs.HighlightInfo;
2472  * @param {!chrome.tabs.HighlightInfo} highlightInfo
2473  * @param {function(!Window): void} callback Callback function invoked
2474  *    with each appropriate Window.
2475  */
2476 chrome.tabs.highlight = function(highlightInfo, callback) {};
2480  * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
2481  * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2482  *     Either the id of the tab in which to run the script, or an object
2483  *     containing the details of the CSS to insert, in which case the script
2484  *     will be executed in the active tab of the current window.
2485  * @param {(!chrome.tabs.InjectDetails|function():void)=}
2486  *     opt_detailsOrCallback Either an object containing the details of the
2487  *     CSS to insert, if the tab id was speficied as first argument, or a
2488  *     callback that will be invoked after the CSS has been injected.
2489  * @param {function():void=} opt_callback A callback that will be invoked after
2490  *     the CSS has been injected.
2491  */
2492 chrome.tabs.insertCSS = function(tabIdOrDetails, opt_detailsOrCallback,
2493     opt_callback) {};
2497  * @typedef {?{
2498  *   windowId: (number|undefined),
2499  *   index: number
2500  * }}
2501  */
2502 chrome.tabs.MoveProperties;
2506  * @param {number|!Array.<number>} tabId Tab id or array of tab ids.
2507  * @param {!chrome.tabs.MoveProperties} moveProperties
2508  * @param {function((!Tab|!Array.<!Tab>)): void=} opt_callback Callback.
2509  */
2510 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
2514  * @typedef {?{
2515  *   active: (boolean|undefined),
2516  *   pinned: (boolean|undefined),
2517  *   highlighted: (boolean|undefined),
2518  *   currentWindow: (boolean|undefined),
2519  *   lastFocusedWindow: (boolean|undefined),
2520  *   status: (string|undefined),
2521  *   title: (string|undefined),
2522  *   url: (string|undefined),
2523  *   windowId: (number|undefined),
2524  *   windowType: (string|undefined),
2525  *   index: (number|undefined)
2526  * }}
2527  */
2528 chrome.tabs.QueryInfo;
2532  * @param {!chrome.tabs.QueryInfo} queryInfo
2533  * @param {function(!Array.<!Tab>): void} callback Callback.
2534  */
2535 chrome.tabs.query = function(queryInfo, callback) {};
2539  * @see https://developer.chrome.com/extensions/tabs#method-query
2540  * @param {number} tabId The ID of the tab which is to be duplicated.
2541  * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
2542  *     details about the duplicated tab.
2543  */
2544 chrome.tabs.duplicate = function(tabId, opt_callback) {};
2548  * @typedef {?{
2549  *   bypassCache: (boolean|undefined)
2550  * }}
2551  */
2552 chrome.tabs.ReloadProperties;
2556  * @see https://developer.chrome.com/extensions/tabs#method-reload
2557  * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
2558  *     opt_tabIdOrReloadPropertiesOrCallback One of:
2559  *     The ID of the tab to reload; defaults to the selected tab of the current
2560  *     window.
2561  *     An object specifying boolean flags to customize the reload operation.
2562  *     A callback to be invoked when the reload is complete.
2563  * @param {(!chrome.tabs.ReloadProperties|function():void)=}
2564  *     opt_reloadPropertiesOrCallback Either an object specifying boolean flags
2565  *     to customize the reload operation, or a callback to be invoked when the
2566  *     reload is complete, if no object needs to be specified.
2567  * @param {function():void=} opt_callback  A callback to be invoked when the
2568  *     reload is complete.
2569  */
2570 chrome.tabs.reload = function(opt_tabIdOrReloadPropertiesOrCallback,
2571     opt_reloadPropertiesOrCallback, opt_callback) {};
2575  * @param {number|!Array.<number>} tabIds A tab ID or an array of tab IDs.
2576  * @param {function(): void=} opt_callback Callback.
2577  */
2578 chrome.tabs.remove = function(tabIds, opt_callback) {};
2582  * @param {number} tabId Tab id.
2583  * @param {*} request The request value of any type.
2584  * @param {function(*): void=} opt_callback The callback function which
2585  *     takes a JSON response object sent by the handler of the request.
2586  */
2587 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
2591  * @param {number} tabId Tab id.
2592  * @param {*} request The request value of any type.
2593  * @param {function(*): void=} opt_callback The callback function which
2594  *     takes a JSON response object sent by the handler of the request.
2595  * @deprecated Please use runtime.sendMessage.
2596  */
2597 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
2601  * @typedef {?{
2602  *   url: (string|undefined),
2603  *   active: (boolean|undefined),
2604  *   highlighted: (boolean|undefined),
2605  *   pinned: (boolean|undefined),
2606  *   openerTabId: (number|undefined)
2607  * }}
2608  */
2609 chrome.tabs.UpdateProperties;
2613  * @see https://developer.chrome.com/extensions/tabs#method-update
2614  * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
2615  *     Either the id of the tab to update, or an object with new property
2616  *     values, in which case the selected tab of the current window will be
2617  *     updated.
2618  * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
2619  *     opt_updatePropertiesOrCallback Either an object with new property values,
2620  *     if the tabId was specified as first parameter, or an optional callback
2621  *     that will be invoked with information about the tab being updated.
2622  * @param {function(!Tab=): void=} opt_callback An optional callback that will
2623  *     be invoked with information about the tab being updated.
2624  */
2625 chrome.tabs.update = function(tabIdOrUpdateProperties,
2626     opt_updatePropertiesOrCallback, opt_callback) {};
2630  * @type {!ChromeEvent}
2631  * @deprecated Please use tabs.onActivated.
2632  */
2633 chrome.tabs.onActiveChanged;
2636 /** @type {!ChromeEvent} */
2637 chrome.tabs.onActivated;
2640 /** @type {!ChromeEvent} */
2641 chrome.tabs.onAttached;
2644 /** @type {!ChromeEvent} */
2645 chrome.tabs.onCreated;
2648 /** @type {!ChromeEvent} */
2649 chrome.tabs.onDetached;
2653  * @type {!ChromeEvent}
2654  * @deprecated Please use tabs.onHighlighted.
2655  */
2656 chrome.tabs.onHighlightChanged;
2660  * @type {!ChromeEvent}
2661  */
2662 chrome.tabs.onHighlighted;
2665 /** @type {!ChromeEvent} */
2666 chrome.tabs.onMoved;
2669 /** @type {!ChromeEvent} */
2670 chrome.tabs.onRemoved;
2673 /** @type {!ChromeEvent} */
2674 chrome.tabs.onUpdated;
2677 /** @type {!ChromeEvent} */
2678 chrome.tabs.onReplaced;
2680 // DEPRECATED:
2681 // TODO(user): Remove once all usage has been confirmed to have ended.
2685  * @type {!ChromeEvent}
2686  * @deprecated Please use tabs.onActivated.
2687  */
2688 chrome.tabs.onSelectionChanged;
2692  * @see https://developer.chrome.com/extensions/topSites
2693  * @const
2694  */
2695 chrome.topSites = {};
2700  * @constructor
2701  * @see https://developer.chrome.com/extensions/topSites#type-MostVisitedURL
2702  */
2703 chrome.topSites.MostVisitedURL = function() {};
2706 /** @type {string} */
2707 chrome.topSites.MostVisitedURL.prototype.url;
2710 /** @type {string} */
2711 chrome.topSites.MostVisitedURL.prototype.title;
2715  * Gets a list of top sites.
2716  * @param {function(!Array<!chrome.topSites.MostVisitedURL>)} callback Invoked
2717  *     with a list of most visited URLs.
2718  * @see https://developer.chrome.com/extensions/topSites#method-get
2719  */
2720 chrome.topSites.get = function(callback) {};
2724  * @const
2725  * @see https://developer.chrome.com/extensions/windows.html
2726  */
2727 chrome.windows = {};
2731  * @param {Object=} opt_createData May have many keys to specify parameters.
2732  *     Or the callback.
2733  * @param {function(ChromeWindow): void=} opt_callback Callback.
2734  */
2735 chrome.windows.create = function(opt_createData, opt_callback) {};
2739  * @param {number} id Window id.
2740  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2741  * @param {function(!ChromeWindow): void=} opt_callback Callback when
2742  *     opt_getInfo is an object.
2743  */
2744 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
2748  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2749  * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
2750  */
2751 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
2755  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2756  * @param {function(ChromeWindow): void=} opt_callback Callback.
2757  */
2758 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
2762  * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2763  * @param {function(ChromeWindow): void=} opt_callback Callback.
2764  */
2765 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
2769  * @param {number} tabId Tab Id.
2770  * @param {function(): void=} opt_callback Callback.
2771  */
2772 chrome.windows.remove = function(tabId, opt_callback) {};
2776  * @param {number} tabId Tab Id.
2777  * @param {Object} updateProperties An object which may have many keys for
2778  *     various options.
2779  * @param {function(): void=} opt_callback Callback.
2780  */
2781 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
2784 /** @type {!ChromeEvent} */
2785 chrome.windows.onCreated;
2788 /** @type {!ChromeEvent} */
2789 chrome.windows.onFocusChanged;
2792 /** @type {!ChromeEvent} */
2793 chrome.windows.onRemoved;
2797  * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2798  * @type {number}
2799  */
2800 chrome.windows.WINDOW_ID_NONE;
2804  * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2805  * @type {number}
2806  */
2807 chrome.windows.WINDOW_ID_CURRENT;
2811  * @const
2812  * @see https://developer.chrome.com/extensions/i18n.html
2813  */
2814 chrome.i18n = {};
2818  * @param {function(Array.<string>): void} callback The callback function which
2819  *     accepts an array of the accept languages of the browser, such as
2820  *     'en-US','en','zh-CN'.
2821  */
2822 chrome.i18n.getAcceptLanguages = function(callback) {};
2826  * @param {string} messageName
2827  * @param {(string|Array.<string>)=} opt_args
2828  * @return {string}
2829  */
2830 chrome.i18n.getMessage = function(messageName, opt_args) {};
2834  * @return {string}
2835  */
2836 chrome.i18n.getUILanguage = function() {};
2840  * @const
2841  * @see https://developer.chrome.com/extensions/pageAction.html
2842  */
2843 chrome.pageAction = {};
2847  * @param {number} tabId Tab Id.
2848  */
2849 chrome.pageAction.hide = function(tabId) {};
2853  * @param {Object} details An object which has 'tabId' and either
2854  *     'imageData' or 'path'.
2855  */
2856 chrome.pageAction.setIcon = function(details) {};
2860  * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2861  */
2862 chrome.pageAction.setPopup = function(details) {};
2866  * @param {Object} details An object which has 'tabId' and 'title'.
2867  */
2868 chrome.pageAction.setTitle = function(details) {};
2872  * @param {number} tabId Tab Id.
2873  */
2874 chrome.pageAction.show = function(tabId) {};
2877 /** @type {!ChromeEvent} */
2878 chrome.pageAction.onClicked;
2882  * @const
2883  * @see https://developer.chrome.com/apps/browser
2884  */
2885 chrome.browser = {};
2889  * @param {{url: string}} details An object with a single 'url' key.
2890  * @param {(function(): void)=} opt_callback The callback function. If an error
2891  * occurs opening the URL, chrome.runtime.lastError will be set to the error
2892  * message.
2893  */
2894 chrome.browser.openTab = function(details, opt_callback) {};
2898  * @const
2899  * @see https://developer.chrome.com/extensions/browserAction.html
2900  */
2901 chrome.browserAction = {};
2905  * @typedef {?{
2906  *   tabId: (number|undefined)
2907  * }}
2908  */
2909 chrome.browserAction.Tab;
2913  * @typedef {Array<number>}
2914  * @see https://developer.chrome.com/extensions/browserAction#type-ColorArray
2915  */
2916 chrome.browserAction.ColorArray;
2920  * @typedef {{
2921  *   imageData: (!ImageData|!Object.<number, !ImageData>|undefined),
2922  *   path: (string|!Object.<number, string>|undefined),
2923  *   tabId: (number|undefined)
2924  * }}
2925  */
2926 chrome.browserAction.SetIconImageData;
2930  * @param {{
2931  *   title: string,
2932  *   tabId: (number|undefined)
2933  * }} details
2934  * @see https://developer.chrome.com/extensions/browserAction#method-setTitle
2935  */
2936 chrome.browserAction.setTitle = function(details) {};
2940  * @param {!chrome.browserAction.Tab} details
2941  * @param {function(string): void} callback
2942  * @see https://developer.chrome.com/extensions/browserAction#method-getTitle
2943  */
2944 chrome.browserAction.getTitle = function(details, callback) {};
2948  * @param {!chrome.browserAction.SetIconImageData} details
2949  * @param {function(): void=} opt_callback
2950  * @see https://developer.chrome.com/extensions/browserAction#method-setIcon
2951  */
2952 chrome.browserAction.setIcon = function(details, opt_callback) {};
2956  * @param {{
2957  *   tabId: (number|undefined),
2958  *   popup: string
2959  * }} details
2960  * @see https://developer.chrome.com/extensions/browserAction#method-setPopup
2961  */
2962 chrome.browserAction.setPopup = function(details) {};
2966  * @param {!chrome.browserAction.Tab} details
2967  * @param {function(string): void} callback
2968  * @see https://developer.chrome.com/extensions/browserAction#method-getPopup
2969  */
2970 chrome.browserAction.getPopup = function(details, callback) {};
2974  * @param {{
2975  *   text: string,
2976  *   tabId: (number|undefined)
2977  * }} details
2978  * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeText
2979  */
2980 chrome.browserAction.setBadgeText = function(details) {};
2984  * @param {!chrome.browserAction.Tab} details
2985  * @param {function(string): void} callback
2986  * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeText
2987  */
2988 chrome.browserAction.getBadgeText = function(details, callback) {};
2992  * @param {{
2993  *   color: (string|chrome.browserAction.ColorArray),
2994  *   tabId: (number|undefined)
2995  * }} details
2996  * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeBackgroundColor
2997  */
2998 chrome.browserAction.setBadgeBackgroundColor = function(details) {};
3002  * @param {!chrome.browserAction.Tab} details
3003  * @param {function(chrome.browserAction.ColorArray): void} callback
3004  * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeBackgroundColor
3005  */
3006 chrome.browserAction.getBadgeBackgroundColor = function(details, callback) {};
3010  * @param {number=} opt_tabId
3011  * @see https://developer.chrome.com/extensions/browserAction#method-enable
3012  */
3013 chrome.browserAction.enable = function(opt_tabId) {};
3017  * @param {number=} opt_tabId
3018  * @see https://developer.chrome.com/extensions/browserAction#method-disable
3019  */
3020 chrome.browserAction.disable = function(opt_tabId) {};
3024  * @constructor
3025  */
3026 chrome.browserAction.BrowserActionTabEvent = function() {};
3030  * @param {function(!Tab): void} callback
3031  */
3032 chrome.browserAction.BrowserActionTabEvent.prototype.addListener =
3033     function(callback) {};
3037  * @param {function(!Tab): void} callback
3038  */
3039 chrome.browserAction.BrowserActionTabEvent.prototype.removeListener =
3040     function(callback) {};
3044  * @param {function(!Tab): void} callback
3045  * @return {boolean}
3046  */
3047 chrome.browserAction.BrowserActionTabEvent.prototype.hasListener =
3048     function(callback) {};
3051 /** @return {boolean} */
3052 chrome.browserAction.BrowserActionTabEvent.prototype.hasListeners =
3053     function() {};
3057  * @type {!chrome.browserAction.BrowserActionTabEvent}
3058  * @see https://developer.chrome.com/extensions/browserAction#event-onClicked
3059  */
3060 chrome.browserAction.onClicked;
3064  * @const
3065  * @see https://developer.chrome.com/extensions/bookmarks.html
3066  */
3067 chrome.bookmarks = {};
3071  * @typedef {?{
3072  *   parentId: (string|undefined),
3073  *   index: (number|undefined),
3074  *   url: (string|undefined),
3075  *   title: (string|undefined)
3076  * }}
3077  * @see https://developer.chrome.com/extensions/bookmarks#method-create
3078  */
3079 chrome.bookmarks.CreateDetails;
3083  * @typedef {?{
3084  *   query: (string|undefined),
3085  *   url: (string|undefined),
3086  *   title: (string|undefined)
3087  * }}
3088  * @see https://developer.chrome.com/extensions/bookmarks#method-search
3089  */
3090 chrome.bookmarks.SearchDetails;
3094  * @param {(string|Array.<string>)} idOrIdList
3095  * @param {function(Array.<BookmarkTreeNode>): void} callback The
3096  *     callback function which accepts an array of BookmarkTreeNode.
3097  * @return {Array.<BookmarkTreeNode>}
3098  */
3099 chrome.bookmarks.get = function(idOrIdList, callback) {};
3103  * @param {string} id
3104  * @param {function(Array.<BookmarkTreeNode>): void} callback The
3105  *     callback function which accepts an array of BookmarkTreeNode.
3106  * @return {Array.<BookmarkTreeNode>}
3107  */
3108 chrome.bookmarks.getChildren = function(id, callback) {};
3112  * @param {number} numberOfItems The number of items to return.
3113  * @param {function(Array.<BookmarkTreeNode>): void} callback The
3114  *     callback function which accepts an array of BookmarkTreeNode.
3115  * @return {Array.<BookmarkTreeNode>}
3116  */
3117 chrome.bookmarks.getRecent = function(numberOfItems, callback) {};
3121  * @param {function(Array.<BookmarkTreeNode>): void} callback The
3122  *     callback function which accepts an array of BookmarkTreeNode.
3123  * @return {Array.<BookmarkTreeNode>}
3124  */
3125 chrome.bookmarks.getTree = function(callback) {};
3129  * @param {string} id The ID of the root of the subtree to retrieve.
3130  * @param {function(Array.<BookmarkTreeNode>): void} callback The
3131  *     callback function which accepts an array of BookmarkTreeNode.
3132  * @return {Array.<BookmarkTreeNode>}
3133  */
3134 chrome.bookmarks.getSubTree = function(id, callback) {};
3138  * @param {string|!chrome.bookmarks.SearchDetails} query
3139  * @param {function(Array.<BookmarkTreeNode>): void} callback
3140  * @return {Array.<BookmarkTreeNode>}
3141  */
3142 chrome.bookmarks.search = function(query, callback) {};
3146  * @param {chrome.bookmarks.CreateDetails} bookmark
3147  * @param {function(BookmarkTreeNode): void=} opt_callback The
3148  *     callback function which accepts a BookmarkTreeNode object.
3149  */
3150 chrome.bookmarks.create = function(bookmark, opt_callback) {};
3154  * @param {string} id
3155  * @param {Object} destination An object which has optional 'parentId' and
3156  *     optional 'index'.
3157  * @param {function(BookmarkTreeNode): void=} opt_callback
3158  *     The callback function which accepts a BookmarkTreeNode object.
3159  */
3160 chrome.bookmarks.move = function(id, destination, opt_callback) {};
3164  * @param {string} id
3165  * @param {Object} changes An object which may have 'title' as a key.
3166  * @param {function(BookmarkTreeNode): void=} opt_callback The
3167  *     callback function which accepts a BookmarkTreeNode object.
3168  */
3169 chrome.bookmarks.update = function(id, changes, opt_callback) {};
3173  * @param {string} id
3174  * @param {function(): void=} opt_callback
3175  */
3176 chrome.bookmarks.remove = function(id, opt_callback) {};
3180  * @param {string} id
3181  * @param {function(): void=} opt_callback
3182  */
3183 chrome.bookmarks.removeTree = function(id, opt_callback) {};
3187  * @param {function(): void=} opt_callback
3188  */
3189 chrome.bookmarks.import = function(opt_callback) {};
3193  * @param {function(): void=} opt_callback
3194  */
3195 chrome.bookmarks.export = function(opt_callback) {};
3198 /** @type {!ChromeEvent} */
3199 chrome.bookmarks.onChanged;
3202 /** @type {!ChromeEvent} */
3203 chrome.bookmarks.onChildrenReordered;
3206 /** @type {!ChromeEvent} */
3207 chrome.bookmarks.onCreated;
3210 /** @type {!ChromeEvent} */
3211 chrome.bookmarks.onImportBegan;
3214 /** @type {!ChromeEvent} */
3215 chrome.bookmarks.onImportEnded;
3218 /** @type {!ChromeEvent} */
3219 chrome.bookmarks.onMoved;
3222 /** @type {!ChromeEvent} */
3223 chrome.bookmarks.onRemoved;
3227  * @typedef {?{
3228  *   content: string,
3229  *   description: string
3230  * }}
3231  */
3232 var SuggestResult;
3236  * @const
3237  * @see https://developer.chrome.com/extensions/omnibox.html
3238  */
3239 chrome.omnibox = {};
3243 /** @constructor */
3244 chrome.omnibox.InputChangedEvent = function() {};
3248  * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3249  */
3250 chrome.omnibox.InputChangedEvent.prototype.addListener = function(callback) {};
3254  * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3255  */
3256 chrome.omnibox.InputChangedEvent.prototype.removeListener =
3257     function(callback) {};
3261  * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3262  * @return {boolean}
3263  */
3264 chrome.omnibox.InputChangedEvent.prototype.hasListener = function(callback) {};
3267 /** @return {boolean} */
3268 chrome.omnibox.InputChangedEvent.prototype.hasListeners = function() {};
3272 /** @constructor */
3273 chrome.omnibox.InputEnteredEvent = function() {};
3276 /** @param {function(string, string): void} callback */
3277 chrome.omnibox.InputEnteredEvent.prototype.addListener = function(callback) {};
3280 /** @param {function(string, string): void} callback */
3281 chrome.omnibox.InputEnteredEvent.prototype.removeListener =
3282     function(callback) {};
3286  * @param {function(string, string): void} callback
3287  * @return {boolean}
3288  */
3289 chrome.omnibox.InputEnteredEvent.prototype.hasListener = function(callback) {};
3292 /** @return {boolean} */
3293 chrome.omnibox.InputEnteredEvent.prototype.hasListeners = function() {};
3297  * @param {{description: string}} suggestion A partial SuggestResult object.
3298  */
3299 chrome.omnibox.setDefaultSuggestion = function(suggestion) {};
3302 /** @type {!ChromeEvent} */
3303 chrome.omnibox.onInputCancelled;
3306 /** @type {!chrome.omnibox.InputChangedEvent} */
3307 chrome.omnibox.onInputChanged;
3310 /** @type {!chrome.omnibox.InputEnteredEvent} */
3311 chrome.omnibox.onInputEntered;
3314 /** @type {!ChromeEvent} */
3315 chrome.omnibox.onInputStarted;
3319  * @const
3320  * @see https://developer.chrome.com/extensions/dev/contextMenus.html
3321  */
3322 chrome.contextMenus = {};
3326  * @typedef {?{
3327  *   type: (string|undefined),
3328  *   id: (string|undefined),
3329  *   title: (string|undefined),
3330  *   checked: (boolean|undefined),
3331  *   contexts: (!Array.<string>|undefined),
3332  *   onclick: (function(!Object, !Tab)|undefined),
3333  *   parentId: (number|string|undefined),
3334  *   documentUrlPatterns: (!Array.<string>|undefined),
3335  *   targetUrlPatterns: (!Array.<string>|undefined),
3336  *   enabled: (boolean|undefined)
3337  * }}
3338  * @see https://developer.chrome.com/extensions/contextMenus#method-create
3339  */
3340 chrome.contextMenus.CreateProperties;
3344  * @typedef {?{
3345  *   type: (string|undefined),
3346  *   title: (string|undefined),
3347  *   checked: (boolean|undefined),
3348  *   contexts: (!Array.<string>|undefined),
3349  *   onclick: (function(!Object, !Tab)|undefined),
3350  *   parentId: (number|string|undefined),
3351  *   documentUrlPatterns: (!Array.<string>|undefined),
3352  *   targetUrlPatterns: (!Array.<string>|undefined),
3353  *   enabled: (boolean|undefined)
3354  * }}
3355  * @see https://developer.chrome.com/extensions/contextMenus#method-update
3356  */
3357 chrome.contextMenus.UpdateProperties;
3361  * @param {!chrome.contextMenus.CreateProperties} createProperties
3362  * @param {function()=} opt_callback
3363  * @return {(number|string)} The id of the newly created window.
3364  * @see https://developer.chrome.com/extensions/contextMenus#method-create
3365  */
3366 chrome.contextMenus.create = function(createProperties, opt_callback) {};
3370  * @param {(number|string)} id
3371  * @param {!chrome.contextMenus.UpdateProperties} updateProperties
3372  * @param {function()=} opt_callback
3373  * @see https://developer.chrome.com/extensions/contextMenus#method-update
3374  */
3375 chrome.contextMenus.update = function(id, updateProperties, opt_callback) {};
3379  * @param {(number|string)} menuItemId
3380  * @param {function()=} opt_callback
3381  * @see https://developer.chrome.com/extensions/contextMenus#method-remove
3382  */
3383 chrome.contextMenus.remove = function(menuItemId, opt_callback) {};
3387  * @param {function()=} opt_callback
3388  * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
3389  */
3390 chrome.contextMenus.removeAll = function(opt_callback) {};
3394  * @interface
3395  * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3396  */
3397 chrome.contextMenus.ClickedEvent = function() {};
3401  * @param {function(!Object, !Tab=)} callback
3402  */
3403 chrome.contextMenus.ClickedEvent.prototype.addListener = function(callback) {};
3407  * @param {function(!Object, !Tab=)} callback
3408  */
3409 chrome.contextMenus.ClickedEvent.prototype.removeListener =
3410     function(callback) {};
3414  * @param {function(!Object, !Tab=)} callback
3415  * @return {boolean}
3416  */
3417 chrome.contextMenus.ClickedEvent.prototype.hasListener = function(callback) {};
3421  * @return {boolean}
3422  */
3423 chrome.contextMenus.ClickedEvent.prototype.hasListeners = function() {};
3427  * @type {!chrome.contextMenus.ClickedEvent}
3428  * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3429  */
3430 chrome.contextMenus.onClicked;
3434  * @const
3435  * @see https://developer.chrome.com/extensions/dev/cookies.html
3436  */
3437 chrome.cookies = {};
3441  * This typedef is used for the parameters to chrome.cookies.get,
3442  * chrome.cookies.remove, and for the parameter to remove's callback. These uses
3443  * all identify a single cookie uniquely without specifying its content, and the
3444  * objects are identical except for the the storeId being optional vs required.
3445  * If greater divergence occurs, then going to two typedefs is recommended.
3447  * @typedef {?{
3448  *   url: string,
3449  *   name: string,
3450  *   storeId: (string|undefined)
3451  * }}
3452  */
3453 chrome.cookies.CookieIdentifier;
3457  * @param {!chrome.cookies.CookieIdentifier} details
3458  * @param {function(Cookie=): void} callback
3459  */
3460 chrome.cookies.get = function(details, callback) {};
3464  * @param {Object} details
3465  * @param {function(Array.<Cookie>): void} callback
3466  */
3467 chrome.cookies.getAll = function(details, callback) {};
3471  * @param {function(Array.<CookieStore>): void} callback
3472  */
3473 chrome.cookies.getAllCookieStores = function(callback) {};
3477  * @param {!chrome.cookies.CookieIdentifier} details
3478  * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
3479  *     removal failed for any reason, the parameter will be "null", and
3480  *     "chrome.runtime.lastError" will be set.
3481  */
3482 chrome.cookies.remove = function(details, opt_callback) {};
3486  * @typedef {?{
3487  *   url: string,
3488  *   name: (string|undefined),
3489  *   value: (string|undefined),
3490  *   domain: (string|undefined),
3491  *   path: (string|undefined),
3492  *   secure: (boolean|undefined),
3493  *   httpOnly: (boolean|undefined),
3494  *   expirationDate: (number|undefined),
3495  *   storeId: (string|undefined)
3496  * }}
3497  */
3498 chrome.cookies.CookieSetDetails;
3502  * @param {!chrome.cookies.CookieSetDetails} details
3503  * @param {function(Cookie): void=} opt_callback If setting failed for any
3504  *    reason, the parameter will be "null", and "chrome.runtime.lastError" will
3505  *    be set.
3506  */
3507 chrome.cookies.set = function(details, opt_callback) {};
3511  * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
3512  * @type {!ChromeEvent}
3513  */
3514 chrome.cookies.onChanged;
3518 /** @constructor */
3519 function CookieChangeInfo() {}
3522 /** @type {boolean} */
3523 CookieChangeInfo.prototype.removed;
3526 /** @type {Cookie} */
3527 CookieChangeInfo.prototype.cookie;
3530 /** @type {string} */
3531 CookieChangeInfo.prototype.cause;
3534 /** @const */
3535 chrome.management = {};
3539  * @typedef {?{
3540  *   showConfirmDialog: (boolean|undefined)
3541  * }}
3542  */
3543 chrome.management.InstallOptions;
3547  * @param {string} id
3548  * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3549  *     function.
3550  */
3551 chrome.management.get = function(id, opt_callback) {};
3555  * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
3556  *     callback function.
3557  * @return {!Array.<!ExtensionInfo>}
3558  */
3559 chrome.management.getAll = function(opt_callback) {};
3563  * @param {string} id The id of an already installed extension.
3564  * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3565  */
3566 chrome.management.getPermissionWarningsById = function(id, opt_callback) {};
3570  * @param {string} manifestStr Extension's manifest JSON string.
3571  * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3572  */
3573 chrome.management.getPermissionWarningsByManifest =
3574     function(manifestStr, opt_callback) {};
3578  * @param {string} id The id of an already installed extension.
3579  * @param {function(): void=} opt_callback Optional callback function.
3580  */
3581 chrome.management.launchApp = function(id, opt_callback) {};
3585  * @param {string} id The id of an already installed extension.
3586  * @param {boolean} enabled Whether this item should be enabled.
3587  * @param {function(): void=} opt_callback Optional callback function.
3588  */
3589 chrome.management.setEnabled = function(id, enabled, opt_callback) {};
3593  * @param {string} id The id of an already installed extension.
3594  * @param {(!chrome.management.InstallOptions|function(): void)=}
3595  *     opt_optionsOrCallback An optional uninstall options object or an optional
3596  *     callback function.
3597  * @param {function(): void=} opt_callback Optional callback function.
3598  */
3599 chrome.management.uninstall =
3600     function(id, opt_optionsOrCallback, opt_callback) {};
3604  * @param {(!chrome.management.InstallOptions|function(): void)=}
3605  *     opt_optionsOrCallback An optional uninstall options object or an optional
3606  *     callback function.
3607  * @param {function(): void=} opt_callback An optional callback function.
3608  */
3609 chrome.management.uninstallSelf =
3610     function(opt_optionsOrCallback, opt_callback) {};
3614  * @param {string} id The id of an already installed extension.
3615  * @param {function(): void=} opt_callback Optional callback function.
3616  */
3617 chrome.management.createAppShortcut = function(id, opt_callback) {};
3621  * @param {string} id The id of an already installed extension.
3622  * @param {string} launchType The LaunchType enum value to set. Make sure this
3623  *     value is in ExtensionInfo.availableLaunchTypes because the available
3624  *     launch types vary on different platforms and configurations.
3625  * @param {function(): void=} opt_callback Optional callback function.
3626  */
3627 chrome.management.setLaunchType = function(id, launchType, opt_callback) {};
3631  * @param {string} url The URL of a web page. The scheme of the URL can only be
3632  *     "http" or "https".
3633  * @param {string} title The title of the generated app.
3634  * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3635  *     function.
3636  */
3637 chrome.management.generateAppForLink = function(url, title, opt_callback) {};
3640 /** @type {!ChromeExtensionInfoEvent} */
3641 chrome.management.onDisabled;
3644 /** @type {!ChromeExtensionInfoEvent} */
3645 chrome.management.onEnabled;
3648 /** @type {!ChromeExtensionInfoEvent} */
3649 chrome.management.onInstalled;
3652 /** @type {!ChromeStringEvent} */
3653 chrome.management.onUninstalled;
3657  * @const
3658  * @see https://developer.chrome.com/extensions/idle.html
3659  */
3660 chrome.idle = {};
3664  * @param {number} thresholdSeconds Threshold in seconds, used to determine
3665  *     when a machine is in the idle state.
3666  * @param {function(string): void} callback Callback to handle the state.
3667  */
3668 chrome.idle.queryState = function(thresholdSeconds, callback) {};
3672  * @param {number} intervalInSeconds Threshold, in seconds, used to determine
3673  *    when the system is in an idle state.
3674  */
3675 chrome.idle.setDetectionInterval = function(intervalInSeconds) {};
3678 /** @type {!ChromeEvent} */
3679 chrome.idle.onStateChanged;
3683  * Chrome Text-to-Speech API.
3684  * @const
3685  * @see https://developer.chrome.com/extensions/tts.html
3686  */
3687 chrome.tts = {};
3692  * An event from the TTS engine to communicate the status of an utterance.
3693  * @constructor
3694  */
3695 function TtsEvent() {}
3698 /** @type {string} */
3699 TtsEvent.prototype.type;
3702 /** @type {number} */
3703 TtsEvent.prototype.charIndex;
3706 /** @type {string} */
3707 TtsEvent.prototype.errorMessage;
3712  * A description of a voice available for speech synthesis.
3713  * @constructor
3714  */
3715 function TtsVoice() {}
3718 /** @type {string} */
3719 TtsVoice.prototype.voiceName;
3722 /** @type {string} */
3723 TtsVoice.prototype.lang;
3726 /** @type {string} */
3727 TtsVoice.prototype.gender;
3730 /** @type {string} */
3731 TtsVoice.prototype.extensionId;
3734 /** @type {Array.<string>} */
3735 TtsVoice.prototype.eventTypes;
3739  * Gets an array of all available voices.
3740  * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
3741  *     function.
3742  */
3743 chrome.tts.getVoices = function(opt_callback) {};
3747  * Checks if the engine is currently speaking.
3748  * @param {function(boolean)=} opt_callback The callback function.
3749  */
3750 chrome.tts.isSpeaking = function(opt_callback) {};
3754  * Speaks text using a text-to-speech engine.
3755  * @param {string} utterance The text to speak, either plain text or a complete,
3756  *     well-formed SSML document. Speech engines that do not support SSML will
3757  *     strip away the tags and speak the text. The maximum length of the text is
3758  *     32,768 characters.
3759  * @param {Object=} opt_options The speech options.
3760  * @param {function()=} opt_callback Called right away, before speech finishes.
3761  */
3762 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
3766  * Stops any current speech.
3767  */
3768 chrome.tts.stop = function() {};
3772  * @const
3773  * @see https://developer.chrome.com/extensions/ttsEngine.html
3774  */
3775 chrome.ttsEngine = {};
3778 /** @type {!ChromeEvent} */
3779 chrome.ttsEngine.onSpeak;
3782 /** @type {!ChromeEvent} */
3783 chrome.ttsEngine.onStop;
3787  * @const
3788  * @see https://developer.chrome.com/extensions/contentSettings.html
3789  */
3790 chrome.contentSettings = {};
3793 /** @type {!ContentSetting} */
3794 chrome.contentSettings.cookies;
3797 /** @type {!ContentSetting} */
3798 chrome.contentSettings.images;
3801 /** @type {!ContentSetting} */
3802 chrome.contentSettings.javascript;
3805 /** @type {!ContentSetting} */
3806 chrome.contentSettings.plugins;
3809 /** @type {!ContentSetting} */
3810 chrome.contentSettings.popups;
3813 /** @type {!ContentSetting} */
3814 chrome.contentSettings.notifications;
3818  * @const
3819  * @see https://developer.chrome.com/extensions/fileBrowserHandler
3820  */
3821 chrome.fileBrowserHandler = {};
3825  * @typedef {?{
3826  *   suggestedName: string,
3827  *   allowedFileExtensions: (!Array.<string>|undefined)
3828  * }}
3829  */
3830 chrome.fileBrowserHandler.SelectFileSelectionParams;
3834  * Prompts user to select file path under which file should be saved.
3835  * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3836  * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3837  *     Parameters that will be used while selecting the file.
3838  * @param {function(!Object)} callback Function called upon completion.
3839  */
3840 chrome.fileBrowserHandler.selectFile = function(selectionParams, callback) {};
3844  * @interface
3845  * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3846  */
3847 chrome.fileBrowserHandler.ExecuteEvent = function() {};
3851  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3852  */
3853 chrome.fileBrowserHandler.ExecuteEvent.prototype.addListener = function(
3854     callback) {};
3858  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3859  */
3860 chrome.fileBrowserHandler.ExecuteEvent.prototype.removeListener = function(
3861     callback) {};
3865  * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3866  * @return {boolean}
3867  */
3868 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListener = function(
3869     callback) {};
3873  * @return {boolean}
3874  */
3875 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListeners = function() {};
3879  * Fired when file system action is executed from ChromeOS file browser.
3880  * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3881  * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3882  */
3883 chrome.fileBrowserHandler.onExecute;
3887  * @const
3888  * @see https://developer.chrome.com/extensions/gcm
3889  */
3890 chrome.gcm = {};
3894  * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3895  * @type {number}
3896  */
3897 chrome.gcm.MAX_MESSAGE_SIZE;
3901  * Registers the application with GCM. The registration ID will be returned by
3902  * the callback. If register is called again with the same list of senderIds,
3903  * the same registration ID will be returned.
3904  * @see https://developer.chrome.com/extensions/gcm#method-register
3905  * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
3906  *     send messages to the application.
3907  * @param {function(string): void} callback Function called when
3908  *     registration completes with registration ID as argument.
3909  */
3910 chrome.gcm.register = function(senderIds, callback) {};
3914  * Unregisters the application from GCM.
3915  * @see https://developer.chrome.com/extensions/gcm#method-unregister
3916  * @param {function(): void} callback Called when unregistration is done.
3917  */
3918 chrome.gcm.unregister = function(callback) {};
3922  * Sends an upstream message using GCM.
3923  * @see https://developer.chrome.com/extensions/gcm#method-send
3924  * @param {!chrome.gcm.Message} message Message to be sent.
3925  * @param {function(string): void} callback Called with message ID.
3926  */
3927 chrome.gcm.send = function(message, callback) {};
3931  * Outgoing message.
3932  * @typedef {?{
3933  *   destinationId: string,
3934  *   messageId: string,
3935  *   timeToLive: (number|undefined),
3936  *   data: !Object.<string, string>
3937  * }}
3938  */
3939 chrome.gcm.Message;
3943  * An event, fired when a message is received through GCM.
3944  * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3945  * @type {!chrome.gcm.OnMessageEvent}
3946  */
3947 chrome.gcm.onMessage;
3951  * An event, fired when GCM server had to delete messages to the application
3952  * from its queue in order to manage its size.
3953  * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3954  * @type {!ChromeEvent}
3955  */
3956 chrome.gcm.onMessagesDeleted;
3960  * An event indicating problems with sending messages.
3961  * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3962  * @type {!chrome.gcm.OnSendErrorEvent}
3963  */
3964 chrome.gcm.onSendError;
3969  * @constructor
3970  */
3971 chrome.gcm.OnMessageEvent = function() {};
3975  * @param {function(!Object): void} callback Callback.
3976  */
3977 chrome.gcm.OnMessageEvent.prototype.addListener = function(callback) {};
3981  * @param {function(!Object): void} callback Callback.
3982  */
3983 chrome.gcm.OnMessageEvent.prototype.removeListener = function(callback) {};
3987  * @param {function(!Object): void} callback Callback.
3988  * @return {boolean}
3989  */
3990 chrome.gcm.OnMessageEvent.prototype.hasListener = function(callback) {};
3994  * @return {boolean}
3995  */
3996 chrome.gcm.OnMessageEvent.prototype.hasListeners = function() {};
4001  * @constructor
4002  */
4003 chrome.gcm.OnSendErrorEvent = function() {};
4007  * @param {function(!Object): void} callback Callback.
4008  */
4009 chrome.gcm.OnSendErrorEvent.prototype.addListener = function(callback) {};
4013  * @param {function(!Object): void} callback Callback.
4014  */
4015 chrome.gcm.OnSendErrorEvent.prototype.removeListener = function(callback) {};
4019  * @param {function(!Object): void} callback Callback.
4020  * @return {boolean}
4021  */
4022 chrome.gcm.OnSendErrorEvent.prototype.hasListener = function(callback) {};
4026  * @return {boolean}
4027  */
4028 chrome.gcm.OnSendErrorEvent.prototype.hasListeners = function() {};
4032  * @const
4033  * @see https://developer.chrome.com/extensions/history.html
4034  */
4035 chrome.history = {};
4039  * @param {Object.<string, string>} details Object with a 'url' key.
4040  */
4041 chrome.history.addUrl = function(details) {};
4045  * @param {function(): void} callback Callback function.
4046  */
4047 chrome.history.deleteAll = function(callback) {};
4051  * @param {Object.<string, string>} range Object with 'startTime'
4052  *     and 'endTime' keys.
4053  * @param {function(): void} callback Callback function.
4054  */
4055 chrome.history.deleteRange = function(range, callback) {};
4059  * @param {Object.<string, string>} details Object with a 'url' key.
4060  */
4061 chrome.history.deleteUrl = function(details) {};
4065  * @param {Object.<string, string>} details Object with a 'url' key.
4066  * @param {function(!Array.<!VisitItem>): void} callback Callback function.
4067  * @return {!Array.<!VisitItem>}
4068  */
4069 chrome.history.getVisits = function(details, callback) {};
4073  * @param {Object.<string, string>} query Object with a 'text' (string)
4074  *     key and optional 'startTime' (number), 'endTime' (number) and
4075  *     'maxResults' keys.
4076  * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
4077  * @return {!Array.<!HistoryItem>}
4078  */
4079 chrome.history.search = function(query, callback) {};
4082 /** @type {!ChromeEvent} */
4083 chrome.history.onVisitRemoved;
4086 /** @type {!ChromeEvent} */
4087 chrome.history.onVisited;
4091  * @const
4092  * @see http://developer.chrome.com/apps/identity.html
4093  */
4094 chrome.identity = {};
4098  * @param {(chrome.identity.TokenDetails|function(string=): void)}
4099  *     detailsOrCallback Token options or a callback function if no options are
4100  *     specified.
4101  * @param {function(string=): void=} opt_callback A callback function if options
4102  *     are specified.
4103  */
4104 chrome.identity.getAuthToken = function(detailsOrCallback, opt_callback) {};
4107 /** @typedef {{interactive: (boolean|undefined)}} */
4108 chrome.identity.TokenDetails;
4112  * @param {chrome.identity.InvalidTokenDetails} details
4113  * @param {function(): void} callback
4114  */
4115 chrome.identity.removeCachedAuthToken = function(details, callback) {};
4118 /** @typedef {{token: string}} */
4119 chrome.identity.InvalidTokenDetails;
4123  * @param {chrome.identity.WebAuthFlowDetails} details
4124  * @param {function(string=): void} callback
4125  */
4126 chrome.identity.launchWebAuthFlow = function(details, callback) {};
4129 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
4130 chrome.identity.WebAuthFlowDetails;
4133 /** @param {function(!Object):void} callback */
4134 chrome.identity.getProfileUserInfo = function(callback) {};
4137 /** @type {!ChromeEvent} */
4138 chrome.identity.onSignInChanged;
4142  * @const
4143  * @see https://developer.chrome.com/extensions/input.ime.html
4144  */
4145 chrome.input = {};
4148 /** @const */
4149 chrome.input.ime = {};
4154  * The OnKeyEvent event takes an extra argument.
4155  * @constructor
4156  */
4157 function ChromeInputImeOnKeyEventEvent() {}
4161  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4162  *     callback.
4163  * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
4164  */
4165 ChromeInputImeOnKeyEventEvent.prototype.addListener =
4166     function(callback, opt_extraInfoSpec) {};
4170  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4171  *     callback.
4172  */
4173 ChromeInputImeOnKeyEventEvent.prototype.removeListener = function(callback) {};
4177  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4178  *     callback.
4179  */
4180 ChromeInputImeOnKeyEventEvent.prototype.hasListener = function(callback) {};
4184  * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4185  *     callback.
4186  */
4187 ChromeInputImeOnKeyEventEvent.prototype.hasListeners = function(callback) {};
4191  * @param {!Object.<string,number>} parameters An object with a
4192  *     'contextID' (number) key.
4193  * @param {function(boolean): void} callback Callback function.
4194  */
4195 chrome.input.ime.clearComposition = function(parameters, callback) {};
4199  * @param {!Object.<string,(string|number)>} parameters An object with
4200  *     'contextID' (number) and 'text' (string) keys.
4201  * @param {function(boolean): void=} opt_callback Callback function.
4202  */
4203 chrome.input.ime.commitText = function(parameters, opt_callback) {};
4207  * @param {!Object.<string,(string|number)>} parameters An object with
4208  *     'contextID' (number) and 'text' (string) keys.
4209  * @param {function(boolean): void=} opt_callback Callback function.
4210  */
4211 chrome.input.ime.deleteSurroundingText = function(parameters, opt_callback) {};
4215  * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
4216  *     parameters An object with 'engineID' (string) and 'properties'
4217  *     (Object) keys.
4218  * @param {function(boolean): void=} opt_callback Callback function.
4219  */
4220 chrome.input.ime.setCandidateWindowProperties =
4221     function(parameters, opt_callback) {};
4225  * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
4226  *     parameters An object with 'contextID' (number) and 'candidates'
4227  *     (array of object) keys.
4228  * @param {function(boolean): void=} opt_callback Callback function.
4229  */
4230 chrome.input.ime.setCandidates = function(parameters, opt_callback) {};
4234  * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
4235  *     parameters An object with 'contextID' (number), 'text' (string),
4236  *     'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
4237  *     and 'segments' (array of object) keys.
4238  * @param {function(boolean): void=} opt_callback Callback function.
4239  */
4240 chrome.input.ime.setComposition = function(parameters, opt_callback) {};
4244  * @param {!Object.<string,number>} parameters An object with
4245  *     'contextID' (number) and 'candidateID' (number) keys.
4246  * @param {function(boolean): void=} opt_callback Callback function.
4247  */
4248 chrome.input.ime.setCursorPosition = function(parameters, opt_callback) {};
4252  * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4253  *     parameters An object with 'engineID' (string) and 'items'
4254  *     (array of object) keys.
4255  * @param {function(): void=} opt_callback Callback function.
4256  */
4257 chrome.input.ime.setMenuItems = function(parameters, opt_callback) {};
4261  * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4262  *     parameters An object with  'engineID' (string) and 'items'
4263  *     (array of object) keys.
4264  * @param {function(): void=} opt_callback Callback function.
4265  */
4266 chrome.input.ime.updateMenuItems = function(parameters, opt_callback) {};
4270  * @param {string} requestId Request id of the event that was handled. This
4271  *     should come from keyEvent.requestId.
4272  * @param {boolean} response True if the keystroke was handled, false if not.
4273  */
4274 chrome.input.ime.keyEventHandled = function(requestId, response) {};
4277 /** @type {!ChromeEvent} */
4278 chrome.input.ime.onActivate;
4281 /** @type {!ChromeEvent} */
4282 chrome.input.ime.onBlur;
4285 /** @type {!ChromeEvent} */
4286 chrome.input.ime.onCandidateClicked;
4289 /** @type {!ChromeEvent} */
4290 chrome.input.ime.onDeactivated;
4293 /** @type {!ChromeEvent} */
4294 chrome.input.ime.onFocus;
4297 /** @type {!ChromeEvent} */
4298 chrome.input.ime.onInputContextUpdate;
4301 /** @type {!ChromeInputImeOnKeyEventEvent} */
4302 chrome.input.ime.onKeyEvent;
4305 /** @type {!ChromeEvent} */
4306 chrome.input.ime.onMenuItemActivated;
4309 /** @type {!ChromeEvent} */
4310 chrome.input.ime.onReset;
4313 /** @type {!ChromeEvent} */
4314 chrome.input.ime.onSurroundingTextChanged;
4318  * namespace
4319  * @see http://developer.chrome.com/apps/mediaGalleries
4320  * @const
4321  */
4322 chrome.mediaGalleries = {};
4326  * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
4327  *     detailsOrCallback A details object for whether the request should be
4328  *     interactive if permissions haven't been granted yet or the callback.
4329  * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
4330  *     no details were supplied as arg1.
4331  */
4332 chrome.mediaGalleries.getMediaFileSystems = function(
4333     detailsOrCallback, opt_callback) {};
4337  * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
4338  */
4339 chrome.mediaGalleries.addUserSelectedFolder = function(callback) {};
4343  * @param {string} galleryId ID of the media gallery.
4344  * @param {function()=} opt_callback Optional callback function.
4345  */
4346 chrome.mediaGalleries.dropPermissionForMediaFileSystem =
4347     function(galleryId, opt_callback) {};
4350 chrome.mediaGalleries.startMediaScan = function() {};
4353 chrome.mediaGalleries.cancelMediaScan = function() {};
4357  * @param {function(!Array.<!FileSystem>)} callback Callback function.
4358  */
4359 chrome.mediaGalleries.addScanResults = function(callback) {};
4363  * @typedef {{
4364  *   name: string,
4365  *   galleryId: string,
4366  *   deviceId: (string|undefined),
4367  *   isRemovable: boolean,
4368  *   isMediaDevice: boolean,
4369  *   isAvailable: boolean
4370  * }}
4371  */
4372 chrome.mediaGalleries.MediaFileSystemMetadata;
4376  * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
4377  * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
4378  */
4379 chrome.mediaGalleries.getMediaFileSystemMetadata = function(mediaFileSystem) {};
4383  * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
4384  *     callback Callback function.
4385  */
4386 chrome.mediaGalleries.getAllMediaFileSystemMetadata = function(callback) {};
4390  * @typedef {{
4391  *   mimeType: string,
4392  *   height: (number|undefined),
4393  *   width: (number|undefined),
4394  *   xResolution: (number|undefined),
4395  *   yResolution: (number|undefined),
4396  *   duration: (number|undefined),
4397  *   rotation: (number|undefined),
4398  *   cameraMake: (string|undefined),
4399  *   cameraModel: (string|undefined),
4400  *   exposureTimeSeconds: (number|undefined),
4401  *   flashFired: (boolean|undefined),
4402  *   fNumber: (number|undefined),
4403  *   focalLengthMm: (number|undefined),
4404  *   isoEquivalent: (number|undefined),
4405  *   album: (string|undefined),
4406  *   artist: (string|undefined),
4407  *   comment: (string|undefined),
4408  *   copyright: (string|undefined),
4409  *   disc: (number|undefined),
4410  *   genre: (string|undefined),
4411  *   language: (string|undefined),
4412  *   title: (string|undefined),
4413  *   track: (number|undefined),
4414  *   rawTags: !Array.<!chrome.mediaGalleries.metadata.RawTag>,
4415  *   attachedImages: !Array.<!Blob>
4416  * }}
4417  */
4418 chrome.mediaGalleries.MetaData;
4421 /** @const */
4422 chrome.mediaGalleries.metadata = {};
4425 /** @constructor */
4426 chrome.mediaGalleries.metadata.RawTag = function() {};
4429 /** @type {string} */
4430 chrome.mediaGalleries.metadata.RawTag.prototype.type;
4433 /** @type {!Object.<string, string>} */
4434 chrome.mediaGalleries.metadata.RawTag.prototype.tags;
4438  * @param {!Blob} mediaFile The media file for which to get metadata.
4439  * @param {{metadataType: (string|undefined)}|
4440  *     function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
4441  *     for the metadata to retrieve or the callback to invoke with the metadata.
4442  *     The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
4443  *     'all' if the metadataType is omitted.
4444  * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
4445  *     were passed as arg2, the callback to invoke with the metadata.
4446  */
4447 chrome.mediaGalleries.getMetadata = function(
4448     mediaFile, optionsOrCallback, opt_callback) {};
4452  * @typedef {function({galleryId: string, success: boolean}): void}
4453  */
4454 chrome.mediaGalleries.AddGalleryWatchCallback;
4458  * @param {string} galleryId The media gallery's ID.
4459  * @param {!chrome.mediaGalleries.AddGalleryWatchCallback} callback Fired with
4460  *     success or failure result.
4461  */
4462 chrome.mediaGalleries.addGalleryWatch = function(galleryId, callback) {};
4466  * @param {string} galleryId The media gallery's ID.
4467  */
4468 chrome.mediaGalleries.removeGalleryWatch = function(galleryId) {};
4472  * @param {function(!Array.<string>): void} callback Callback function notifies
4473  *     which galleries are being watched.
4474  */
4475 chrome.mediaGalleries.getAllGalleryWatch = function(callback) {};
4478 chrome.mediaGalleries.removeAllGalleryWatch = function() {};
4483  * @constructor
4484  */
4485 chrome.mediaGalleries.GalleryChangeEvent = function() {};
4489  * @typedef {function({type: string, galleryId: string}): void}
4490  */
4491 chrome.mediaGalleries.GalleryChangeCallback;
4495  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4496  */
4497 chrome.mediaGalleries.GalleryChangeEvent.prototype.addListener =
4498     function(callback) {};
4502  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4503  */
4504 chrome.mediaGalleries.GalleryChangeEvent.prototype.removeListener =
4505     function(callback) {};
4509  * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4510  */
4511 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListener =
4512     function(callback) {};
4516  * @return {boolean}
4517  */
4518 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListeners = function() {};
4522  * @type {!chrome.mediaGalleries.GalleryChangeEvent}
4523  */
4524 chrome.mediaGalleries.onGalleryChanged;
4528  * @typedef {{
4529  *   type: string,
4530  *   galleryCount: (number|undefined),
4531  *   audioCount: (number|undefined),
4532  *   imageCount: (number|undefined),
4533  *   videoCount: (number|undefined)
4534  * }}
4535  */
4536 chrome.mediaGalleries.OnScanProgressDetails;
4541  * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
4542  * parameter.
4543  * @constructor
4544  */
4545 chrome.mediaGalleries.ScanProgressEvent = function() {};
4548 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4549 chrome.mediaGalleries.ScanProgressEvent.prototype.addListener =
4550     function(callback) {};
4553 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4554 chrome.mediaGalleries.ScanProgressEvent.prototype.removeListener =
4555     function(callback) {};
4559  * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
4560  * @return {boolean}
4561  */
4562 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListener =
4563     function(callback) {};
4566 /** @return {boolean} */
4567 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListeners = function() {};
4570 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
4571 chrome.mediaGalleries.onScanProgress;
4575  * @const
4576  * @see https://developer.chrome.com/extensions/pageCapture.html
4577  */
4578 chrome.pageCapture = {};
4582  * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
4583  * @param {function(Blob=): void} callback Callback function.
4584  */
4585 chrome.pageCapture.saveAsMHTML = function(details, callback) {};
4589  * @const
4590  * @see https://developer.chrome.com/extensions/permissions.html
4591  */
4592 chrome.permissions = {};
4596  * @typedef {{
4597  *   permissions: (Array.<string>|undefined),
4598  *   origins: (Array.<string>|undefined)
4599  * }}
4600  * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
4601  */
4602 chrome.permissions.Permissions;
4606  * @param {!chrome.permissions.Permissions} permissions
4607  * @param {function(boolean): void} callback Callback function.
4608  */
4609 chrome.permissions.contains = function(permissions, callback) {};
4613  * @param {function(!chrome.permissions.Permissions): void} callback
4614  *     Callback function.
4615  */
4616 chrome.permissions.getAll = function(callback) {};
4620  * @param {!chrome.permissions.Permissions} permissions
4621  * @param {function(boolean): void=} opt_callback Callback function.
4622  */
4623 chrome.permissions.remove = function(permissions, opt_callback) {};
4627  * @param {!chrome.permissions.Permissions} permissions
4628  * @param {function(boolean): void=} opt_callback Callback function.
4629  */
4630 chrome.permissions.request = function(permissions, opt_callback) {};
4633 /** @type {!ChromeEvent} */
4634 chrome.permissions.onAdded;
4637 /** @type {!ChromeEvent} */
4638 chrome.permissions.onRemoved;
4642  * @see http://developer.chrome.com/dev/extensions/power.html
4643  */
4644 chrome.power = {};
4648  * @param {string} level A string describing the degree to which power
4649  *     management should be disabled, should be either "system" or "display".
4650  */
4651 chrome.power.requestKeepAwake = function(level) {};
4655  * Releases a request previously made via requestKeepAwake().
4656  */
4657 chrome.power.releaseKeepAwake = function() {};
4661  * @const
4662  * @see https://developer.chrome.com/extensions/privacy.html
4663  */
4664 chrome.privacy = {};
4667 /** @type {!Object.<string,!ChromeSetting>} */
4668 chrome.privacy.network;
4671 /** @type {!Object.<string,!ChromeSetting>} */
4672 chrome.privacy.services;
4675 /** @type {!Object.<string,!ChromeSetting>} */
4676 chrome.privacy.websites;
4680  * @const
4681  * @see https://developer.chrome.com/extensions/proxy.html
4682  */
4683 chrome.proxy = {};
4686 /** @type {!Object.<string,!ChromeSetting>} */
4687 chrome.proxy.settings;
4690 /** @type {!ChromeEvent} */
4691 chrome.proxy.onProxyError;
4695  * @const
4696  * @see http://developer.chrome.com/apps/socket.html
4697  */
4698 chrome.socket = {};
4703  * @constructor
4704  */
4705 chrome.socket.CreateInfo = function() {};
4708 /** @type {number} */
4709 chrome.socket.CreateInfo.prototype.socketId;
4714  * @constructor
4715  */
4716 chrome.socket.ReadInfo = function() {};
4719 /** @type {number} */
4720 chrome.socket.ReadInfo.prototype.resultCode;
4723 /** @type {!ArrayBuffer} */
4724 chrome.socket.ReadInfo.prototype.data;
4729  * @constructor
4730  */
4731 chrome.socket.WriteInfo = function() {};
4734 /** @type {number} */
4735 chrome.socket.WriteInfo.prototype.bytesWritten;
4740  * @constructor
4741  */
4742 chrome.socket.RecvFromInfo = function() {};
4745 /** @type {number} */
4746 chrome.socket.RecvFromInfo.prototype.resultCode;
4749 /** @type {!ArrayBuffer} */
4750 chrome.socket.RecvFromInfo.prototype.data;
4753 /** @type {string} */
4754 chrome.socket.RecvFromInfo.prototype.address;
4757 /** @type {number} */
4758 chrome.socket.RecvFromInfo.prototype.port;
4763  * @constructor
4764  */
4765 chrome.socket.AcceptInfo = function() {};
4768 /** @type {number} */
4769 chrome.socket.AcceptInfo.prototype.resultCode;
4772 /** @type {(number|undefined)} */
4773 chrome.socket.AcceptInfo.prototype.socketId;
4778  * @constructor
4779  */
4780 chrome.socket.SocketInfo = function() {};
4783 /** @type {string} */
4784 chrome.socket.SocketInfo.prototype.socketType;
4787 /** @type {boolean} */
4788 chrome.socket.SocketInfo.prototype.connected;
4791 /** @type {(string|undefined)} */
4792 chrome.socket.SocketInfo.prototype.peerAddress;
4795 /** @type {(number|undefined)} */
4796 chrome.socket.SocketInfo.prototype.peerPort;
4799 /** @type {(string|undefined)} */
4800 chrome.socket.SocketInfo.prototype.localAddress;
4803 /** @type {(number|undefined)} */
4804 chrome.socket.SocketInfo.prototype.localPort;
4809  * @constructor
4810  */
4811 chrome.socket.NetworkAdapterInfo = function() {};
4814 /** @type {string} */
4815 chrome.socket.NetworkAdapterInfo.prototype.name;
4818 /** @type {string} */
4819 chrome.socket.NetworkAdapterInfo.prototype.address;
4823  * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4824  * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4825  *     socket options or callback.
4826  * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4827  *     socket has been created.
4828  */
4829 chrome.socket.create = function(type, optionsOrCallback, opt_callback) {};
4833  * @param {number} socketId The id of the socket to destroy.
4834  */
4835 chrome.socket.destroy = function(socketId) {};
4839  * @param {number} socketId The id of the socket.
4840  * @param {string} hostname The hostname or IP address of the remote machine.
4841  * @param {number} port The port of the remote machine.
4842  * @param {function(number)} callback Called when the connection attempt is
4843  *     complete.
4844  */
4845 chrome.socket.connect = function(socketId, hostname, port, callback) {};
4849  * @param {number} socketId The id of the socket.
4850  * @param {string} address The address of the local machine.
4851  * @param {number} port The port of the local machine.
4852  * @param {function(number)} callback Called when the bind attempt is complete.
4853  */
4854 chrome.socket.bind = function(socketId, address, port, callback) {};
4858  * @param {number} socketId The id of the socket to disconnect.
4859  */
4860 chrome.socket.disconnect = function(socketId) {};
4864  * @param {number} socketId The id of the socket to read from.
4865  * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4866  *     read buffer size or the callback.
4867  * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4868  *     that was available to be read without blocking.
4869  */
4870 chrome.socket.read = function(socketId, bufferSizeOrCallback, opt_callback) {};
4874  * @param {number} socketId The id of the socket to write to.
4875  * @param {!ArrayBuffer} data The data to write.
4876  * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4877  *     operation completes without blocking or an error occurs.
4878  */
4879 chrome.socket.write = function(socketId, data, callback) {};
4883  * @param {number} socketId The id of the socket to read from.
4884  * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4885  *     The read buffer size or the callback.
4886  * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4887  *     that was available to be read without blocking.
4888  */
4889 chrome.socket.recvFrom = function(socketId, bufferSizeOrCallback,
4890     opt_callback) {};
4894  * @param {number} socketId The id of the socket to write to.
4895  * @param {!ArrayBuffer} data The data to write.
4896  * @param {string} address The address of the remote machine.
4897  * @param {number} port The port of the remote machine.
4898  * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4899  *     operation completes without blocking or an error occurs.
4900  */
4901 chrome.socket.sendTo = function(socketId, data, address, port, callback) {};
4905  * @param {number} socketId The id of the socket to listen on.
4906  * @param {string} address The address of the local machine to listen on. Use
4907  *     '0' to listen on all addresses.
4908  * @param {number} port The port of the local machine.
4909  * @param {(number|function(number))} backlogOrCallback The length of the
4910  *     socket's listen queue or the callback.
4911  * @param {function(number)=} opt_callback Called when the listen operation
4912  *     completes.
4913  */
4914 chrome.socket.listen =
4915     function(socketId, address, port, backlogOrCallback, opt_callback) {};
4919  * @param {number} socketId The id of the socket to accept a connection on.
4920  * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4921  *     socket is accepted.
4922  */
4923 chrome.socket.accept = function(socketId, callback) {};
4927  * @param {number} socketId The id of the socket to listen on.
4928  * @param {boolean} enable If true, enable keep-alive functionality.
4929  * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4930  *     between the last packet received and the first keepalive probe (default
4931  *     is 0) or the callback
4932  * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4933  *     is complete.
4934  */
4935 chrome.socket.setKeepAlive = function(socketId, enable, delayOrCallback,
4936     opt_callback) {};
4940  * @param {number} socketId The id of the socket to listen on.
4941  * @param {boolean} noDelay If true, disables Nagle's algorithm.
4942  * @param {function(boolean)} callback Called when the setNoDelay attempt is
4943  *     complete.
4944  */
4945 chrome.socket.setNoDelay = function(socketId, noDelay, callback) {};
4949  * @param {number} socketId The id of the socket.
4950  * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4951  *     is available.
4952  */
4953 chrome.socket.getInfo = function(socketId, callback) {};
4957  * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
4958  *     when local adapter information is available.
4959  */
4960 chrome.socket.getNetworkList = function(callback) {};
4964  * @param {number} socketId The id of the socket.
4965  * @param {string} address The group address to join. Domain names are not
4966  *     supported.
4967  * @param {function(number)} callback Called when the join operation is done.
4968  */
4969 chrome.socket.joinGroup = function(socketId, address, callback) {};
4973  * @param {number} socketId The id of the socket.
4974  * @param {string} address The group address to leave. Domain names are not
4975  *     supported.
4976  * @param {function(number)} callback Called when the leave operation is done.
4977  */
4978 chrome.socket.leaveGroup = function(socketId, address, callback) {};
4982  * @param {number} socketId The id of the socket.
4983  * @param {number} ttl The time-to-live value.
4984  * @param {function(number)} callback Called when the configuration operation is
4985  *     done.
4986  */
4987 chrome.socket.setMulticastTimeToLive = function(socketId, ttl, callback) {};
4991  * @param {number} socketId The id of the socket.
4992  * @param {boolean} enabled True to enable loopback mode.
4993  * @param {function(number)} callback Called when the configuration operation is
4994  *     done.
4995  */
4996 chrome.socket.setMulticastLoopbackMode = function(socketId, enabled,
4997     callback) {};
5001  * @param {number} socketId The id of the socket.
5002  * @param {function(!Array.<string>)} callback Called with an array of string
5003  *     groups.
5004  */
5005 chrome.socket.getJoinedGroups = function(socketId, callback) {};
5009   * @const
5010   */
5011 chrome.sockets = {};
5015   * @const
5016   * @see https://developer.chrome.com/apps/sockets_tcp
5017   */
5018 chrome.sockets.tcp = {};
5023  * @constructor
5024  * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketInfo
5025  */
5026 chrome.sockets.tcp.SocketInfo = function() {};
5029 /** @type {number} */
5030 chrome.sockets.tcp.SocketInfo.prototype.socketId;
5033 /** @type {boolean} */
5034 chrome.sockets.tcp.SocketInfo.prototype.persistent;
5037 /** @type {string|undefined} */
5038 chrome.sockets.tcp.SocketInfo.prototype.name;
5041 /** @type {number|undefined} */
5042 chrome.sockets.tcp.SocketInfo.prototype.bufferSize;
5045 /** @type {boolean} */
5046 chrome.sockets.tcp.SocketInfo.prototype.paused;
5049 /** @type {boolean} */
5050 chrome.sockets.tcp.SocketInfo.prototype.connected;
5053 /** @type {string|undefined} */
5054 chrome.sockets.tcp.SocketInfo.prototype.localAddress;
5057 /** @type {number|undefined} */
5058 chrome.sockets.tcp.SocketInfo.prototype.localPort;
5061 /** @type {string|undefined} */
5062 chrome.sockets.tcp.SocketInfo.prototype.peerAddress;
5065 /** @type {number|undefined} */
5066 chrome.sockets.tcp.SocketInfo.prototype.peerPort;
5070  * @typedef {?{
5071  *   persistent: (boolean|undefined),
5072  *   name: (string|undefined),
5073  *   bufferSize: (number|undefined)
5074  * }}
5075  * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketProperties
5076  */
5077 chrome.sockets.tcp.SocketProperties;
5081  * @typedef {?{
5082  *   min: (string|undefined),
5083  *   max: (string|undefined)
5084  * }}
5085  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5086  */
5087 chrome.sockets.tcp.SecurePropertiesTlsVersion;
5091  * @typedef {?{
5092  *   tlsVersion: (chrome.sockets.tcp.SecurePropertiesTlsVersion|undefined)
5093  * }}
5094  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5095  */
5096 chrome.sockets.tcp.SecureProperties;
5100  * @param {!chrome.sockets.tcp.SocketProperties|
5101  *     function(!Object)} propertiesOrCallback
5102  * @param {function(!Object)=} opt_callback
5103  * @see https://developer.chrome.com/apps/sockets_tcp#method-create
5104  */
5105 chrome.sockets.tcp.create = function(propertiesOrCallback, opt_callback) {};
5109  * @param {number} socketId
5110  * @param {!chrome.sockets.tcp.SocketProperties} properties
5111  * @param {function()=} opt_callback
5112  * @see https://developer.chrome.com/apps/sockets_tcp#method-update
5113  */
5114 chrome.sockets.tcp.update = function(socketId, properties, opt_callback) {};
5118  * @param {number} socketId
5119  * @param {boolean} paused
5120  * @param {function()=} opt_callback
5121  * @see https://developer.chrome.com/apps/sockets_tcp#method-setPaused
5122  */
5123 chrome.sockets.tcp.setPaused = function(socketId, paused, opt_callback) {};
5127  * @param {number} socketId
5128  * @param {boolean} enable
5129  * @param {(number|function(number))} delayOrCallback
5130  * @param {function(number)=} opt_callback
5131  * @see https://developer.chrome.com/apps/sockets_tcp#method-setKeepAlive
5132  */
5133 chrome.sockets.tcp.setKeepAlive = function(socketId, enable, delayOrCallback,
5134     opt_callback) {};
5138  * @param {number} socketId
5139  * @param {boolean} noDelay
5140  * @param {function(number)} callback
5141  * @see https://developer.chrome.com/apps/sockets_tcp#method-setNoDelay
5142  */
5143 chrome.sockets.tcp.setNoDelay = function(socketId, noDelay, callback) {};
5147  * @param {number} socketId
5148  * @param {string} peerAddress
5149  * @param {number} peerPort
5150  * @param {function(number)} callback
5151  * @see https://developer.chrome.com/apps/sockets_tcp#method-connect
5152  */
5153 chrome.sockets.tcp.connect = function(socketId, peerAddress, peerPort,
5154     callback) {};
5158  * @param {number} socketId The id of the socket to disconnect.
5159  * @param {function()=} opt_callback
5160  * @see https://developer.chrome.com/apps/sockets_tcp#method-disconnect
5161  */
5162 chrome.sockets.tcp.disconnect = function(socketId, opt_callback) {};
5166  * @param {number} socketId
5167  * @param {!chrome.sockets.tcp.SecureProperties|function(number)}
5168  *     optionsOrCallback
5169  * @param {function(number)=} opt_callback
5170  * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5171  */
5172 chrome.sockets.tcp.secure = function(socketId, optionsOrCallback,
5173     opt_callback) {};
5177  * @param {number} socketId
5178  * @param {!ArrayBuffer} data
5179  * @param {function(!Object)} callback
5180  * @see https://developer.chrome.com/apps/sockets_tcp#method-send
5181  */
5182 chrome.sockets.tcp.send = function(socketId, data, callback) {};
5186  * @param {number} socketId
5187  * @param {function()=} opt_callback
5188  * @see https://developer.chrome.com/apps/sockets_tcp#method-close
5189  */
5190 chrome.sockets.tcp.close = function(socketId, opt_callback) {};
5194  * @param {number} socketId
5195  * @param {function(!chrome.sockets.tcp.SocketInfo)} callback
5196  * @see https://developer.chrome.com/apps/sockets_tcp#method-getInfo
5197  */
5198 chrome.sockets.tcp.getInfo = function(socketId, callback) {};
5202  * @param {function(!Array.<!chrome.sockets.tcp.SocketInfo>)} callback
5203  * @see https://developer.chrome.com/apps/sockets_tcp#method-getSockets
5204  */
5205 chrome.sockets.tcp.getSockets = function(callback) {};
5210  * @constructor
5211  * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceive
5212  */
5213 chrome.sockets.tcp.ReceiveEventData = function() {};
5216 /** @type {number} */
5217 chrome.sockets.tcp.ReceiveEventData.prototype.socketId;
5220 /** @type {!ArrayBuffer} */
5221 chrome.sockets.tcp.ReceiveEventData.prototype.data;
5226  * Event whose listeners take a ReceiveEventData parameter.
5227  * @constructor
5228  */
5229 chrome.sockets.tcp.ReceiveEvent = function() {};
5233  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5234  */
5235 chrome.sockets.tcp.ReceiveEvent.prototype.addListener =
5236     function(callback) {};
5240  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5241  */
5242 chrome.sockets.tcp.ReceiveEvent.prototype.removeListener =
5243     function(callback) {};
5247  * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5248  * @return {boolean}
5249  */
5250 chrome.sockets.tcp.ReceiveEvent.prototype.hasListener =
5251     function(callback) {};
5254 /** @return {boolean} */
5255 chrome.sockets.tcp.ReceiveEvent.prototype.hasListeners = function() {};
5258 /** @type {!chrome.sockets.tcp.ReceiveEvent} */
5259 chrome.sockets.tcp.onReceive;
5264  * @constructor
5265  * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceiveError
5266  */
5267 chrome.sockets.tcp.ReceiveErrorEventData = function() {};
5270 /** @type {number} */
5271 chrome.sockets.tcp.ReceiveErrorEventData.prototype.socketId;
5274 /** @type {number} */
5275 chrome.sockets.tcp.ReceiveErrorEventData.prototype.resultCode;
5280  * Event whose listeners take a ReceiveErrorEventData parameter.
5281  * @constructor
5282  */
5283 chrome.sockets.tcp.ReceiveErrorEvent = function() {};
5287  * @param {function(
5288  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5289  */
5290 chrome.sockets.tcp.ReceiveErrorEvent.prototype.addListener =
5291     function(callback) {};
5295  * @param {function(
5296  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5297  */
5298 chrome.sockets.tcp.ReceiveErrorEvent.prototype.removeListener =
5299     function(callback) {};
5303  * @param {function(
5304  *     !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5305  * @return {boolean}
5306  */
5307 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListener =
5308     function(callback) {};
5311 /** @return {boolean} */
5312 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListeners =
5313     function() {};
5316 /** @type {!chrome.sockets.tcp.ReceiveErrorEvent} */
5317 chrome.sockets.tcp.onReceiveError;
5321  * @const
5322  * @see https://developer.chrome.com/extensions/storage.html
5323  */
5324 chrome.storage = {};
5327 /** @type {!StorageArea} */
5328 chrome.storage.sync;
5331 /** @type {!StorageArea} */
5332 chrome.storage.local;
5335 /** @type {!StorageChangeEvent} */
5336 chrome.storage.onChanged;
5339 /** @const */
5340 chrome.system = {};
5344  * @const
5345  * @see https://developer.chrome.com/extensions/system_cpu.html
5346  */
5347 chrome.system.cpu = {};
5351  * @param {function(!Object)} callback
5352  */
5353 chrome.system.cpu.getInfo = function(callback) {};
5357  * @const
5358  * @see http://developer.chrome.com/apps/system_display.html
5359  */
5360 chrome.system.display = {};
5363 /** @type {!ChromeEvent} */
5364 chrome.system.display.onDisplayChanged;
5369  * @constructor
5370  */
5371 chrome.system.display.Bounds = function() {};
5374 /** @type {number} */
5375 chrome.system.display.Bounds.prototype.left;
5378 /** @type {number} */
5379 chrome.system.display.Bounds.prototype.top;
5382 /** @type {number} */
5383 chrome.system.display.Bounds.prototype.width;
5386 /** @type {number} */
5387 chrome.system.display.Bounds.prototype.height;
5391  * @typedef {{
5392  *   left: (number|undefined),
5393  *   top: (number|undefined),
5394  *   right: (number|undefined),
5395  *   bottom: (number|undefined)
5396  * }}
5397  */
5398 chrome.system.display.Insets;
5403  * @constructor
5404  */
5405 chrome.system.display.DisplayInfo = function() {};
5408 /** @type {string} */
5409 chrome.system.display.DisplayInfo.prototype.id;
5412 /** @type {string} */
5413 chrome.system.display.DisplayInfo.prototype.name;
5416 /** @type {string} */
5417 chrome.system.display.DisplayInfo.prototype.mirroringSourceId;
5420 /** @type {boolean} */
5421 chrome.system.display.DisplayInfo.prototype.isPrimary;
5424 /** @type {boolean} */
5425 chrome.system.display.DisplayInfo.prototype.isInternal;
5428 /** @type {boolean} */
5429 chrome.system.display.DisplayInfo.prototype.isEnabled;
5432 /** @type {number} */
5433 chrome.system.display.DisplayInfo.prototype.dpiX;
5436 /** @type {number} */
5437 chrome.system.display.DisplayInfo.prototype.dpiY;
5440 /** @type {number} */
5441 chrome.system.display.DisplayInfo.prototype.rotation;
5444 /** @type {!chrome.system.display.Bounds} */
5445 chrome.system.display.DisplayInfo.prototype.bounds;
5448 /** @type {!chrome.system.display.Insets} */
5449 chrome.system.display.DisplayInfo.prototype.overscan;
5452 /** @type {!chrome.system.display.Bounds} */
5453 chrome.system.display.DisplayInfo.prototype.workArea;
5457  * @typedef {{
5458  *   mirroringSourceId: (string|undefined),
5459  *   isPrimary: (boolean|undefined),
5460  *   overscan: (!chrome.system.display.Insets|undefined),
5461  *   rotation: (number|undefined),
5462  *   boundsOriginX: (number|undefined),
5463  *   boundsOriginY: (number|undefined)
5464  * }}
5465  */
5466 chrome.system.display.SettableDisplayInfo;
5469 chrome.types = {};
5473  * @typedef {?{
5474  *   format: (string|undefined),
5475  *   quality: (number|undefined)
5476  * }}
5477  */
5478 chrome.types.ImageDetails;
5482  * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
5483  *     callback Called with an array of objects representing display info.
5484  */
5485 chrome.system.display.getInfo = function(callback) {};
5489  * @param {string} id The display's unique identifier.
5490  * @param {!chrome.system.display.SettableDisplayInfo} info The information
5491  *     about display properties that should be changed.
5492  * @param {function()=} opt_callback The callback to execute when the display
5493  *     info has been changed.
5494  */
5495 chrome.system.display.setDisplayProperties =
5496     function(id, info, opt_callback) {};
5500  * @const
5501  * @see https://developer.chrome.com/extensions/types.html
5502  */
5503 chrome.chromeSetting = {};
5506 /** @type {!ChromeEvent} */
5507 chrome.chromeSetting.onChange;
5511  * @const
5512  * @see https://developer.chrome.com/extensions/webNavigation.html
5513  */
5514 chrome.webNavigation = {};
5518  * @param {Object} details Object with a 'tabId' (number) key.
5519  * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
5520  *     Callback function.
5521  */
5522 chrome.webNavigation.getAllFrames = function(details, callback) {};
5526  * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
5527  *     keys.
5528  * @param {function(Object.<string, (boolean|string)>)} callback
5529  *     Callback function.
5530  */
5531 chrome.webNavigation.getFrame = function(details, callback) {};
5534 /** @type {!ChromeEvent} */
5535 chrome.webNavigation.onBeforeNavigate;
5538 /** @type {!ChromeEvent} */
5539 chrome.webNavigation.onCommitted;
5542 /** @type {!ChromeEvent} */
5543 chrome.webNavigation.onDOMContentLoaded;
5546 /** @type {!ChromeEvent} */
5547 chrome.webNavigation.onCompleted;
5550 /** @type {!ChromeEvent} */
5551 chrome.webNavigation.onErrorOccurred;
5554 /** @type {!ChromeEvent} */
5555 chrome.webNavigation.onCreatedNavigationTarget;
5558 /** @type {!ChromeEvent} */
5559 chrome.webNavigation.onReferenceFragmentUpdated;
5562 /** @type {!ChromeEvent} */
5563 chrome.webNavigation.onTabReplaced;
5566 /** @type {!ChromeEvent} */
5567 chrome.webNavigation.onHistoryStateUpdated;
5572  * Most event listeners for WebRequest take extra arguments.
5573  * @see https://developer.chrome.com/extensions/webRequest.html.
5574  * @constructor
5575  */
5576 function WebRequestEvent() {}
5580  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5581  *     function.
5582  * @param {!RequestFilter} filter A set of filters that restrict
5583  *     the events that will be sent to this listener.
5584  * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
5585  *     that should be passed to the listener function.
5586  */
5587 WebRequestEvent.prototype.addListener =
5588     function(listener, filter, opt_extraInfoSpec) {};
5592  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5593  *     function.
5594  */
5595 WebRequestEvent.prototype.removeListener = function(listener) {};
5599  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5600  *     function.
5601  */
5602 WebRequestEvent.prototype.hasListener = function(listener) {};
5606  * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5607  *     function.
5608  */
5609 WebRequestEvent.prototype.hasListeners = function(listener) {};
5614  * The onErrorOccurred event takes one less parameter than the others.
5615  * @see https://developer.chrome.com/extensions/webRequest.html.
5616  * @constructor
5617  */
5618 function WebRequestOnErrorOccurredEvent() {}
5622  * @param {function(!Object): void} listener Listener function.
5623  * @param {!RequestFilter} filter A set of filters that restrict
5624  *     the events that will be sent to this listener.
5625  */
5626 WebRequestOnErrorOccurredEvent.prototype.addListener =
5627     function(listener, filter) {};
5631  * @param {function(!Object): void} listener Listener function.
5632  */
5633 WebRequestOnErrorOccurredEvent.prototype.removeListener = function(listener) {};
5637  * @param {function(!Object): void} listener Listener function.
5638  */
5639 WebRequestOnErrorOccurredEvent.prototype.hasListener = function(listener) {};
5643  * @param {function(!Object): void} listener Listener function.
5644  */
5645 WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
5649  * @const
5650  * @see https://developer.chrome.com/extensions/webRequest.html
5651  */
5652 chrome.webRequest = {};
5656  * @param {function(): void=} opt_callback Callback function.
5657  */
5658 chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
5661 /** @type {!WebRequestEvent} */
5662 chrome.webRequest.onAuthRequired;
5665 /** @type {!WebRequestEvent} */
5666 chrome.webRequest.onBeforeRedirect;
5669 /** @type {!WebRequestEvent} */
5670 chrome.webRequest.onBeforeRequest;
5673 /** @type {!WebRequestEvent} */
5674 chrome.webRequest.onBeforeSendHeaders;
5677 /** @type {!WebRequestEvent} */
5678 chrome.webRequest.onCompleted;
5681 /** @type {!WebRequestOnErrorOccurredEvent} */
5682 chrome.webRequest.onErrorOccurred;
5685 /** @type {!WebRequestEvent} */
5686 chrome.webRequest.onHeadersReceived;
5689 /** @type {!WebRequestEvent} */
5690 chrome.webRequest.onResponseStarted;
5693 /** @type {!WebRequestEvent} */
5694 chrome.webRequest.onSendHeaders;
5697 // Classes
5702  * @see https://developer.chrome.com/extensions/management.html
5703  * @constructor
5704  */
5705 function ExtensionInfo() {}
5708 /** @type {string} */
5709 ExtensionInfo.prototype.id;
5712 /** @type {string} */
5713 ExtensionInfo.prototype.name;
5716 /** @type {string} */
5717 ExtensionInfo.prototype.shortName;
5720 /** @type {string} */
5721 ExtensionInfo.prototype.description;
5724 /** @type {string} */
5725 ExtensionInfo.prototype.version;
5728 /** @type {boolean} */
5729 ExtensionInfo.prototype.mayDisable;
5732 /** @type {boolean} */
5733 ExtensionInfo.prototype.enabled;
5736 /** @type {string|undefined} */
5737 ExtensionInfo.prototype.disabledReason;
5740 /** @type {boolean} */
5741 ExtensionInfo.prototype.isApp;
5744 /** @type {string} */
5745 ExtensionInfo.prototype.type;
5748 /** @type {string|undefined} */
5749 ExtensionInfo.prototype.appLaunchUrl;
5752 /** @type {string|undefined} */
5753 ExtensionInfo.prototype.homepageUrl;
5756 /** @type {string|undefined} */
5757 ExtensionInfo.prototype.updateUrl;
5760 /** @type {boolean} */
5761 ExtensionInfo.prototype.offlineEnabled;
5764 /** @type {string} */
5765 ExtensionInfo.prototype.optionsUrl;
5768 /** @type {!Array.<!IconInfo>|undefined} */
5769 ExtensionInfo.prototype.icons;
5772 /** @type {!Array.<string>} */
5773 ExtensionInfo.prototype.permissions;
5776 /** @type {!Array.<string>} */
5777 ExtensionInfo.prototype.hostPermissions;
5780 /** @type {string} */
5781 ExtensionInfo.prototype.installType;
5784 /** @type {string|undefined} */
5785 ExtensionInfo.prototype.launchType;
5788 /** @type {!Array.<string>|undefined} */
5789 ExtensionInfo.prototype.availableLaunchTypes;
5794  * @see https://developer.chrome.com/extensions/management.html
5795  * @constructor
5796  */
5797 function IconInfo() {}
5800 /** @type {number} */
5801 IconInfo.prototype.size;
5804 /** @type {string} */
5805 IconInfo.prototype.url;
5812  * @see https://developer.chrome.com/extensions/windows.html
5813  * @constructor
5814  */
5815 function ChromeWindow() {}
5818 /** @type {number} */
5819 ChromeWindow.prototype.id;
5822 /** @type {boolean} */
5823 ChromeWindow.prototype.focused;
5826 /** @type {number} */
5827 ChromeWindow.prototype.top;
5830 /** @type {number} */
5831 ChromeWindow.prototype.left;
5834 /** @type {number} */
5835 ChromeWindow.prototype.width;
5838 /** @type {number} */
5839 ChromeWindow.prototype.height;
5842 /** @type {Array.<Tab>} */
5843 ChromeWindow.prototype.tabs;
5846 /** @type {boolean} */
5847 ChromeWindow.prototype.incognito;
5850 /** @type {string} */
5851 ChromeWindow.prototype.type;
5854 /** @type {string} */
5855 ChromeWindow.prototype.state;
5858 /** @type {boolean} */
5859 ChromeWindow.prototype.alwaysOnTop;
5864  * Event whose listeners take an ExtensionInfo parameter.
5865  * @constructor
5866  */
5867 function ChromeExtensionInfoEvent() {}
5870 /** @param {function(!ExtensionInfo): void} callback */
5871 ChromeExtensionInfoEvent.prototype.addListener = function(callback) {};
5874 /** @param {function(!ExtensionInfo): void} callback */
5875 ChromeExtensionInfoEvent.prototype.removeListener = function(callback) {};
5879  * @param {function(!ExtensionInfo): void} callback
5880  * @return {boolean}
5881  */
5882 ChromeExtensionInfoEvent.prototype.hasListener = function(callback) {};
5885 /** @return {boolean} */
5886 ChromeExtensionInfoEvent.prototype.hasListeners = function() {};
5891  * @see http://developer.chrome.com/extensions/pushMessaging.html
5892  * @const
5893  */
5894 chrome.pushMessaging = {};
5898  * @type {!chrome.pushMessaging.PushMessageEvent}
5899  */
5900 chrome.pushMessaging.onMessage;
5904  * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
5905  *     interactiveOrCallback Either a flag(optional), if set to true, user will
5906  *     be asked to log in if they are not already logged in, or, when he flag is
5907  *     not given, the callback.
5908  * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
5909  *     Callback.
5910  */
5911 chrome.pushMessaging.getChannelId =
5912     function(interactiveOrCallback, opt_callback) {};
5917  * Event whose listeners take a chrome.pushMessaging.Message parameter.
5918  * @constructor
5919  */
5920 chrome.pushMessaging.PushMessageEvent = function() {};
5924  * @param {function(!chrome.pushMessaging.Message): void} callback
5925  */
5926 chrome.pushMessaging.PushMessageEvent.prototype.addListener =
5927     function(callback) {};
5931  * @param {function(!chrome.pushMessaging.Message): void} callback
5932  */
5933 chrome.pushMessaging.PushMessageEvent.prototype.removeListener =
5934     function(callback) {};
5938  * @param {function(!chrome.pushMessaging.Message): void} callback
5939  * @return {boolean}
5940  */
5941 chrome.pushMessaging.PushMessageEvent.prototype.hasListener =
5942     function(callback) {};
5946  * @return {boolean}
5947  */
5948 chrome.pushMessaging.PushMessageEvent.prototype.hasListeners = function() {};
5954  * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
5955  * @constructor
5956  */
5957 function BookmarkTreeNode() {}
5960 /** @type {string} */
5961 BookmarkTreeNode.prototype.id;
5964 /** @type {string|undefined} */
5965 BookmarkTreeNode.prototype.parentId;
5968 /** @type {number|undefined} */
5969 BookmarkTreeNode.prototype.index;
5972 /** @type {string|undefined} */
5973 BookmarkTreeNode.prototype.url;
5976 /** @type {string} */
5977 BookmarkTreeNode.prototype.title;
5980 /** @type {number|undefined} */
5981 BookmarkTreeNode.prototype.dateAdded;
5984 /** @type {number|undefined} */
5985 BookmarkTreeNode.prototype.dateGroupModified;
5988 /** @type {string|undefined} */
5989 BookmarkTreeNode.prototype.unmodifiable;
5992 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
5993 BookmarkTreeNode.prototype.children;
5998  * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
5999  * @constructor
6000  */
6001 function Cookie() {}
6004 /** @type {string} */
6005 Cookie.prototype.name;
6008 /** @type {string} */
6009 Cookie.prototype.value;
6012 /** @type {string} */
6013 Cookie.prototype.domain;
6016 /** @type {boolean} */
6017 Cookie.prototype.hostOnly;
6020 /** @type {string} */
6021 Cookie.prototype.path;
6024 /** @type {boolean} */
6025 Cookie.prototype.secure;
6028 /** @type {boolean} */
6029 Cookie.prototype.httpOnly;
6032 /** @type {boolean} */
6033 Cookie.prototype.session;
6036 /** @type {number} */
6037 Cookie.prototype.expirationDate;
6040 /** @type {string} */
6041 Cookie.prototype.storeId;
6046  * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
6047  * @constructor
6048  */
6049 function CookieStore() {}
6052 /** @type {string} */
6053 CookieStore.prototype.id;
6056 /** @type {Array.<number>} */
6057 CookieStore.prototype.tabIds;
6062  * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
6063  * @constructor
6064  */
6065 function OnClickData() {}
6068 /** @type {number} */
6069 OnClickData.prototype.menuItemId;
6072 /** @type {number} */
6073 OnClickData.prototype.parentMenuItemId;
6076 /** @type {string} */
6077 OnClickData.prototype.mediaType;
6080 /** @type {string} */
6081 OnClickData.prototype.linkUrl;
6084 /** @type {string} */
6085 OnClickData.prototype.srcUrl;
6088 /** @type {string} */
6089 OnClickData.prototype.pageUrl;
6092 /** @type {string} */
6093 OnClickData.prototype.frameUrl;
6096 /** @type {string} */
6097 OnClickData.prototype.selectionText;
6100 /** @type {string} */
6101 OnClickData.prototype.editable;
6106  * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
6107  * @constructor
6108  */
6109 function Debuggee() {}
6112 /** @type {number} */
6113 Debuggee.prototype.tabId;
6118  * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
6119  * @constructor
6120  */
6121 function ResourceIdentifier() {}
6124 /** @type {string} */
6125 ResourceIdentifier.prototype.id;
6128 /** @type {string} */
6129 ResourceIdentifier.prototype.description;
6134  * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
6135  * @constructor
6136  */
6137 function ContentSetting() {}
6141  * @param {!Object.<string,string>} details Settings details.
6142  * @param {function(): void=} opt_callback Callback function.
6143  */
6144 ContentSetting.prototype.clear = function(details, opt_callback) {};
6148  * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
6149  *     Settings details.
6150  * @param {function(): void} callback Callback function.
6151  */
6152 ContentSetting.prototype.get = function(details, callback) {};
6156  * @param {function(): void} callback Callback function.
6157  */
6158 ContentSetting.prototype.getResourceIdentifiers = function(callback) {};
6162  * @param {!Object.<string,(string|ResourceIdentifier)>} details
6163  *     Settings details.
6164  * @param {function(): void=} opt_callback Callback function.
6165  */
6166 ContentSetting.prototype.set = function(details, opt_callback) {};
6171  * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
6172  * @constructor
6173  */
6174 function HistoryItem() {}
6177 /** @type {string} */
6178 HistoryItem.prototype.id;
6181 /** @type {string} */
6182 HistoryItem.prototype.url;
6185 /** @type {string} */
6186 HistoryItem.prototype.title;
6189 /** @type {number} */
6190 HistoryItem.prototype.lastVisitTime;
6193 /** @type {number} */
6194 HistoryItem.prototype.visitCount;
6197 /** @type {number} */
6198 HistoryItem.prototype.typedCount;
6203  * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
6204  * @constructor
6205  */
6206 function VisitItem() {}
6209 /** @type {string} */
6210 VisitItem.prototype.id;
6213 /** @type {string} */
6214 VisitItem.prototype.visitId;
6217 /** @type {number} */
6218 VisitItem.prototype.visitTime;
6221 /** @type {string} */
6222 VisitItem.prototype.referringVisitId;
6225 /** @type {string} */
6226 VisitItem.prototype.transition;
6231  * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
6232  * @constructor
6233  */
6234 function FileHandlerExecuteEventDetails() {}
6237 /** @type {!Array.<!FileEntry>} */
6238 FileHandlerExecuteEventDetails.prototype.entries;
6241 /** @type {number|undefined} */
6242 FileHandlerExecuteEventDetails.prototype.tab_id;
6247  * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
6248  * @constructor
6249  */
6250 function ChromeKeyboardEvent() {}
6253 /** @type {string} */
6254 ChromeKeyboardEvent.prototype.type;
6257 /** @type {string} */
6258 ChromeKeyboardEvent.prototype.requestId;
6261 /** @type {string|undefined} */
6262 ChromeKeyboardEvent.prototype.extensionId;
6265 /** @type {string} */
6266 ChromeKeyboardEvent.prototype.key;
6269 /** @type {string} */
6270 ChromeKeyboardEvent.prototype.code;
6273 /** @type {number|undefined} */
6274 ChromeKeyboardEvent.prototype.keyCode;
6277 /** @type {boolean|undefined} */
6278 ChromeKeyboardEvent.prototype.altKey;
6281 /** @type {boolean|undefined} */
6282 ChromeKeyboardEvent.prototype.ctrlKey;
6285 /** @type {boolean|undefined} */
6286 ChromeKeyboardEvent.prototype.shiftKey;
6289 /** @type {boolean|undefined} */
6290 ChromeKeyboardEvent.prototype.capsLock;
6295  * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
6296  * @constructor
6297  */
6298 function InputContext() {}
6301 /** @type {number} */
6302 InputContext.prototype.contextID;
6305 /** @type {string} */
6306 InputContext.prototype.type;
6311  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
6312  * @constructor
6313  */
6314 function ProxyServer() {}
6317 /** @type {string} */
6318 ProxyServer.prototype.scheme;
6321 /** @type {string} */
6322 ProxyServer.prototype.host;
6325 /** @type {number} */
6326 ProxyServer.prototype.port;
6331  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
6332  * @constructor
6333  */
6334 function ProxyRules() {}
6337 /** @type {ProxyServer} */
6338 ProxyRules.prototype.singleProxy;
6341 /** @type {ProxyServer} */
6342 ProxyRules.prototype.proxyForHttp;
6345 /** @type {ProxyServer} */
6346 ProxyRules.prototype.proxyForHttps;
6349 /** @type {ProxyServer} */
6350 ProxyRules.prototype.proxyForFtp;
6353 /** @type {ProxyServer} */
6354 ProxyRules.prototype.fallbackProxy;
6357 /** @type {!Array.<string>} */
6358 ProxyRules.prototype.bypassList;
6363  * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
6364  * @constructor
6365  */
6366 function PacScript() {}
6369 /** @type {string} */
6370 PacScript.prototype.url;
6373 /** @type {string} */
6374 PacScript.prototype.data;
6377 /** @type {boolean} */
6378 PacScript.prototype.mandatory;
6383  * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
6384  * @constructor
6385  */
6386 function ProxyConfig() {}
6389 /** @type {ProxyRules} */
6390 ProxyConfig.prototype.rules;
6393 /** @type {PacScript} */
6394 ProxyConfig.prototype.pacScript;
6397 /** @type {string} */
6398 ProxyConfig.prototype.mode;
6403  * The event listener for Storage receives an Object mapping each
6404  * key that changed to its corresponding StorageChange for that item.
6406  * @see https://developer.chrome.com/extensions/storage.html
6407  * @constructor
6408  */
6409 function StorageChangeEvent() {}
6413  * @param {function(!Object.<string, !StorageChange>, string)} callback
6414  *    Listener will receive an object that maps each key to its StorageChange,
6415  *    and the namespace ("sync" or "local") of the storage area the changes
6416  *    are for.
6417  */
6418 StorageChangeEvent.prototype.addListener = function(callback) {};
6421 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6422 StorageChangeEvent.prototype.removeListener = function(callback) {};
6425 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6426 StorageChangeEvent.prototype.hasListener = function(callback) {};
6429 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6430 StorageChangeEvent.prototype.hasListeners = function(callback) {};
6435  * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
6436  * @constructor
6437  */
6438 function StorageChange() {}
6441 /** @type {?} */
6442 StorageChange.prototype.oldValue;
6445 /** @type {?} */
6446 StorageChange.prototype.newValue;
6451  * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
6452  * @constructor
6453  */
6454 function StorageArea() {}
6458  * Removes all items from storage.
6459  * @param {function(): void=} opt_callback Callback function.
6460  */
6461 StorageArea.prototype.clear = function(opt_callback) {};
6465  * @param {(string|!Array.<string>|!Object|null)=} opt_keys
6466  *    A single key to get, list of keys to get, or a dictionary
6467  *    specifying default values (see description of the
6468  *    object). An empty list or object will return an empty
6469  *    result object. Pass in null to get the entire contents of storage.
6470  * @param {function(Object)=} opt_callback Callback with storage items, or null
6471  *    on failure.
6472  */
6473 StorageArea.prototype.get = function(opt_keys, opt_callback) {};
6477  * @param {(string|!Array.<string>)} keys
6478  *    A single key or a list of keys for items to remove.
6479  * @param {function()=} opt_callback Callback.
6480  */
6481 StorageArea.prototype.remove = function(keys, opt_callback) {};
6485  * @param {!Object.<string>} keys
6486  *    Object specifying items to augment storage
6487  *    with. Values that cannot be serialized (functions, etc) will be ignored.
6488  * @param {function()=} opt_callback Callback.
6489  */
6490 StorageArea.prototype.set = function(keys, opt_callback) { };
6494  * @param {(string|!Array.<string>|null)=} opt_keys
6495  *    A single key or list of keys to get the total usage for. An empty list
6496  *    will return 0. Pass in null to get the total usage of all of storage.
6497  * @param {function(number)=} opt_callback
6498  *    Callback with the amount of space being used by storage.
6499  */
6500 StorageArea.prototype.getBytesInUse = function(opt_keys, opt_callback) { };
6505  * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
6506  * @constructor
6507  */
6508 function ChromeSetting() {}
6512  * @param {Object} details Object with a 'scope' (string) key.
6513  * @param {function(): void=} opt_callback Callback function.
6514  */
6515 ChromeSetting.prototype.clear = function(details, opt_callback) {};
6519  * @param {Object} details Object with an 'incognito' (boolean) key.
6520  * @param {function(Object.<string, *>): void} callback Callback function.
6521  */
6522 ChromeSetting.prototype.get = function(details, callback) {};
6526  * @param {Object} details Object with a 'value' (*) key and an optional
6527  *     'scope' (string) key.
6528  * @param {function(): void=} opt_callback Callback function.
6529  */
6530 ChromeSetting.prototype.set = function(details, opt_callback) {};
6533 /** @type {!ChromeObjectEvent} */
6534 ChromeSetting.prototype.onChange;
6539  * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
6540  * @constructor
6541  */
6542 function RequestFilter() {}
6545 /** @type {!Array.<string>} */
6546 RequestFilter.prototype.urls;
6549 /** @type {!Array.<string>} */
6550 RequestFilter.prototype.types;
6553 /** @type {number} */
6554 RequestFilter.prototype.tabId;
6557 /** @type {number} */
6558 RequestFilter.prototype.windowId;
6563  * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6564  * @constructor
6565  */
6566 function HttpHeader() {}
6569 /** @type {string} */
6570 HttpHeader.prototype.name;
6573 /** @type {string} */
6574 HttpHeader.prototype.value;
6577 /** @type {!Array.<number>} */
6578 HttpHeader.prototype.binaryValue;
6582  * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6583  * @typedef {Array.<!HttpHeader>}
6584  * @private
6585  */
6586 var HttpHeaders_;
6591  * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
6592  * @constructor
6593  */
6594 function BlockingResponse() {}
6597 /** @type {boolean} */
6598 BlockingResponse.prototype.cancel;
6601 /** @type {string} */
6602 BlockingResponse.prototype.redirectUrl;
6605 /** @type {!HttpHeaders_} */
6606 BlockingResponse.prototype.requestHeaders;
6609 /** @type {!HttpHeaders_} */
6610 BlockingResponse.prototype.responseHeaders;
6613 /** @type {Object.<string,string>} */
6614 BlockingResponse.prototype.authCredentials;
6619  * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
6620  * @constructor
6621  */
6622 chrome.pushMessaging.Message = function() {};
6626  * @type {number}
6627  */
6628 chrome.pushMessaging.Message.prototype.subchannelId;
6632  * @type {string}
6633  */
6634 chrome.pushMessaging.Message.prototype.payload;
6639  * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
6640  * @constructor
6641  */
6642 chrome.pushMessaging.ChannelIdResult = function() {};
6646  * @type {string}
6647  */
6648 chrome.pushMessaging.ChannelIdResult.prototype.channelId;
6652  * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
6653  * defined in {@code javascript/externs/fileapi.js}.
6654  * @const
6655  * @see http://developer.chrome.com/apps/fileSystem.html
6656  */
6657 chrome.fileSystem = {};
6661  * @param {!Entry} entry The entry to get the display path for. The entry can
6662  *     originally be obtained through
6663  *     {@code chrome.fileSystem.chooseEntry} or
6664  *     {@code chrome.fileSystem.restoreEntry}.
6665  * @param {function(string)} callback A success callback.
6666  * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
6667  */
6668 chrome.fileSystem.getDisplayPath = function(entry, callback) {};
6672  * @param {!Entry} entry The entry to get a writable entry for.
6673  * @param {function(!Entry)} callback A success callback.
6674  * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
6675  */
6676 chrome.fileSystem.getWritableEntry = function(entry, callback) {};
6680  * @param {!Entry} entry The entry to query writability.
6681  * @param {function(boolean)} callback A success callback.
6682  * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
6683  */
6684 chrome.fileSystem.isWritableEntry = function(entry, callback) {};
6688  * @typedef {{
6689  *   description: (string|undefined),
6690  *   mimeTypes: (!Array.<string>|undefined),
6691  *   extensions: (!Array.<string>|undefined)
6692  * }}
6693  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6694  */
6695 chrome.fileSystem.AcceptsOption;
6699  * @typedef {{
6700  *   type: (string|undefined),
6701  *   suggestedName: (string|undefined),
6702  *   accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
6703  *   acceptsAllTypes: (boolean|undefined),
6704  *   acceptsMultiple: (boolean|undefined)
6705  * }}
6706  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6707  */
6708 chrome.fileSystem.ChooseEntryOptions;
6712  * @typedef {?{
6713  *   volumeId: string,
6714  *   writable: (boolean|undefined)
6715  * }}
6716  * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6717  */
6718 chrome.fileSystem.RequestFileSystemOptions;
6722  * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6723  * @constructor
6724  */
6725 chrome.fileSystem.Volume = function() {};
6728 /** @type {string} */
6729 chrome.fileSystem.Volume.prototype.volumeId;
6732 /** @type {boolean} */
6733 chrome.fileSystem.Volume.prototype.writable;
6737  * @param {!chrome.fileSystem.ChooseEntryOptions|
6738  *     function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
6739  *     options for the file prompt or the callback.
6740  * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
6741  *     callback, if arg1 is options.
6742  * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6743  */
6744 chrome.fileSystem.chooseEntry = function(optionsOrCallback, opt_callback) {};
6748  * @param {string} id The ID of the file entry to restore.
6749  * @param {function(!Entry)} callback A success callback.
6750  * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
6751  */
6752 chrome.fileSystem.restoreEntry = function(id, callback) {};
6756  * @param {string} id The ID of the file entry to query restorability.
6757  * @param {function(boolean)} callback A success callback.
6758  * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
6759  */
6760 chrome.fileSystem.isRestorable = function(id, callback) {};
6764  * @param {!Entry} entry The entry to regain access to.
6765  * @return {string} The ID that can be passed to restoreEntry to regain access
6766  *     to the given file entry.
6767  * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
6768  */
6769 chrome.fileSystem.retainEntry = function(entry) {};
6773  * @param {!chrome.fileSystem.RequestFileSystemOptions} options Options for the
6774  *     request.
6775  * @param {function(!FileSystem=)} callback A completion callback with the file
6776  *     system in case of a success. Otherwise the error is passed as
6777  *     chrome.runtime.lastError.
6778  * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6779  */
6780 chrome.fileSystem.requestFileSystem = function(options, callback) {};
6784  * @param {function(!Array<!chrome.fileSystem.Volume>=)} callback A completion
6785  *     callback with the file system list in case of a success. Otherwise the
6786  *     error is passed as chrome.runtime.lastError.
6787  * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6788  */
6789 chrome.fileSystem.getVolumeList = function(callback) {};
6793  * @const
6794  * @see https://developer.chrome.com/apps/syncFileSystem
6795  */
6796 chrome.syncFileSystem = {};
6800  * Returns a syncable filesystem backed by Google Drive. The returned
6801  * DOMFileSystem instance can be operated on in the same way as
6802  * the Temporary and Persistant file systems (see
6803  * http://www.w3.org/TR/file-system-api/), except that the filesystem
6804  * object returned for Sync FileSystem does NOT support directory
6805  * operations (yet). You can get a list of file entries by reading
6806  * the root directory (by creating a new DirectoryReader),
6807  * but cannot create a new directory in it.
6809  * <p>Calling this multiple times from the same app will return the same
6810  * handle to the same file system.
6812  * <p>Note this call can fail. For example, if the user is not signed in
6813  * to Chrome or if there is no network operation. To handle these errors
6814  * it is important chrome.runtime.lastError is checked in the callback.
6816  * @param {function(!FileSystem)} callback A callback type for
6817  *     requestFileSystem.
6818  * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
6819  */
6820 chrome.syncFileSystem.requestFileSystem = function(callback) {};
6824  * Sets the default conflict resolution policy for the 'syncable' file
6825  * storage for the app. By default it is set to 'last_write_win'.
6826  * When conflict resolution policy is set to 'last_write_win' conflicts
6827  * for existing files are automatically resolved next time the file is updated.
6828  * {@code callback} can be optionally given to know if the request has
6829  * succeeded or not.
6831  * @param {string} policy Any of 'last_write_win' or 'manual'
6832  * @param {function()=} opt_callback
6834  * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
6835  */
6836 chrome.syncFileSystem.setConflictResolutionPolicy =
6837     function(policy, opt_callback) {};
6841  * Gets the current conflict resolution policy.
6843  * @param {function(string)} callback Accepting any of 'last_write_win'
6844  *     or 'manual'.
6845  * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
6846  */
6847 chrome.syncFileSystem.getConflictResolutionPolicy = function(callback) {};
6851  * Returns the current usage and quota in bytes for the 'syncable' file
6852  * storage for the app.
6854  * @param {!FileSystem} fileSystem
6855  * @param {function(!Object)} callback Taking an object substantially similar
6856  *     to {@code {'usageBytes': number, quotaBytes: number}}.
6857  * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
6858  */
6859 chrome.syncFileSystem.getUsageAndQuota = function(fileSystem, callback) {};
6863  * Returns the FileStatus for the given fileEntry. The status value can be
6864  * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
6865  * happens when the service's conflict resolution policy is set to 'manual'.
6867  * @param {!Entry} fileEntry
6868  * @param {function(string)} callback Called with any of 'synced', 'pending'
6869  *     or 'conflicting'.
6871  * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
6872  */
6873 chrome.syncFileSystem.getFileStatus = function(fileEntry, callback) {};
6877  * Returns each FileStatus for the given fileEntry array. Typically called
6878  * with the result from dirReader.readEntries().
6880  * @param {!Array.<!FileEntry>} fileEntries
6881  * @param {function(!Array.<!Object>)} callback Each object will look like:
6882  *     {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
6884  * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
6885  */
6886 chrome.syncFileSystem.getFileStatuses = function(fileEntries, callback) {};
6890  * Since Chrome 31.
6892  * <p>Returns the current sync backend status.
6894  * @param {function(string)} callback Arg is any of 'initializing', 'running',
6895  *     'authentication_required', 'temporary_unavailable', or 'disabled'.
6897  * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
6898  */
6899 chrome.syncFileSystem.getServiceStatus = function(callback) {};
6903  * Fired when an error or other status change has happened in the sync
6904  * backend (for example, when the sync is temporarily disabled due
6905  * to network or authentication error).
6907  * @type {!ChromeObjectEvent}
6909  * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
6910  */
6911 chrome.syncFileSystem.onServiceStatusChanged;
6915  * Fired when a file has been updated by the background sync service.
6917  * @type {!ChromeObjectEvent}
6919  * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
6920  */
6921 chrome.syncFileSystem.onFileStatusChanged;
6925  * @const
6926  * @see http://developer.chrome.com/extensions/alarms.html
6927  */
6928 chrome.alarms = {};
6932  * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
6933  * is fired. If there is another alarm with the same name (or no name if none is
6934  * specified), it will be cancelled and replaced by this alarm.
6935  * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
6936  *     the name to identify this alarm or the info used to create the alarm. If
6937  *     no name is passed, the empty string is used to identify the alarm.
6938  * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
6939  *     as arg1, the info used to create the alarm.
6940  * @see http://developer.chrome.com/extensions/alarms.html#method-create
6941  */
6942 chrome.alarms.create = function(nameOrAlarmCreateInfo, opt_alarmInfo) {};
6946  * Retrieves details about the specified alarm.
6947  * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
6948  *     of the alarm to get or the callback to invoke with the alarm. If no name
6949  *     is passed, the empty string is used to get the alarm.
6950  * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
6951  *     as arg1, the callback to invoke with the alarm.
6952  * @see http://developer.chrome.com/extensions/alarms.html#method-get
6953  */
6954 chrome.alarms.get = function(nameOrCallback, opt_callback) {};
6958  * Gets an array of all the alarms.
6959  * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
6960  * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
6961  */
6962 chrome.alarms.getAll = function(callback) {};
6966  * Clears the alarm with the given name.
6967  * @param {string=} opt_name
6968  * @param {function(boolean)=} opt_callback A callback that will be called with
6969  *     a boolean for whether the alarm was cleared.
6970  * @see http://developer.chrome.com/extensions/alarms.html#method-clear
6971  */
6972 chrome.alarms.clear = function(opt_name, opt_callback) {};
6976  * Clears all alarms.
6977  * @param {function(boolean)=} opt_callback A callback that will be called with
6978  *     a boolean for whether the alarms were cleared.
6979  * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
6980  */
6981 chrome.alarms.clearAll = function(opt_callback) {};
6985  * Fired when an alarm has elapsed. Useful for event pages.
6986  * @type {!chrome.alarms.AlarmEvent}
6987  * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
6988  */
6989 chrome.alarms.onAlarm;
6994  * @constructor
6995  */
6996 chrome.alarms.AlarmEvent = function() {};
7000  * @param {function(!chrome.alarms.Alarm): void} callback
7001  */
7002 chrome.alarms.AlarmEvent.prototype.addListener = function(callback) {};
7006  * @param {function(!chrome.alarms.Alarm): void} callback
7007  */
7008 chrome.alarms.AlarmEvent.prototype.removeListener = function(callback) {};
7012  * @param {function(!chrome.alarms.Alarm): void} callback
7013  * @return {boolean}
7014  */
7015 chrome.alarms.AlarmEvent.prototype.hasListener = function(callback) {};
7019  * @return {boolean}
7020  */
7021 chrome.alarms.AlarmEvent.prototype.hasListeners = function() {};
7026  * @interface
7027  * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
7028  */
7029 chrome.alarms.Alarm = function() {};
7033  * Name of this alarm.
7034  * @type {string}
7035  */
7036 chrome.alarms.Alarm.prototype.name;
7040  * Time at which this alarm was scheduled to fire, in milliseconds past the
7041  * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
7042  * delayed an arbitrary amount beyond this.
7043  * @type {number}
7044  */
7045 chrome.alarms.Alarm.prototype.scheduledTime;
7049  * If not null, the alarm is a repeating alarm and will fire again in
7050  * periodInMinutes minutes.
7051  * @type {?number}
7052  */
7053 chrome.alarms.Alarm.prototype.periodInMinutes;
7057  * @typedef {{
7058  *   when: (number|undefined),
7059  *   delayInMinutes: (number|undefined),
7060  *   periodInMinutes: (number|undefined)
7061  * }}
7062  * @see http://developer.chrome.com/extensions/alarms.html#method-create
7063  */
7064 chrome.alarms.AlarmCreateInfo;
7068  * @see https://developer.chrome.com/apps/hid
7069  * @const
7070  */
7071 chrome.hid = {};
7075  * @typedef {?{
7076  *   vendorId: number,
7077  *   productId: number
7078  * }}
7079  * @see https://developer.chrome.com/apps/hid#method-getDevices
7080  */
7081 chrome.hid.HidGetDevicesOptions;
7085  * @typedef {?{
7086  *   usagePage: number,
7087  *   usage: number,
7088  *   reportIds: !Array.<number>
7089  * }}
7090 * @see https://developer.chrome.com/apps/hid#method-getDevices
7092 chrome.hid.HidDeviceUsage;
7096  * @typedef {?{
7097  *   deviceId: number,
7098  *   vendorId: number,
7099  *   productId: number,
7100  *   collections: !Array.<!chrome.hid.HidDeviceUsage>,
7101  *   maxInputReportSize: number,
7102  *   maxOutputReportSize: number,
7103  *   maxFeatureReportSize: number
7104  * }}
7105 * @see https://developer.chrome.com/apps/hid#method-getDevices
7107 chrome.hid.HidDeviceInfo;
7111  * @typedef {?{
7112  *   connectionId: number
7113  * }}
7114  * @see https://developer.chrome.com/apps/hid#method-connect
7115  */
7116 chrome.hid.HidConnectInfo;
7120  * @see https://developer.chrome.com/apps/hid#method-getDevices
7121  * Enumerates all the connected HID devices specified by the
7122  * vendorId/productId/interfaceId tuple.
7123  * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
7124  *     for on target devices.
7125  * @param {function(!Array.<!Object>)} callback Invoked with a list of
7126  *     |HidDeviceInfo|s on complete.
7127  */
7128 chrome.hid.getDevices = function(options, callback) {};
7132  * @see https://developer.chrome.com/apps/hid#method-connect
7133  * Opens a connection to a HID device for communication.
7134  * @param {number} deviceId The ID of the device to open.
7135  * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
7136  *     connection succeeds, or undefined if it fails.
7137  */
7138 chrome.hid.connect = function(deviceId, callback) {};
7142  * @see https://developer.chrome.com/apps/hid#method-disconnect
7143  * Disconnects from a device.
7144  * @param {number} connectionId The connection to close.
7145  * @param {function()=} opt_callback The callback to invoke once the connection
7146  *     is closed.
7147  */
7148 chrome.hid.disconnect = function(connectionId, opt_callback) {};
7152  * @see https://developer.chrome.com/apps/hid#method-receive
7153  * Receives an input report from an HID device.
7154  * @param {number} connectionId The connection from which to receive the report.
7155  * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
7156  *     the received report.
7157  */
7158 chrome.hid.receive = function(connectionId, callback) {};
7162  * @see https://developer.chrome.com/apps/hid#method-send
7163  * Sends an output report to an HID device.
7164  * @param {number} connectionId The connection to which to send the report.
7165  * @param {number} reportId The report ID to use, or 0 if none.
7166  * @param {!ArrayBuffer} data The report data.
7167  * @param {function()} callback The callback to invoke once the write is
7168  *     finished.
7169  */
7170 chrome.hid.send = function(connectionId, reportId, data, callback) {};
7174  * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
7175  * Receives a feature report from the device.
7176  * @param {number} connectionId The connection from which to read the feature
7177  *     report.
7178  * @param {number} reportId The report ID to use, or 0 if none.
7179  * @param {number} size The size of the feature report to receive.
7180  * @param {function(!ArrayBuffer)} callback The callback to invoke with the
7181  *     received report.
7182  */
7183 chrome.hid.receiveFeatureReport =
7184     function(connectionId, reportId, size, callback) {};
7188  * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
7189  * Sends a feature report to the device.
7190  * @param {number} connectionId The connection to which to send the feature
7191  *     report.
7192  * @param {number} reportId The report ID to use, or 0 if none.
7193  * @param {!ArrayBuffer} data The report data.
7194  * @param {function()} callback The callback to invoke once the write is
7195  *     finished.
7196  */
7197 chrome.hid.sendFeatureReport =
7198     function(connectionId, reportId, data, callback) {};
7202  * @see http://developer.chrome.com/extensions/notifications.html
7203  * @const
7204  */
7205 chrome.notifications = {};
7209  * @typedef {{
7210  *   title: string,
7211  *   iconUrl: (string|undefined)
7212  * }}
7213  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7214  */
7215 chrome.notifications.NotificationButton;
7219  * @typedef {{
7220  *   title: string,
7221  *   message: string
7222  * }}
7223  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7224  */
7225 chrome.notifications.NotificationItem;
7229  * @typedef {{
7230  *   type: (string|undefined),
7231  *   iconUrl: (string|undefined),
7232  *   title: (string|undefined),
7233  *   message: (string|undefined),
7234  *   contextMessage: (string|undefined),
7235  *   priority: (number|undefined),
7236  *   eventTime: (number|undefined),
7237  *   buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
7238  *   imageUrl: (string|undefined),
7239  *   items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
7240  *   progress: (number|undefined),
7241  *   isClickable: (boolean|undefined)
7242  * }}
7243  * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7244  */
7245 chrome.notifications.NotificationOptions;
7249  * @typedef {function(boolean): void}
7250  * @see http://developer.chrome.com/extensions/notifications.html#method-update
7251  * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7252  */
7253 chrome.notifications.BooleanCallback;
7257  * @typedef {function(!Object): void}
7258  * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7259  */
7260 chrome.notifications.ObjectCallback;
7264  * @typedef {function(string, boolean): void}
7265  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7266  */
7267 chrome.notifications.ClosedCallback;
7271  * @typedef {function(string, number): void}
7272  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7273  */
7274 chrome.notifications.ButtonCallback;
7278  * @param {string|!chrome.notifications.NotificationOptions}
7279  *     notificationIdOrOptions
7280  * @param {(!chrome.notifications.NotificationOptions|function(string): void)=}
7281  *     opt_optionsOrCallback
7282  * @param {(function(string): void)=} opt_callback
7283  * @see http://developer.chrome.com/extensions/notifications.html#method-create
7284  */
7285 chrome.notifications.create = function(notificationIdOrOptions,
7286     opt_optionsOrCallback, opt_callback) {};
7290  * @param {string} notificationId
7291  * @param {!chrome.notifications.NotificationOptions} options
7292  * @param {chrome.notifications.BooleanCallback=} opt_callback
7293  * @see http://developer.chrome.com/extensions/notifications.html#method-update
7294  */
7295 chrome.notifications.update =
7296     function(notificationId, options, opt_callback) {};
7300  * @param {string} notificationId
7301  * @param {!chrome.notifications.BooleanCallback=} opt_callback
7302  * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7303  */
7304 chrome.notifications.clear = function(notificationId, opt_callback) {};
7308  * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7309  * @param {!chrome.notifications.ObjectCallback} callback
7310  */
7311 chrome.notifications.getAll = function(callback) {};
7315  * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
7316  * @param {function(string): void} callback takes 'granted' or 'denied'
7317  */
7318 chrome.notifications.getPermissionLevel = function(callback) {};
7322  * @type {!chrome.notifications.ClosedEvent}
7323  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7324  */
7325 chrome.notifications.onClosed;
7329  * The user clicked a non-button area of the notification. Callback receives a
7330  * notificationId.
7331  * @type {!ChromeStringEvent}
7332  * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
7333  */
7334 chrome.notifications.onClicked;
7338  * @type {!chrome.notifications.ButtonClickedEvent}
7339  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7340  */
7341 chrome.notifications.onButtonClicked;
7345  * Indicates permission level change. Callback should expect 'granted' or
7346  * 'denied'.
7347  * @type {!ChromeStringEvent}
7348  * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
7349  */
7350 chrome.notifications.onPermissionLevelChanged;
7354  * @type {!ChromeEvent}
7355  * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
7356  */
7357 chrome.notifications.onShowSettings;
7362  * @interface
7363  * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7364  */
7365 chrome.notifications.ClosedEvent = function() {};
7369  * @param {!chrome.notifications.ClosedCallback} callback
7370  */
7371 chrome.notifications.ClosedEvent.prototype.addListener = function(callback) {};
7375  * @param {!chrome.notifications.ClosedCallback} callback
7376  */
7377 chrome.notifications.ClosedEvent.prototype.removeListener =
7378     function(callback) {};
7382  * @param {!chrome.notifications.ClosedCallback} callback
7383  * @return {boolean}
7384  */
7385 chrome.notifications.ClosedEvent.prototype.hasListener = function(callback) {};
7389  * @return {boolean}
7390  */
7391 chrome.notifications.ClosedEvent.prototype.hasListeners = function() {};
7396  * @interface
7397  * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7398  */
7399 chrome.notifications.ButtonClickedEvent = function() {};
7403  * @param {!chrome.notifications.ButtonCallback} callback
7404  */
7405 chrome.notifications.ButtonClickedEvent.prototype.addListener =
7406     function(callback) {};
7410  * @param {!chrome.notifications.ButtonCallback} callback
7411  */
7412 chrome.notifications.ButtonClickedEvent.prototype.removeListener =
7413     function(callback) {};
7417  * @param {!chrome.notifications.ButtonCallback} callback
7418  * @return {boolean}
7419  */
7420 chrome.notifications.ButtonClickedEvent.prototype.hasListener =
7421     function(callback) {};
7425  * @return {boolean}
7426  */
7427 chrome.notifications.ButtonClickedEvent.prototype.hasListeners = function() {};
7431  * @const
7432  * @see http://developer.chrome.com/apps/system_storage.html
7433  */
7434 chrome.system.storage = {};
7438 /** @constructor */
7439 chrome.system.storage.StorageUnitInfo = function() {};
7442 /** @type {string} */
7443 chrome.system.storage.StorageUnitInfo.id;
7446 /** @type {string} */
7447 chrome.system.storage.StorageUnitInfo.name;
7450 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
7451 chrome.system.storage.StorageUnitInfo.type;
7454 /** @type {number} */
7455 chrome.system.storage.StorageUnitInfo.capacity;
7460  * Event whose listeners take a StorageUnitInfoEvent parameter.
7461  * @constructor
7462  */
7463 chrome.system.storage.StorageUnitInfoEvent = function() {};
7466 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7467 chrome.system.storage.StorageUnitInfoEvent.prototype.addListener =
7468     function(callback) {};
7471 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7472 chrome.system.storage.StorageUnitInfoEvent.prototype.removeListener =
7473     function(callback) {};
7477  * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
7478  * @return {boolean}
7479  */
7480 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListener =
7481     function(callback) {};
7484 /** @return {boolean} */
7485 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListeners =
7486     function() {};
7489 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
7490 chrome.system.storage.onAttached;
7493 /** @type {!ChromeStringEvent} */
7494 chrome.system.storage.onDetached;
7498  * Gets the storage information from the system.
7499  * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
7500  */
7501 chrome.system.storage.getInfo = function(callback) {};
7505  * Ejects a removable storage device.
7506  * @param {string} id The transient device ID from StorageUnitInfo.
7507  * @param {function(string)} callback Callback function where the value
7508  *     is any of: "success", "in_use", "no_such_device", "failure"
7509  */
7510 chrome.system.storage.ejectDevice = function(id, callback) {};
7514  * Gets the available capacity of a specified storage device.
7515  * @param {string} id The transient device ID from StorageUnitInfo.
7516  * @param {function(Object.<string, number>)} callback A callback function that
7517  *     accepts an object with {@code id} and {@code availableCapacity} fields.
7518  */
7519 chrome.system.storage.getAvailableCapacity = function(id, callback) {};
7523  * @see http://developer.chrome.com/apps/usb.html
7524  * @const
7525  */
7526 chrome.usb = {};
7530 /** @constructor */
7531 chrome.usb.Device = function Device() {};
7534 /** @type {number} */
7535 chrome.usb.Device.prototype.device;
7538 /** @type {number} */
7539 chrome.usb.Device.prototype.vendorId;
7542 /** @type {number} */
7543 chrome.usb.Device.prototype.productId;
7547 /** @constructor */
7548 chrome.usb.ConnectionHandle = function ConnectionHandle() {};
7551 /** @type {number} */
7552 chrome.usb.ConnectionHandle.prototype.handle;
7555 /** @type {number} */
7556 chrome.usb.ConnectionHandle.prototype.vendorId;
7559 /** @type {number} */
7560 chrome.usb.ConnectionHandle.prototype.productId;
7564  * @typedef {?{
7565  *   direction: string,
7566  *   endpoint: number,
7567  *   length: (number|undefined),
7568  *   data: (!ArrayBuffer|undefined)
7569  * }}
7570  */
7571 chrome.usb.GenericTransferInfo;
7575  * @typedef {?{
7576  *   direction: string,
7577  *   recipient: string,
7578  *   requestType: string,
7579  *   request: number,
7580  *   value: number,
7581  *   index: number,
7582  *   length: (number|undefined),
7583  *   data: (!ArrayBuffer|undefined)
7584  * }}
7585  */
7586 chrome.usb.ControlTransferInfo;
7590 /** @constructor */
7591 chrome.usb.TransferResultInfo = function() {};
7594 /** @type {number|undefined} */
7595 chrome.usb.TransferResultInfo.prototype.resultCode;
7598 /** @type {!ArrayBuffer|undefined} */
7599 chrome.usb.TransferResultInfo.prototype.data;
7603  * @typedef {?{
7604  *   deviceId: number,
7605  *   productId: number,
7606  *   interfaceId: (number|undefined)
7607  * }}
7608  */
7609 chrome.usb.FindDevicesOptions;
7613  * @see http://developer.chrome.com/apps/usb.html#method-getDevices
7614  * @param {!Object} options The properties to search for on target devices.
7615  * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
7616  *     of |Device|s on complete.
7617  */
7618 chrome.usb.getDevices = function(options, callback) {};
7622  * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
7623  * @param {!chrome.usb.Device} device The device to request access to.
7624  * @param {number} interfaceId
7625  * @param {function(boolean)} callback
7626  */
7627 chrome.usb.requestAccess = function(device, interfaceId, callback) {};
7631  * @see http://developer.chrome.com/apps/usb.html#method-openDevice
7632  * @param {!chrome.usb.Device} device The device to open.
7633  * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
7634  *     created ConnectionHandle on complete.
7635  */
7636 chrome.usb.openDevice = function(device, callback) {};
7640  * @see http://developer.chrome.com/apps/usb.html#method-findDevices
7641  * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
7642  *     on target devices.
7643  * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
7644  *     with the opened ConnectionHandle on complete.
7645  */
7646 chrome.usb.findDevices = function(options, callback) {};
7650  * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
7651  * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
7652  * @param {function()=} opt_callback The callback to invoke once the device is
7653  *     closed.
7654  */
7655 chrome.usb.closeDevice = function(handle, opt_callback) {};
7659  * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
7660  * @param {!chrome.usb.ConnectionHandle} handle The device from which the
7661  *     interfaces should be listed.
7662  * @param {function(!Array.<!Object>)} callback
7663  *     The callback to invoke when the interfaces are enumerated.
7664  */
7665 chrome.usb.listInterfaces = function(handle, callback) {};
7669  * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
7670  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7671  *     interface is to be claimed.
7672  * @param {number} interfaceNumber
7673  * @param {function()} callback The callback to invoke once the interface is
7674  *     claimed.
7675  */
7676 chrome.usb.claimInterface = function(handle, interfaceNumber, callback) {};
7680  * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
7681  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7682  *     interface is to be released.
7683  * @param {number} interfaceNumber
7684  * @param {function()} callback The callback to invoke once the interface is
7685  *     released.
7686  */
7687 chrome.usb.releaseInterface = function(handle, interfaceNumber, callback) {};
7691  * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
7692  * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7693  *     interface settings are to be set.
7694  * @param {number} interfaceNumber
7695  * @param {number} alternateSetting The alternate setting to set.
7696  * @param {function()} callback The callback to invoke once the interface
7697  *     setting is set.
7698  */
7699 chrome.usb.setInterfaceAlternateSetting = function(
7700     handle, interfaceNumber, alternateSetting, callback) {};
7704  * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
7705  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7706  *     transfer on.
7707  * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
7708  *     transfer.
7709  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7710  *     transfer has completed.
7711  */
7712 chrome.usb.controlTransfer = function(handle, transferInfo, callback) {};
7716  * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
7717  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
7718  *     the transfer on.
7719  * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7720  *     transfer. See GenericTransferInfo.
7721  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7722  *     transfer has completed.
7723  */
7724 chrome.usb.bulkTransfer = function(handle, transferInfo, callback) {};
7728  * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
7729  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7730  *     transfer on.
7731  * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7732  *     transfer. See GenericTransferInfo.
7733  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7734  *     transfer has completed.
7735  */
7736 chrome.usb.interruptTransfer = function(handle, transferInfo, callback) {};
7740  * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
7741  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7742  *     transfer on.
7743  * @param {!Object} transferInfo The parameters to the transfer. See
7744  *     IsochronousTransferInfo.
7745  * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7746  *     transfer has been completed.
7747  */
7748 chrome.usb.isochronousTransfer = function(handle, transferInfo, callback) {};
7752  * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
7753  * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
7754  * @param {function(boolean)} callback Invoked once the device is reset with a
7755  *     boolean indicating whether the reset completed successfully.
7756  */
7757 chrome.usb.resetDevice = function(handle, callback) {};
7761  * @see https://developer.chrome.com/apps/serial
7762  * @const
7763  */
7764 chrome.serial = {};
7769  * @typedef {?{
7770  *   persistent: (boolean|undefined),
7771  *   name: (string|undefined),
7772  *   bufferSize: (number|undefined),
7773  *   bitRate: (number|undefined),
7774  *   dataBits: (string|undefined),
7775  *   parityBits: (string|undefined),
7776  *   stopBits: (string|undefined),
7777  *   ctsFlowControl: (boolean|undefined),
7778  *   receiveTimeout: (number|undefined),
7779  *   sendTimeout: (number|undefined)
7780  * }}
7781  * @see https://developer.chrome.com/apps/serial#type-ConnectionOptions
7782  */
7783 chrome.serial.ConnectionOptions;
7787  * @typedef {?{
7788  *   connectionId: number,
7789  *   paused: boolean,
7790  *   persistent: boolean,
7791  *   name: string,
7792  *   bufferSize: number,
7793  *   receiveTimeout: number,
7794  *   sendTimeout: number,
7795  *   bitRate: (number|undefined),
7796  *   dataBits: (string|undefined),
7797  *   parityBits: (string|undefined),
7798  *   stopBits: (string|undefined),
7799  *   ctsFlowControl: (boolean|undefined)
7800  * }}
7801  * @see https://developer.chrome.com/apps/serial#type-ConnectionInfo
7802  */
7803 chrome.serial.ConnectionInfo;
7807  * Returns information about available serial devices on the system. The
7808  * list is regenerated each time this method is called.
7809  * @param {function(!Array<!Object>)} callback Invoked with a
7810  *     list of ports on complete.
7811  * @see https://developer.chrome.com/apps/serial#method-getDevices
7812  */
7813 chrome.serial.getDevices = function(callback) {};
7817  * Connects to a given serial port.
7818  * @param {string} path The system path of the serial port to open.
7819  * @param {!chrome.serial.ConnectionOptions|
7820  *         function(!chrome.serial.ConnectionInfo)} optionsOrCallback
7821  *     Port configuration options, or the callback invoked with the created
7822  *     ConnectionInfo on complete.
7823  * @param {function(!chrome.serial.ConnectionInfo)=} opt_callback Invoked with
7824  *     the created ConnectionInfo on complete.
7825  * @see https://developer.chrome.com/apps/serial#method-connect
7826  */
7827 chrome.serial.connect = function(path, optionsOrCallback, opt_callback) {};
7831  * Update the option settings on an open serial port connection.
7832  * @param {number} connectionId The id of the opened connection.
7833  * @param {!chrome.serial.ConnectionOptions} options Port configuration
7834  *     options.
7835  * @param {function(boolean)} callback Called when the configuration has
7836  *     completed.
7837  * @see https://developer.chrome.com/apps/serial#method-update
7838  */
7839 chrome.serial.update = function(connectionId, options, callback) {};
7843  * Disconnects from a serial port.
7844  * @param {number} connectionId The id of the opened connection.
7845  * @param {function(boolean)} callback Called when the connection
7846  *     has been closed.
7847  * @see https://developer.chrome.com/apps/serial#method-disconnect
7848  */
7849 chrome.serial.disconnect = function(connectionId, callback) {};
7853  * Pauses or unpauses an open connection.
7854  * @param {number} connectionId The id of the opened connection.
7855  * @param {boolean} paused Flag to indicate whether to pause or unpause.
7856  * @param {function()} callback Called when the configuration has completed.
7857  * @see https://developer.chrome.com/apps/serial#method-setPaused
7858  */
7859 chrome.serial.setPaused = function(connectionId, paused, callback) {};
7863  * Retrieves the state of a given connection.
7864  * @param {number} connectionId The id of the opened connection.
7865  * @param {function(!chrome.serial.ConnectionInfo)} callback
7866  *     Called with connection state information when available.
7867  * @see https://developer.chrome.com/apps/serial#method-getInfo
7868  */
7869 chrome.serial.getInfo = function(connectionId, callback) {};
7873  * Retrieves the list of currently opened serial port connections owned by
7874  * the application.
7875  * @param {function(!Array.<!chrome.serial.ConnectionInfo>)} callback
7876  *     Called with the list of |ConnectionInfo|s when available.
7877  * @see https://developer.chrome.com/apps/serial#method-getConnections
7878  */
7879 chrome.serial.getConnections = function(callback) {};
7883  * Writes data to the given connection.
7884  * @param {number} connectionId The id of the opened connection.
7885  * @param {!ArrayBuffer} data The data to send.
7886  * @param {function(!Object)} callback Called when the operation has
7887  *     completed.
7888  * @see https://developer.chrome.com/apps/serial#method-send
7889  */
7890 chrome.serial.send = function(connectionId, data, callback) {};
7894  * Flushes all bytes in the given connection's input and output buffers.
7895  * @param {number} connectionId The id of the opened connection.
7896  * @param {function(boolean)} callback
7897  * @see https://developer.chrome.com/apps/serial#method-flush
7898  */
7899 chrome.serial.flush = function(connectionId, callback) {};
7905  * Retrieves the state of control signals on a given connection.
7906  * @param {number} connectionId The id of the opened connection.
7907  * @param {function(!Object)} callback
7908  * @see https://developer.chrome.com/apps/serial#method-getControlSignals
7909  */
7910 chrome.serial.getControlSignals = function(connectionId, callback) {};
7914  * @typedef {?{
7915  *   dtr: (boolean|undefined),
7916  *   rts: (boolean|undefined)
7917  * }}
7918  */
7919 chrome.serial.ControlSignals;
7923  * Sets the state of control signals on a given connection.
7924  * @param {number} connectionId The id of the opened connection.
7925  * @param {!chrome.serial.ControlSignals} signals
7926  *     The set of signal changes to send to the device.
7927  * @param {function(boolean)} callback Called once the control signals
7928  *     have been set.
7929  * @see https://developer.chrome.com/apps/serial#method-setControlSignals
7930  */
7931 chrome.serial.setControlSignals = function(connectionId, signals, callback) {};
7935  * Event raised when data has been read from the connection.
7936  * @type {!ChromeObjectEvent}
7937  * @see https://developer.chrome.com/apps/serial#event-onReceive
7938  */
7939 chrome.serial.onReceive;
7943  * Event raised when an error occurred while the runtime was waiting for
7944  * data on the serial port. Once this event is raised, the connection may
7945  * be set to paused. A "timeout" error does not pause the connection.
7946  * @type {!ChromeObjectEvent}
7947  * @see https://developer.chrome.com/apps/serial#event-onReceiveError
7948  */
7949 chrome.serial.onReceiveError;
7953 ////////////////////////////////////////////////////////////////////////////////
7954 /////////////////////////// Chrome Private APIs ////////////////////////////////
7955 ////////////////////////////////////////////////////////////////////////////////
7958 /** @const */
7959 chrome.screenlockPrivate = {};
7963  * @param {string} message Displayed on the unlock screen.
7964  */
7965 chrome.screenlockPrivate.showMessage = function(message) {};
7969  * @param {function(boolean)} callback
7970  */
7971 chrome.screenlockPrivate.getLocked = function(callback) {};
7975  * @param {boolean} locked If true and the screen is unlocked, locks the screen.
7976  *     If false and the screen is locked, unlocks the screen.
7977  */
7978 chrome.screenlockPrivate.setLocked = function(locked) {};
7981 /** @type {!ChromeBooleanEvent} */
7982 chrome.screenlockPrivate.onChanged;
7986  * @const
7987  */
7988 chrome.musicManagerPrivate = {};
7992  * @param {function(string): void} callback
7993  */
7994 chrome.musicManagerPrivate.getDeviceId = function(callback) {};
7998  * @const
7999  */
8000 chrome.mediaGalleriesPrivate = {};
8004  * @typedef {function({deviceId: string, deviceName: string}): void}
8005  */
8006 chrome.mediaGalleriesPrivate.DeviceCallback;
8010  * @typedef {function({galleryId: string}): void}
8011  */
8012 chrome.mediaGalleriesPrivate.GalleryChangeCallback;
8016  * @typedef {function({galleryId: string, success: boolean}): void}
8017  */
8018 chrome.mediaGalleriesPrivate.AddGalleryWatchCallback;
8022  * @param {string} galleryId
8023  * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
8024  */
8025 chrome.mediaGalleriesPrivate.addGalleryWatch = function(galleryId, callback) {};
8029  * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8030  * @deprecated Use {chrome.system.storage.onAttach}.
8031  */
8032 chrome.mediaGalleriesPrivate.onDeviceAttached;
8036  * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8037  * @deprecated Use {chrome.system.storage.onDetach}.
8038  */
8039 chrome.mediaGalleriesPrivate.onDeviceDetached;
8043  * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
8044  */
8045 chrome.mediaGalleriesPrivate.onGalleryChanged;
8050  * @interface
8051  * @deprecated Use {chrome.system.storage.DeviceEvent}.
8052  */
8053 chrome.mediaGalleriesPrivate.DeviceEvent = function() {};
8057  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8058  * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
8059  */
8060 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.addListener =
8061     function(callback) {};
8065  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8066  * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
8067  */
8068 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.removeListener =
8069     function(callback) {};
8073  * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8074  * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
8075  */
8076 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListener =
8077     function(callback) {};
8081  * @return {boolean}
8082  * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
8083  */
8084 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListeners =
8085     function(callback) {};
8090  * @interface
8091  */
8092 chrome.mediaGalleriesPrivate.GalleryChangeEvent = function() {};
8096  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8097  */
8098 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.addListener =
8099     function(callback) {};
8103  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8104  */
8105 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.removeListener =
8106     function(callback) {};
8110  * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8111  */
8112 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListener =
8113     function(callback) {};
8117  * @return {boolean}
8118  */
8119 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners =
8120     function() {};
8124  * Externs for networking_private.idl:
8125  * https://code.google.com/p/chromium/codesearch#chromium/src/extensions/common/api/networking_private.idl
8126  * WARNING(2015/04/09): This API is still under active development and has a few
8127  * issues with typing:
8129  * 1. This API uses the ONC specification:
8130  *    http://www.chromium.org/chromium-os/chromiumos-design-docs/open-network-configuration
8131  * 2. The types for getProperties and getManagedProperties are not currently
8132  *    defined. They correspond to ONC Property dictionaries. They are treated as
8133  *    Objects rather than types.
8134  * 3. NetworkStateProperties defines a subset of NetworkProperties used by
8135  *    getState and getNetworks. Since these match ONC property names they
8136  *    use ONC PascalCase naming conventions instead of traditional JS
8137  *    camelCase naming.
8138  * 4. The types for setProperties and createNetwork are not currently defined.
8139  *    These use a subset of ONC properties and the complete set (and their
8140  *    relationship to the type for getProperties) is still being determined.
8142  * Because of the above issues, this API should not be used as an example for
8143  * other APIs. Please contact stevenjb@ for questions on and maintenance.
8144  * @const
8145  * @see https://developer.chrome.com/extensions/networkingPrivate
8146  */
8147 chrome.networkingPrivate = {};
8151  * @constructor
8152  * @struct
8153  * @see https://developer.chrome.com/extensions/networkingPrivate#type-CellularStateProperties
8154  */
8155 chrome.networkingPrivate.CellularStateProperties = function() {};
8159  * @type {string|undefined}
8160  */
8161 chrome.networkingPrivate.CellularStateProperties.prototype.ActivationState;
8165  * @type {string|undefined}
8166  */
8167 chrome.networkingPrivate.CellularStateProperties.prototype.NetworkTechnology;
8171  * @type {string|undefined}
8172  */
8173 chrome.networkingPrivate.CellularStateProperties.prototype.RoamingState;
8177  * @type {number|undefined}
8178  */
8179 chrome.networkingPrivate.CellularStateProperties.prototype.SignalStrength;
8183  * @constructor
8184  * @struct
8185  * @see https://developer.chrome.com/extensions/networkingPrivate#type-DeviceStateProperties
8186  */
8187 chrome.networkingPrivate.DeviceStateProperties = function() {};
8191  * @type {boolean|undefined}
8192  */
8193 chrome.networkingPrivate.DeviceStateProperties.prototype.Scanning;
8197  * @type {string}
8198  */
8199 chrome.networkingPrivate.DeviceStateProperties.prototype.State;
8203  * @type {string}
8204  */
8205 chrome.networkingPrivate.DeviceStateProperties.prototype.Type;
8209  * @constructor
8210  * @struct
8211  * @see https://developer.chrome.com/extensions/networkingPrivate#type-EthernetStateProperties
8212  */
8213 chrome.networkingPrivate.EthernetStateProperties = function() {};
8217  * @type {string}
8218  */
8219 chrome.networkingPrivate.EthernetStateProperties.prototype.Authentication;
8223  * @constructor
8224  * @struct
8225  * @see https://developer.chrome.com/extensions/networkingPrivate#type-IPSecProperties
8226  */
8227 chrome.networkingPrivate.IPSecProperties = function() {};
8231  * @type {string}
8232  */
8233 chrome.networkingPrivate.IPSecProperties.prototype.AuthenticationType;
8237  * @constructor
8238  * @struct
8239  * @see https://developer.chrome.com/extensions/networkingPrivate#type-ThirdPartyVPNProperties
8240  */
8241 chrome.networkingPrivate.ThirdPartyVPNProperties = function() {};
8245  * @type {string}
8246  */
8247 chrome.networkingPrivate.ThirdPartyVPNProperties.prototype.ExtensionID;
8251  * @constructor
8252  * @struct
8253  * @see https://developer.chrome.com/extensions/networkingPrivate#type-VPNStateProperties
8254  */
8255 chrome.networkingPrivate.VPNStateProperties = function() {};
8259  * @type {!chrome.networkingPrivate.IPSecProperties|undefined}
8260  */
8261 chrome.networkingPrivate.VPNStateProperties.prototype.IPSec;
8265  * @type {!chrome.networkingPrivate.ThirdPartyVPNProperties|undefined}
8266  */
8267 chrome.networkingPrivate.VPNStateProperties.prototype.ThirdPartyVPN;
8271  * @type {string}
8272  */
8273 chrome.networkingPrivate.VPNStateProperties.prototype.Type;
8277  * @constructor
8278  * @struct
8279  * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8280  */
8281 chrome.networkingPrivate.WiFiStateProperties = function() {};
8285  * @type {string}
8286  */
8287 chrome.networkingPrivate.WiFiStateProperties.prototype.Security;
8291  * @type {number|undefined}
8292  */
8293 chrome.networkingPrivate.WiFiStateProperties.prototype.SignalStrength;
8297  * @constructor
8298  * @struct
8299  * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8300  */
8301 chrome.networkingPrivate.WiMAXStateProperties = function() {};
8305  * @type {number|undefined}
8306  */
8307 chrome.networkingPrivate.WiMAXStateProperties.prototype.SignalStrength;
8311  * @typedef {?{
8312  *   Cellular: (!chrome.networkingPrivate.CellularStateProperties|undefined),
8313  *   Connectable: (boolean|undefined),
8314  *   ConnectionState: (string|undefined),
8315  *   ErrorState: (string|undefined),
8316  *   Ethernet: (!chrome.networkingPrivate.EthernetStateProperties|undefined),
8317  *   GUID: string,
8318  *   Name: (string|undefined),
8319  *   Priority: (number|undefined),
8320  *   Source: (string|undefined),
8321  *   Type: string,
8322  *   VPN: (!chrome.networkingPrivate.VPNStateProperties|undefined),
8323  *   WiFi: (!chrome.networkingPrivate.WiFiStateProperties|undefined),
8324  *   WiMAX: (!chrome.networkingPrivate.WiMAXStateProperties|undefined)
8325  * }}
8326  */
8327 chrome.networkingPrivate.NetworkStateProperties;
8331  * @typedef {?{
8332  *   certificate: string,
8333  *   intermediateCertificates: (!Array<string>|undefined),
8334  *   publicKey: string,
8335  *   nonce: string,
8336  *   signedData: string,
8337  *   deviceSerial: string,
8338  *   deviceSsid: string,
8339  *   deviceBssid: string
8340  * }}
8341  */
8342 chrome.networkingPrivate.VerificationProperties;
8346  * @typedef {?{
8347  *   networkType: string,
8348  *   visible: (boolean|undefined),
8349  *   configured: (boolean|undefined),
8350  *   limit: (number|undefined)
8351  * }}
8352  */
8353 chrome.networkingPrivate.NetworkFilter;
8357  * @param {string} guid
8358  * @param {function(!Object)} callback
8359  */
8360 chrome.networkingPrivate.getProperties = function(guid, callback) {};
8364  * @param {string} guid
8365  * @param {function(!Object)} callback
8366  */
8367 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {};
8371  * @param {string} guid
8372  * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback
8373  */
8374 chrome.networkingPrivate.getState = function(guid, callback) {};
8378  * TODO: Use NetworkConfigProperties for |properties| once fully
8379  * defined.
8380  * @param {string} guid
8381  * @param {!Object} properties
8382  * @param {function()=} opt_callback
8383  */
8384 chrome.networkingPrivate.setProperties =
8385     function(guid, properties, opt_callback) {};
8389  * TODO: Use NetworkConfigProperties for |properties| once fully
8390  * defined.
8391  * @param {boolean} shared
8392  * @param {!Object} properties
8393  * @param {function(string)=} opt_callback Returns guid of the configured
8394  *     configuration.
8395  */
8396 chrome.networkingPrivate.createNetwork =
8397     function(shared, properties, opt_callback) {};
8401  * @param {string} guid
8402  * @param {function()=} opt_callback Called when the operation has completed.
8403  */
8404 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {};
8408  * @param {!chrome.networkingPrivate.NetworkFilter} filter
8409  * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8410  *     callback
8411  */
8412 chrome.networkingPrivate.getNetworks = function(filter, callback) {};
8416  * @param {string} type
8417  * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8418  *      callback
8419  * @deprecated Use chrome.networkingPrivate.getNetworks with filter.visible=true
8420  */
8421 chrome.networkingPrivate.getVisibleNetworks = function(type, callback) {};
8425  * @param {function(!Array.<string>)} callback
8426  * @deprecated Use chrome.networkingPrivate.getDeviceStates.
8427  */
8428 chrome.networkingPrivate.getEnabledNetworkTypes = function(callback) {};
8432  * @param {function(!Array.<!chrome.networkingPrivate.DeviceStateProperties>)}
8433  *     callback
8434  */
8435 chrome.networkingPrivate.getDeviceStates = function(callback) {};
8438 /** @param {string} networkType */
8439 chrome.networkingPrivate.enableNetworkType = function(networkType) {};
8442 /** @param {string} networkType */
8443 chrome.networkingPrivate.disableNetworkType = function(networkType) {};
8447  * Requests that the networking subsystem scan for new networks and update the
8448  * list returned by getVisibleNetworks.
8449  */
8450 chrome.networkingPrivate.requestNetworkScan = function() {};
8454  * @param {string} guid
8455  * @param {function()=} opt_callback
8456  */
8457 chrome.networkingPrivate.startConnect = function(guid, opt_callback) {};
8461  * @param {string} guid
8462  * @param {function()=} opt_callback
8463  */
8464 chrome.networkingPrivate.startDisconnect = function(guid, opt_callback) {};
8468  * @param {string} guid
8469  * @param {(string|function())=} opt_carrierOrCallback
8470  * @param {function()=} opt_callback
8471  */
8472 chrome.networkingPrivate.startActivate =
8473     function(guid, opt_carrierOrCallback, opt_callback) {};
8477  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8478  * @param {function(boolean)} callback
8479  */
8480 chrome.networkingPrivate.verifyDestination =
8481     function(verificationInfo, callback) {};
8485  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8486  * @param {string} guid
8487  * @param {function(string)} callback
8488  */
8489 chrome.networkingPrivate.verifyAndEncryptCredentials =
8490     function(verificationInfo, guid, callback) {};
8494  * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8495  * @param {string} data
8496  * @param {function(string)} callback
8497  */
8498 chrome.networkingPrivate.verifyAndEncryptData =
8499     function(verificationInfo, data, callback) {};
8503  * @param {string} ipOrMacAddress
8504  * @param {boolean} enabled
8505  * @param {function(string)=} opt_callback
8506  */
8507 chrome.networkingPrivate.setWifiTDLSEnabledState =
8508     function(ipOrMacAddress, enabled, opt_callback) {};
8512  * @param {string} ipOrMacAddress
8513  * @param {function(string)} callback
8514  */
8515 chrome.networkingPrivate.getWifiTDLSStatus =
8516     function(ipOrMacAddress, callback) {};
8520  * @param {string} guid
8521  * @param {function(string)} callback
8522  */
8523 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {};
8526 /** @type {!ChromeStringArrayEvent} */
8527 chrome.networkingPrivate.onNetworksChanged;
8530 /** @type {!ChromeStringArrayEvent} */
8531 chrome.networkingPrivate.onNetworkListChanged;
8534 /** @type {!ChromeEvent} */
8535 chrome.networkingPrivate.onDeviceStateListChanged;
8538 /** @type {!ChromeStringStringEvent} */
8539 chrome.networkingPrivate.onPortalDetectionCompleted;
8543  * WARNING(2014/08/14): This API is still under active initial development and
8544  * unstable. The types are not well defined or documented, and this API
8545  * definition here should not be used as an example for other APIs added to this
8546  * file. Please contact mednik@ for questions on and maintenance for this API.
8547  * @const
8548  * @see http://goo.gl/afV8wB
8549  */
8550 chrome.mdns = {};
8554  * Data type sent to the event handler of chrome.mdns.onServiceList.
8555  * @constructor
8556  */
8557 chrome.mdns.MdnsService = function() {};
8560 /** @type {string} */
8561 chrome.mdns.MdnsService.prototype.serviceName;
8564 /** @type {string} */
8565 chrome.mdns.MdnsService.prototype.serviceHostPort;
8568 /** @type {string} */
8569 chrome.mdns.MdnsService.prototype.ipAddress;
8572 /** @type {!Array.<string>} */
8573 chrome.mdns.MdnsService.prototype.serviceData;
8577  * Event whose listeners take an array of MdnsService parameter.
8578  * @constructor
8579  */
8580 chrome.mdns.ServiceListEvent = function() {};
8584  * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8585  * @param {!Object=} opt_filter
8586  */
8587 chrome.mdns.ServiceListEvent.prototype.addListener =
8588     function(callback, opt_filter) {};
8591 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
8592 chrome.mdns.ServiceListEvent.prototype.removeListener = function(callback) {};
8596  * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8597  * @return {boolean}
8598  */
8599 chrome.mdns.ServiceListEvent.prototype.hasListener = function(callback) {};
8602 /** @return {boolean} */
8603 chrome.mdns.ServiceListEvent.prototype.hasListeners = function() {};
8606 /** @type {!chrome.mdns.ServiceListEvent} */
8607 chrome.mdns.onServiceList;
8611  * @const
8612  * @see http://goo.gl/79p5h5
8613  */
8614 chrome.gcdPrivate = {};
8618  * Represents a GCD device discovered locally or registered to a given user.
8619  * deviceId: Opaque device identifier to be passed to API.
8620  * setupType: How this device was discovered.
8621  * cloudId: Cloud identifier string.
8622  * deviceName: Device human readable name.
8623  * deviceType: Device type (camera, printer, etc).
8624  * deviceDescription: Device human readable description.
8625  * @typedef {?{
8626  *   deviceId: string,
8627  *   setupType: string,
8628  *   cloudId: (string|undefined),
8629  *   deviceType: string,
8630  *   deviceName: string,
8631  *   deviceDescription: string
8632  * }}
8633  */
8634 chrome.gcdPrivate.Device;
8638  * Returns the list of cloud devices visible locally or available in the
8639  * cloud for user account.
8640  * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
8641  */
8642 chrome.gcdPrivate.getCloudDeviceList = function(callback) {};
8646  * Queries network for local devices. Triggers onDeviceStateChanged and
8647  * onDeviceRemoved events. Call this function *only* after registering for
8648  * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
8649  */
8650 chrome.gcdPrivate.queryForNewLocalDevices = function() {};
8654  * Cache the WiFi password in the browser process for use during
8655  * provisioning. This is done to allow the gathering of the wifi password to
8656  * not be done while connected to the device's network. Callback is called
8657  * with true if wifi password was cached and false if it was unavailable.
8658  * @param {string} ssid
8659  * @param {function(boolean): void} callback
8660  */
8661 chrome.gcdPrivate.prefetchWifiPassword = function(ssid, callback) {};
8665  * Returns local device information.
8666  * @param {string} serviceName The mDNS service name of the device.
8667  * @param {function(string, !Object): void}
8668  *     callback Called when when the device info is available or on error.
8669  *     |status|: The status of the operation (success or type of error).
8670  *     |deviceInfo|: Content of /privet/info response.
8671  *     https://developers.google.com/cloud-devices/v1/reference/local-api/info
8672  */
8673 chrome.gcdPrivate.getDeviceInfo = function(serviceName, callback) {};
8677  * Create new pairing session.
8678  * @param {string} serviceName The mDNS service name of the device.
8679  * @param {function(number, string, !Array.<string>): void}
8680  *     callback Called when the session is established or on error. 1st param,
8681  *     |sessionId|, is the session ID (identifies the session for future calls).
8682  *     2nd param, |status|, is the status (success or type of error). 3rd param,
8683  *     |pairingTypes|, is a list of pairing types supported by this device.
8684  */
8685 chrome.gcdPrivate.createSession = function(serviceName, callback) {};
8689  * Start pairing with the selected method.
8690  * @param {number} sessionId
8691  * @param {string} pairingType
8692  * @param {function(string): void} callback
8693  */
8694 chrome.gcdPrivate.startPairing = function(sessionId, pairingType, callback) {};
8698  * Confirm pairing code.
8699  * @param {number} sessionId
8700  * @param {string} code
8701  * @param {function(string): void} callback
8702  */
8703 chrome.gcdPrivate.confirmCode = function(sessionId, code, callback) {};
8707  * Send an encrypted message to the device. If the message is a setup message
8708  * with a wifi ssid specified but no password, the password cached from
8709  * prefetchWifiPassword() will be used and the call will fail if it's not
8710  * available. For open networks use an empty string as the password.
8711  * @param {number} sessionId
8712  * @param {string} api The API path.
8713  * @param {!Object} input The input message to be sent over the encrypted
8714  *     channel.
8715  * @param {function(string, ?Object): void} callback
8716  */
8717 chrome.gcdPrivate.sendMessage = function(sessionId, api, input, callback) {};
8721  * Terminate the session with the device.
8722  * @param {number} sessionId
8723  */
8724 chrome.gcdPrivate.terminateSession = function(sessionId) {};
8728  * Returns command definitions.
8729  * @param {string} deviceId The device to get command definitions for.
8730  * @param {function(!Object): void} callback The result callback.
8731  */
8732 chrome.gcdPrivate.getCommandDefinitions = function(deviceId, callback) {};
8736  * Creates and sends a new command.
8737  * @param {string} deviceId The device to send the command to.
8738  * @param {number} expireInMs The number of milliseconds since now before the
8739  *     command expires. An expired command should not be executed by the device.
8740  *     Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
8741  *     inclusive. All values outside that range will be replaced by 30 days.
8742  * @param {!Object} command Described at
8743  *     https://developers.google.com/cloud-devices/v1/reference/commands.
8744  * @param {function(!Object): void} callback  The result callback.
8745  */
8746 chrome.gcdPrivate.insertCommand = function(
8747     deviceId, expireInMs, command, callback) {};
8751  * Returns a particular command.
8752  * @param {string} commandId Unique command ID.
8753  * @param {function(!Object): void} callback  The result callback.
8754  */
8755 chrome.gcdPrivate.getCommand = function(commandId, callback) {};
8759  * Cancels a command.
8760  * @param {string} commandId Unique command ID.
8761  * @param {function(!Object): void} callback  The result callback.
8762  */
8763 chrome.gcdPrivate.cancelCommand = function(commandId, callback) {};
8767  * Lists all commands in order of creation.
8768  * @param {string} deviceId The device to send the command to.
8769  * @param {string} byUser List all the commands issued by the user. Special
8770  *     value 'me' can be used to list by the current user.
8771  * @param {string} state Command state.
8772  * @param {function(!Array.<!Object>): void} callback  The result callback.
8773  */
8774 chrome.gcdPrivate.getCommandsList = function(
8775     deviceId, byUser, state, callback) {};
8780  * Event whose listeners take a chrome.gcdPrivate.Device.
8781  * @constructor
8782  */
8783 chrome.gcdPrivate.DeviceEvent = function() {};
8786 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8787 chrome.gcdPrivate.DeviceEvent.prototype.addListener = function(callback) {};
8790 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8791 chrome.gcdPrivate.DeviceEvent.prototype.removeListener = function(callback) {};
8795  * @param {function(!chrome.gcdPrivate.Device): void} callback
8796  * @return {boolean}
8797  */
8798 chrome.gcdPrivate.DeviceEvent.prototype.hasListener = function(callback) {};
8801 /** @return {boolean} */
8802 chrome.gcdPrivate.DeviceEvent.prototype.hasListeners = function() {};
8806  * Fires when a device's state changes. When a listener is first added, this
8807  * event fires for all known devices on the network. Afterwards, it will fire
8808  * with device status updates.
8809  * @type {!chrome.gcdPrivate.DeviceEvent}
8810  */
8811 chrome.gcdPrivate.onDeviceStateChanged;
8815  * Fires when a given device disappears.
8816  * |deviceId| The device that has disappeared.
8817  * @type {!ChromeStringEvent}
8818  */
8819 chrome.gcdPrivate.onDeviceRemoved;
8823  * @const
8824  * @see http://goo.gl/bKHibo
8825  */
8826 chrome.bluetoothPrivate = {};
8830 /** @constructor */
8831 chrome.bluetoothPrivate.PairingEvent = function() {};
8834 /** @type {string} */
8835 chrome.bluetoothPrivate.PairingEvent.prototype.pairing;
8838 /** @type {!chrome.bluetooth.Device} */
8839 chrome.bluetoothPrivate.PairingEvent.prototype.device;
8842 /** @type {string|undefined} */
8843 chrome.bluetoothPrivate.PairingEvent.prototype.pincode;
8846 /** @type {number|undefined} */
8847 chrome.bluetoothPrivate.PairingEvent.prototype.passkey;
8850 /** @type {number|undefined} */
8851 chrome.bluetoothPrivate.PairingEvent.prototype.enteredKey;
8855  * @typedef {{
8856  *   name: (string|undefined),
8857  *   powered: (boolean|undefined),
8858  *   discoverable: (boolean|undefined)
8859  * }}
8860  */
8861 chrome.bluetoothPrivate.NewAdapterState;
8865  * @typedef {{
8866  *   device: !chrome.bluetooth.Device,
8867  *   response: (string|undefined),
8868  *   pincode: (string|undefined),
8869  *   passkey: (number|undefined),
8870  *   enteredKey: (number|undefined)
8871  * }}
8872  */
8873 chrome.bluetoothPrivate.SetPairingResponseOptions;
8877  * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
8878  * @param {function()} callback
8879  */
8880 chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
8884  * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
8885  * @param {function()} callback
8886  */
8887 chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
8892  * Event whose listeners take a PairingEvent parameter.
8893  * @constructor
8894  */
8895 chrome.bluetoothPrivate.PairingEventEvent = function() {};
8898 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8899 chrome.bluetoothPrivate.PairingEventEvent.prototype.addListener =
8900     function(callback) {};
8903 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8904 chrome.bluetoothPrivate.PairingEventEvent.prototype.removeListener =
8905     function(callback) {};
8909  * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
8910  * @return {boolean}
8911  */
8912 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListener =
8913     function(callback) {};
8916 /** @return {boolean} */
8917 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListeners =
8918     function() {};
8921 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
8922 chrome.bluetoothPrivate.onPairing;
8927  * @const
8928  * @see http://goo.gl/XmVdHm
8929  */
8930 chrome.inlineInstallPrivate = {};
8934  * Installs the given app ID.
8935  * @param {string} id
8936  * @param {function(string, string): void=} opt_callback Response callback that
8937  *     returns two string: (1) an error string (or empty string on success) and
8938  *     (2) an error code in case of error
8939  */
8940 chrome.inlineInstallPrivate.install = function(id, opt_callback) {};