Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / third_party / closure_compiler / externs / chrome_extensions.js
blob06198b4c1b7d12b92b2d109bdfb48b202510dfd2
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
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
24 * http://www.apache.org/licenses/LICENSE-2.0
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.
33 /**
34 * @fileoverview Definitions for the Chromium extensions API.
36 * This is the externs file for the Chrome Extensions API.
37 * See http://developer.chrome.com/extensions/
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
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.
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.
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.
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:
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.
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.
89 * The Chrome extension APIs include at least three different situations:
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.
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
193 * TODO(tbreisacher): Move all chrome.app.* externs into their own file.
194 * @const
196 chrome.app = {};
200 * @const
201 * @see http://developer.chrome.com/apps/app.runtime.html
203 chrome.app.runtime = {};
208 * @constructor
209 * @see http://developer.chrome.com/apps/app_runtime.html
211 chrome.app.runtime.LaunchItem = function() {};
214 /** @type {!FileEntry} */
215 chrome.app.runtime.LaunchItem.prototype.entry;
218 /** @type {string} */
219 chrome.app.runtime.LaunchItem.prototype.type;
224 * @constructor
225 * @see http://developer.chrome.com/apps/app_runtime.html
227 chrome.app.runtime.LaunchData = function() {};
230 /** @type {string|undefined} */
231 chrome.app.runtime.LaunchData.prototype.id;
234 /** @type {!Array.<!chrome.app.runtime.LaunchItem>|undefined} */
235 chrome.app.runtime.LaunchData.prototype.items;
238 /** @type {string|undefined} */
239 chrome.app.runtime.LaunchData.prototype.url;
242 /** @type {string|undefined} */
243 chrome.app.runtime.LaunchData.prototype.referrerUrl;
246 /** @type {boolean|undefined} */
247 chrome.app.runtime.LaunchData.prototype.isKioskSession;
252 * The type of chrome.app.runtime.onLaunched.
253 * @constructor
255 chrome.app.runtime.LaunchEvent = function() {};
259 * @param {function(!chrome.app.runtime.LaunchData)} callback
260 * @see http://developer.chrome.com/apps/app.runtime.html#event-onLaunched
262 chrome.app.runtime.LaunchEvent.prototype.addListener = function(callback) {};
266 * @param {function(!chrome.app.runtime.LaunchData)} callback
268 chrome.app.runtime.LaunchEvent.prototype.removeListener = function(callback) {};
272 * @param {function(!chrome.app.runtime.LaunchData)} callback
273 * @return {boolean}
275 chrome.app.runtime.LaunchEvent.prototype.hasListener = function(callback) {};
279 * @return {boolean}
281 chrome.app.runtime.LaunchEvent.prototype.hasListeners = function() {};
284 /** @type {!chrome.app.runtime.LaunchEvent} */
285 chrome.app.runtime.onLaunched;
289 * @type {!ChromeEvent}
290 * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
292 chrome.app.runtime.onRestarted;
296 * @const
297 * @see http://developer.chrome.com/apps/app.window.html
299 chrome.app.window = {};
303 * @see https://developer.chrome.com/apps/app_window#method-getAll
304 * @return {!Array.<!chrome.app.window.AppWindow>}
306 chrome.app.window.getAll = function() {};
310 * @see https://developer.chrome.com/apps/app_window#method-get
311 * @param {string} id
312 * @return {chrome.app.window.AppWindow}
314 chrome.app.window.get = function(id) {};
319 * @constructor
320 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
322 chrome.app.window.AppWindow = function() {};
326 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
328 chrome.app.window.AppWindow.prototype.focus = function() {};
332 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
334 chrome.app.window.AppWindow.prototype.fullscreen = function() {};
338 * @return {boolean}
339 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
341 chrome.app.window.AppWindow.prototype.isFullscreen = function() {};
345 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
347 chrome.app.window.AppWindow.prototype.minimize = function() {};
351 * @return {boolean}
352 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
354 chrome.app.window.AppWindow.prototype.isMinimized = function() {};
358 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
360 chrome.app.window.AppWindow.prototype.maximize = function() {};
364 * @return {boolean}
365 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
367 chrome.app.window.AppWindow.prototype.isMaximized = function() {};
371 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
373 chrome.app.window.AppWindow.prototype.restore = function() {};
377 * @param {number} left The new left position, in pixels.
378 * @param {number} top The new top position, in pixels.
379 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
381 chrome.app.window.AppWindow.prototype.moveTo = function(left, top) {};
385 * @param {number} width The new width, in pixels.
386 * @param {number} height The new height, in pixels.
387 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
389 chrome.app.window.AppWindow.prototype.resizeTo = function(width, height) {};
393 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
395 chrome.app.window.AppWindow.prototype.drawAttention = function() {};
399 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
401 chrome.app.window.AppWindow.prototype.clearAttention = function() {};
405 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
407 chrome.app.window.AppWindow.prototype.close = function() {};
411 * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
412 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
414 chrome.app.window.AppWindow.prototype.show = function(opt_focus) {};
418 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
420 chrome.app.window.AppWindow.prototype.hide = function() {};
424 * @return {!chrome.app.window.Bounds} The current window bounds.
425 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
427 chrome.app.window.AppWindow.prototype.getBounds = function() {};
431 * @param {!chrome.app.window.Bounds} bounds The new window bounds.
432 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
434 chrome.app.window.AppWindow.prototype.setBounds = function(bounds) {};
438 * @return {boolean}
439 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
441 chrome.app.window.AppWindow.prototype.isAlwaysOnTop = function() {};
445 * @param {boolean} alwaysOnTop Set whether the window should stay above most
446 * other windows.
447 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
449 chrome.app.window.AppWindow.prototype.setAlwaysOnTop = function(alwaysOnTop) {};
452 /** @type {!ChromeEvent} */
453 chrome.app.window.AppWindow.prototype.onBoundsChanged;
456 /** @type {!ChromeEvent} */
457 chrome.app.window.AppWindow.prototype.onClosed;
460 /** @type {!ChromeEvent} */
461 chrome.app.window.AppWindow.prototype.onFullscreened;
464 /** @type {!ChromeEvent} */
465 chrome.app.window.AppWindow.prototype.onMinimized;
468 /** @type {!ChromeEvent} */
469 chrome.app.window.AppWindow.prototype.onMaximized;
472 /** @type {!ChromeEvent} */
473 chrome.app.window.AppWindow.prototype.onRestored;
476 /** @type {!Window} */
477 chrome.app.window.AppWindow.prototype.contentWindow;
481 * @typedef {{
482 * left: (number|undefined),
483 * top: (number|undefined),
484 * width: (number|undefined),
485 * height: (number|undefined)
486 * }}
487 * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
489 chrome.app.window.Bounds;
493 * @typedef {{
494 * id: (string|undefined),
495 * minWidth: (number|undefined),
496 * minHeight: (number|undefined),
497 * maxWidth: (number|undefined),
498 * maxHeight: (number|undefined),
499 * frame: (string|undefined),
500 * bounds: (!chrome.app.window.Bounds|undefined),
501 * transparentBackground: (boolean|undefined),
502 * state: (string|undefined),
503 * hidden: (boolean|undefined),
504 * resizable: (boolean|undefined),
505 * alwaysOnTop: (boolean|undefined),
506 * focused: (boolean|undefined)
507 * }}
508 * @see http://developer.chrome.com/apps/app.window.html#method-create
510 chrome.app.window.CreateWindowOptions;
514 * @param {string} url URL to create.
515 * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
516 * the new window.
517 * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
518 * Callback to be run.
519 * @see http://developer.chrome.com/apps/app.window.html#method-create
521 chrome.app.window.create = function(
522 url, opt_options, opt_createWindowCallback) {};
526 * Returns an AppWindow object for the current script context (ie JavaScript
527 * 'window' object).
528 * @return {!chrome.app.window.AppWindow}
529 * @see http://developer.chrome.com/apps/app.window.html#method-current
531 chrome.app.window.current = function() {};
535 * @type {!ChromeEvent}
536 * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
538 chrome.app.window.onBoundsChanged;
542 * @type {!ChromeEvent}
543 * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
545 chrome.app.window.onClosed;
549 * @type {!ChromeEvent}
550 * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
552 chrome.app.window.onFullscreened;
556 * @type {!ChromeEvent}
557 * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
559 chrome.app.window.onMaximized;
563 * @type {!ChromeEvent}
564 * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
566 chrome.app.window.onMinimized;
570 * @type {!ChromeEvent}
571 * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
573 chrome.app.window.onRestored;
577 * Private API.
579 * @const
580 * @see https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/audio_modem.idl
581 * @see go/chrome-modem
583 chrome.audioModem = {};
587 * @typedef {?{
588 * tokenLength: number,
589 * crc: (boolean|undefined),
590 * parity: (boolean|undefined)
591 * }}
593 chrome.audioModem.TokenEncoding;
597 * @typedef {?{
598 * timeoutMillis: number,
599 * band: string,
600 * encoding: !chrome.audioModem.TokenEncoding
601 * }}
603 chrome.audioModem.RequestParams;
606 /** @constructor */
607 chrome.audioModem.ReceivedToken = function() {};
610 /** @type {!ArrayBuffer} */
611 chrome.audioModem.ReceivedToken.prototype.token;
614 /** @type {string} */
615 chrome.audioModem.ReceivedToken.prototype.band;
619 * @param {!chrome.audioModem.RequestParams} params
620 * @param {!ArrayBuffer} token
621 * @param {function(string)} callback
623 chrome.audioModem.transmit = function(params, token, callback) {};
627 * @param {string} band
628 * @param {function(string)} callback
630 chrome.audioModem.stopTransmit = function(band, callback) {};
634 * @param {!chrome.audioModem.RequestParams} params
635 * @param {function(string)} callback
637 chrome.audioModem.receive = function(params, callback) {};
641 * @param {string} band
642 * @param {function(string)} callback
644 chrome.audioModem.stopReceive = function(band, callback) {};
647 /** @constructor */
648 chrome.audioModem.ReceivedEvent = function() {};
652 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
654 chrome.audioModem.ReceivedEvent.prototype.addListener = function(callback) {};
658 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
660 chrome.audioModem.ReceivedEvent.prototype.removeListener =
661 function(callback) {};
665 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
666 * @return {boolean}
668 chrome.audioModem.ReceivedEvent.prototype.hasListener = function(callback) {};
672 * @return {boolean}
674 chrome.audioModem.ReceivedEvent.prototype.hasListeners = function() {};
677 /** @type {!chrome.audioModem.ReceivedEvent} */
678 chrome.audioModem.onReceived;
681 /** @type {!ChromeStringEvent} */
682 chrome.audioModem.onTransmitFail;
686 * @const
687 * @see https://developer.chrome.com/apps/bluetooth
689 chrome.bluetooth = function() {};
694 * @constructor
695 * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
697 chrome.bluetooth.AdapterState = function() {};
700 /** @type {string} */
701 chrome.bluetooth.AdapterState.prototype.address;
704 /** @type {string} */
705 chrome.bluetooth.AdapterState.prototype.name;
708 /** @type {boolean} */
709 chrome.bluetooth.AdapterState.prototype.powered;
712 /** @type {boolean} */
713 chrome.bluetooth.AdapterState.prototype.available;
716 /** @type {boolean} */
717 chrome.bluetooth.AdapterState.prototype.discovering;
722 * @constructor
723 * @see https://developer.chrome.com/apps/bluetooth#type-Device
725 chrome.bluetooth.Device = function() {};
728 /** @type {string} */
729 chrome.bluetooth.Device.prototype.address;
732 /** @type {string|undefined} */
733 chrome.bluetooth.Device.prototype.name;
736 /** @type {number|undefined} */
737 chrome.bluetooth.Device.prototype.deviceClass;
740 /** @type {string|undefined} */
741 chrome.bluetooth.Device.prototype.vendorIdSource;
744 /** @type {string|undefined} */
745 chrome.bluetooth.Device.prototype.vendorId;
748 /** @type {number|undefined} */
749 chrome.bluetooth.Device.prototype.productId;
752 /** @type {number|undefined} */
753 chrome.bluetooth.Device.prototype.deviceId;
756 /** @type {string|undefined} */
757 chrome.bluetooth.Device.prototype.type;
760 /** @type {boolean|undefined} */
761 chrome.bluetooth.Device.prototype.paired;
764 /** @type {boolean|undefined} */
765 chrome.bluetooth.Device.prototype.connected;
768 /** @type {!Array.<string>|undefined} */
769 chrome.bluetooth.Device.prototype.uuids;
773 * @param {function(!chrome.bluetooth.AdapterState)} callback
774 * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
776 chrome.bluetooth.getAdapterState = function(callback) {};
780 * @param {string} deviceAddress
781 * @param {function(!chrome.bluetooth.Device)} callback
782 * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
784 chrome.bluetooth.getDevice = function(deviceAddress, callback) {};
788 * @param {function(!Array.<!chrome.bluetooth.Device>)} callback
789 * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
791 chrome.bluetooth.getDevices = function(callback) {};
795 * @param {function()=} opt_callback
796 * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
798 chrome.bluetooth.startDiscovery = function(opt_callback) {};
802 * @param {function()=} opt_callback
803 * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
805 chrome.bluetooth.stopDiscovery = function(opt_callback) {};
810 * Event whose listeners take an AdapaterState parameter.
811 * @constructor
813 chrome.bluetooth.AdapterStateEvent = function() {};
816 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
817 chrome.bluetooth.AdapterStateEvent.prototype.addListener =
818 function(callback) {};
821 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
822 chrome.bluetooth.AdapterStateEvent.prototype.removeListener =
823 function(callback) {};
827 * @param {function(!chrome.bluetooth.AdapterState): void} callback
828 * @return {boolean}
830 chrome.bluetooth.AdapterStateEvent.prototype.hasListener =
831 function(callback) {};
834 /** @return {boolean} */
835 chrome.bluetooth.AdapterStateEvent.prototype.hasListeners = function() {};
839 * @type {!chrome.bluetooth.AdapterStateEvent}
840 * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
842 chrome.bluetooth.onAdapterStateChanged;
847 * Event whose listeners take an Device parameter.
848 * @constructor
850 chrome.bluetooth.DeviceEvent = function() {};
853 /** @param {function(!chrome.bluetooth.Device): void} callback */
854 chrome.bluetooth.DeviceEvent.prototype.addListener = function(callback) {};
857 /** @param {function(!chrome.bluetooth.Device): void} callback */
858 chrome.bluetooth.DeviceEvent.prototype.removeListener = function(callback) {};
862 * @param {function(!chrome.bluetooth.Device): void} callback
863 * @return {boolean}
865 chrome.bluetooth.DeviceEvent.prototype.hasListener = function(callback) {};
868 /** @return {boolean} */
869 chrome.bluetooth.DeviceEvent.prototype.hasListeners = function() {};
873 * @type {!chrome.bluetooth.DeviceEvent}
874 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
876 chrome.bluetooth.onDeviceAdded;
880 * @type {!chrome.bluetooth.DeviceEvent}
881 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
883 chrome.bluetooth.onDeviceChanged;
887 * @type {!chrome.bluetooth.DeviceEvent}
888 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
890 chrome.bluetooth.onDeviceRemoved;
894 * @const
895 * @see https://developer.chrome.com/apps/bluetoothSocket
897 chrome.bluetoothSocket = {};
901 * @typedef {{
902 * persistent: (boolean|undefined),
903 * name: (string|undefined),
904 * bufferSize: (number|undefined)
905 * }}
906 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
908 chrome.bluetoothSocket.SocketProperties;
912 * @typedef {{
913 * channel: (number|undefined),
914 * psm: (number|undefined),
915 * backlog: (number|undefined)
916 * }}
917 * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
919 chrome.bluetoothSocket.ListenOptions;
924 * @constructor
925 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
927 chrome.bluetoothSocket.SocketInfo = function() {};
930 /** @type {number} */
931 chrome.bluetoothSocket.SocketInfo.prototype.socketId;
934 /** @type {boolean} */
935 chrome.bluetoothSocket.SocketInfo.prototype.persistent;
938 /** @type {string|undefined} */
939 chrome.bluetoothSocket.SocketInfo.prototype.name;
942 /** @type {number|undefined} */
943 chrome.bluetoothSocket.SocketInfo.prototype.bufferSize;
946 /** @type {boolean} */
947 chrome.bluetoothSocket.SocketInfo.prototype.paused;
950 /** @type {boolean} */
951 chrome.bluetoothSocket.SocketInfo.prototype.connected;
954 /** @type {string|undefined} */
955 chrome.bluetoothSocket.SocketInfo.prototype.address;
958 /** @type {string|undefined} */
959 chrome.bluetoothSocket.SocketInfo.prototype.uuid;
963 * @param {!chrome.bluetoothSocket.SocketProperties|
964 * function(!{socketId: number})} propertiesOrCallback
965 * @param {function(!{socketId: number})=} opt_callback
966 * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
968 chrome.bluetoothSocket.create = function(propertiesOrCallback, opt_callback) {};
972 * @param {number} socketId
973 * @param {!chrome.bluetoothSocket.SocketProperties} properties
974 * @param {function()=} opt_callback
975 * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
977 chrome.bluetoothSocket.update = function(socketId, properties, opt_callback) {};
981 * @param {number} socketId
982 * @param {boolean} paused
983 * @param {function()=} opt_callback
984 * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
986 chrome.bluetoothSocket.setPaused = function(socketId, paused, opt_callback) {};
990 * @param {number} socketId
991 * @param {string} uuid
992 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
993 * @param {function()=} opt_callback
994 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingRfcomm
996 chrome.bluetoothSocket.listenUsingRfcomm =
997 function(socketId, uuid, optionsOrCallback, opt_callback) {};
1001 * @param {number} socketId
1002 * @param {string} uuid
1003 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1004 * @param {function()=} opt_callback
1005 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
1007 chrome.bluetoothSocket.listenUsingL2cap =
1008 function(socketId, uuid, optionsOrCallback, opt_callback) {};
1012 * @param {number} socketId
1013 * @param {string} address
1014 * @param {string} uuid
1015 * @param {function()} callback
1016 * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
1018 chrome.bluetoothSocket.connect = function(socketId, address, uuid, callback) {};
1022 * @param {number} socketId
1023 * @param {function()=} opt_callback
1024 * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
1026 chrome.bluetoothSocket.disconnect = function(socketId, opt_callback) {};
1030 * @param {number} socketId
1031 * @param {function()=} opt_callback
1032 * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
1034 chrome.bluetoothSocket.close = function(socketId, opt_callback) {};
1038 * @param {number} socketId
1039 * @param {!ArrayBuffer} data
1040 * @param {function(number)=} opt_callback
1041 * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
1043 chrome.bluetoothSocket.send = function(socketId, data, opt_callback) {};
1047 * @param {number} socketId
1048 * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
1049 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
1051 chrome.bluetoothSocket.getInfo = function(socketId, callback) {};
1055 * @param {function(!Array.<!chrome.bluetoothSocket.SocketInfo>)} callback
1056 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
1058 chrome.bluetoothSocket.getSockets = function(callback) {};
1063 * @constructor
1064 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
1066 chrome.bluetoothSocket.AcceptEventData = function() {};
1069 /** @type {number} */
1070 chrome.bluetoothSocket.AcceptEventData.prototype.socketId;
1073 /** @type {number} */
1074 chrome.bluetoothSocket.AcceptEventData.prototype.clientSocketId;
1079 * Event whose listeners take a AcceptEventData parameter.
1080 * @constructor
1082 chrome.bluetoothSocket.AcceptEvent = function() {};
1086 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1088 chrome.bluetoothSocket.AcceptEvent.prototype.addListener =
1089 function(callback) {};
1093 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1095 chrome.bluetoothSocket.AcceptEvent.prototype.removeListener =
1096 function(callback) {};
1100 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1101 * @return {boolean}
1103 chrome.bluetoothSocket.AcceptEvent.prototype.hasListener =
1104 function(callback) {};
1107 /** @return {boolean} */
1108 chrome.bluetoothSocket.AcceptEvent.prototype.hasListeners = function() {};
1111 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
1112 chrome.bluetoothSocket.onAccept;
1117 * @constructor
1118 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
1120 chrome.bluetoothSocket.AcceptErrorEventData = function() {};
1123 /** @type {number} */
1124 chrome.bluetoothSocket.AcceptErrorEventData.prototype.socketId;
1127 /** @type {string} */
1128 chrome.bluetoothSocket.AcceptErrorEventData.prototype.errorMessage;
1131 /** @type {string} */
1132 chrome.bluetoothSocket.AcceptErrorEventData.prototype.error;
1137 * Event whose listeners take a AcceptErrorEventData parameter.
1138 * @constructor
1140 chrome.bluetoothSocket.AcceptErrorEvent = function() {};
1144 * @param {function(
1145 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1147 chrome.bluetoothSocket.AcceptErrorEvent.prototype.addListener =
1148 function(callback) {};
1152 * @param {function(
1153 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1155 chrome.bluetoothSocket.AcceptErrorEvent.prototype.removeListener =
1156 function(callback) {};
1160 * @param {function(
1161 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1162 * @return {boolean}
1164 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListener =
1165 function(callback) {};
1168 /** @return {boolean} */
1169 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListeners =
1170 function() {};
1173 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1174 chrome.bluetoothSocket.onAcceptError;
1179 * @constructor
1180 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1182 chrome.bluetoothSocket.ReceiveEventData = function() {};
1185 /** @type {number} */
1186 chrome.bluetoothSocket.ReceiveEventData.prototype.socketId;
1189 /** @type {!ArrayBuffer} */
1190 chrome.bluetoothSocket.ReceiveEventData.prototype.data;
1195 * Event whose listeners take a ReceiveEventData parameter.
1196 * @constructor
1198 chrome.bluetoothSocket.ReceiveEvent = function() {};
1202 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1204 chrome.bluetoothSocket.ReceiveEvent.prototype.addListener =
1205 function(callback) {};
1209 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1211 chrome.bluetoothSocket.ReceiveEvent.prototype.removeListener =
1212 function(callback) {};
1216 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1217 * @return {boolean}
1219 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListener =
1220 function(callback) {};
1223 /** @return {boolean} */
1224 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListeners = function() {};
1227 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1228 chrome.bluetoothSocket.onReceive;
1233 * @constructor
1234 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1236 chrome.bluetoothSocket.ReceiveErrorEventData = function() {};
1239 /** @type {number} */
1240 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.socketId;
1243 /** @type {string} */
1244 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.errorMessage;
1247 /** @type {string} */
1248 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.error;
1253 * Event whose listeners take a ReceiveErrorEventData parameter.
1254 * @constructor
1256 chrome.bluetoothSocket.ReceiveErrorEvent = function() {};
1260 * @param {function(
1261 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1263 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.addListener =
1264 function(callback) {};
1268 * @param {function(
1269 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1271 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.removeListener =
1272 function(callback) {};
1276 * @param {function(
1277 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1278 * @return {boolean}
1280 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListener =
1281 function(callback) {};
1284 /** @return {boolean} */
1285 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListeners =
1286 function() {};
1289 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1290 chrome.bluetoothSocket.onReceiveError;
1294 * @see https://developer.chrome.com/apps/bluetoothLowEnergy
1295 * @const
1297 chrome.bluetoothLowEnergy = {};
1301 * @constructor
1302 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Service
1304 chrome.bluetoothLowEnergy.Service = function() {};
1307 /** @type {string} */
1308 chrome.bluetoothLowEnergy.Service.prototype.uuid;
1311 /** @type {boolean} */
1312 chrome.bluetoothLowEnergy.Service.prototype.isPrimary;
1315 /** @type {string|undefined} */
1316 chrome.bluetoothLowEnergy.Service.prototype.instanceId;
1319 /** @type {string|undefined} */
1320 chrome.bluetoothLowEnergy.Service.prototype.deviceAddress;
1324 * @constructor
1325 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Characteristic
1327 chrome.bluetoothLowEnergy.Characteristic = function() {};
1330 /** @type {string} */
1331 chrome.bluetoothLowEnergy.Characteristic.prototype.uuid;
1334 /** @type {!chrome.bluetoothLowEnergy.Service} */
1335 chrome.bluetoothLowEnergy.Characteristic.prototype.service;
1338 /** @type {!Array.<string>} */
1339 chrome.bluetoothLowEnergy.Characteristic.prototype.properties;
1342 /** @type {string|undefined} */
1343 chrome.bluetoothLowEnergy.Characteristic.prototype.instanceId;
1346 /** @type {!ArrayBuffer|undefined} */
1347 chrome.bluetoothLowEnergy.Characteristic.prototype.value;
1351 * @constructor
1352 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Descriptor
1354 chrome.bluetoothLowEnergy.Descriptor = function() {};
1356 /** @type {string} */
1357 chrome.bluetoothLowEnergy.Descriptor.prototype.uuid;
1360 /** @type {!chrome.bluetoothLowEnergy.Characteristic} */
1361 chrome.bluetoothLowEnergy.Descriptor.prototype.characteristic;
1364 /** @type {string|undefined} */
1365 chrome.bluetoothLowEnergy.Descriptor.prototype.instanceId;
1368 /** @type {!ArrayBuffer|undefined} */
1369 chrome.bluetoothLowEnergy.Descriptor.prototype.value;
1373 * @typedef {?{
1374 * persistent: boolean
1375 * }}
1377 chrome.bluetoothLowEnergy.ConnectionProperties;
1381 * @param {string} deviceAddress
1382 * @param {!chrome.bluetoothLowEnergy.ConnectionProperties|function()}
1383 * propertiesOrCallback
1384 * @param {function()=} opt_callback
1385 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect
1387 chrome.bluetoothLowEnergy.connect =
1388 function(deviceAddress, propertiesOrCallback, opt_callback) {};
1391 * @param {string} deviceAddress
1392 * @param {function()=} opt_callback
1393 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect
1395 chrome.bluetoothLowEnergy.disconnect = function(deviceAddress, opt_callback) {};
1399 * @param {string} serviceId
1400 * @param {function(!chrome.bluetoothLowEnergy.Service)} callback
1401 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService
1403 chrome.bluetoothLowEnergy.getService = function(serviceId, callback) {};
1407 * @param {string} deviceAddress
1408 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1409 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices
1411 chrome.bluetoothLowEnergy.getServices = function(deviceAddress, callback) {};
1415 * @param {string} characteristicId
1416 * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1417 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic
1419 chrome.bluetoothLowEnergy.getCharacteristic =
1420 function(characteristicId, callback) {};
1424 * @param {string} serviceId
1425 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Characteristic>)}
1426 * callback
1427 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics
1429 chrome.bluetoothLowEnergy.getCharacteristics =
1430 function(serviceId, callback) {};
1434 * @param {string} serviceId
1435 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1436 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices
1438 chrome.bluetoothLowEnergy.getIncludedServices =
1439 function(serviceId, callback) {};
1443 * @param {string} descriptorId
1444 * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1445 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor
1447 chrome.bluetoothLowEnergy.getDescriptor = function(descriptorId, callback) {};
1451 * @param {string} characteristicId
1452 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Descriptor>)} callback
1453 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors
1455 chrome.bluetoothLowEnergy.getDescriptors =
1456 function(characteristicId, callback) {};
1460 * @param {string} characteristicId
1461 * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1462 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue
1464 chrome.bluetoothLowEnergy.readCharacteristicValue =
1465 function(characteristicId, callback) {};
1469 * @param {string} characteristicId
1470 * @param {!ArrayBuffer} value
1471 * @param {function()} callback
1472 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue
1474 chrome.bluetoothLowEnergy.writeCharacteristicValue =
1475 function(characteristicId, value, callback) {};
1479 * @typedef {?{
1480 * persistent: boolean
1481 * }}
1483 chrome.bluetoothLowEnergy.NotificationSessionProperties;
1486 * @param {string} characteristicId
1487 * @param {!chrome.bluetoothLowEnergy.NotificationSessionProperties|function()}
1488 * propertiesOrCallback
1489 * @param {function()=} opt_callback
1490 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications
1492 chrome.bluetoothLowEnergy.startCharacteristicNotifications =
1493 function(characteristicId, propertiesOrCallback, opt_callback) {};
1497 * @param {string} characteristicId
1498 * @param {function()=} opt_callback
1499 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications
1501 chrome.bluetoothLowEnergy.stopCharacteristicNotifications =
1502 function(characteristicId, opt_callback) {};
1506 * @param {string} descriptorId
1507 * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1508 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue
1510 chrome.bluetoothLowEnergy.readDescriptorValue =
1511 function(descriptorId, callback) {};
1515 * @param {string} descriptorId
1516 * @param {!ArrayBuffer} value
1517 * @param {function()} callback
1518 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue
1520 chrome.bluetoothLowEnergy.writeDescriptorValue =
1521 function(descriptorId, value, callback) {};
1525 * Event whose listeners take a Service parameter.
1526 * @constructor
1528 chrome.bluetoothLowEnergy.ServiceEvent = function() {};
1531 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1532 chrome.bluetoothLowEnergy.ServiceEvent.prototype.addListener =
1533 function(callback) {};
1536 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1537 chrome.bluetoothLowEnergy.ServiceEvent.prototype.removeListener =
1538 function(callback) {};
1541 * @param {function(!chrome.bluetoothLowEnergy.Service): void} callback
1542 * @return {boolean}
1544 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListener =
1545 function(callback) {};
1548 /** @return {boolean} */
1549 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListeners =
1550 function() {};
1553 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1554 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded
1556 chrome.bluetoothLowEnergy.onServiceAdded;
1560 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1561 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged
1563 chrome.bluetoothLowEnergy.onServiceChanged;
1567 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1568 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved
1570 chrome.bluetoothLowEnergy.onServiceRemoved;
1574 * Event whose listeners take a Characteristic parameter.
1575 * @constructor
1577 chrome.bluetoothLowEnergy.CharacteristicEvent = function() {};
1581 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1582 * callback
1584 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.addListener =
1585 function(callback) {};
1589 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1590 * callback
1592 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.removeListener =
1593 function(callback) {};
1597 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1598 * callback
1599 * @return {boolean}
1601 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListener =
1602 function(callback) {};
1605 /** @return {boolean} */
1606 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListeners =
1607 function() {};
1611 * @type {!chrome.bluetoothLowEnergy.CharacteristicEvent}
1612 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged
1614 chrome.bluetoothLowEnergy.onCharacteristicValueChanged;
1618 * Event whose listeners take a Characteristic parameter.
1619 * @constructor
1621 chrome.bluetoothLowEnergy.DescriptorEvent = function() {};
1625 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1626 * callback
1628 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.addListener =
1629 function(callback) {};
1633 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1634 * callback
1636 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.removeListener =
1637 function(callback) {};
1641 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void} callback
1642 * @return {boolean}
1644 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListener =
1645 function(callback) {};
1648 /** @return {boolean} */
1649 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListeners =
1650 function() {};
1654 * @type {!chrome.bluetoothLowEnergy.DescriptorEvent}
1655 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged
1657 chrome.bluetoothLowEnergy.onDescriptorValueChanged;
1661 * @see http://developer.chrome.com/extensions/commands.html
1662 * @const
1664 chrome.commands = {};
1668 * @param {function(Array.<string>): void} callback Callback function.
1670 chrome.commands.getAll = function(callback) {};
1673 /** @type {!ChromeEvent} */
1674 chrome.commands.onCommand;
1678 * @see https://developer.chrome.com/apps/copresence
1679 * @const
1681 chrome.copresence = {};
1685 * @typedef {?{
1686 * lowPower: (boolean|undefined),
1687 * onlyBroadcast: (boolean|undefined),
1688 * onlyScan: (boolean|undefined),
1689 * audible: (boolean|undefined)
1690 * }}
1691 * @see https://developer.chrome.com/apps/copresence#type-Strategy
1693 chrome.copresence.Strategy;
1697 * @typedef {?{
1698 * type: string,
1699 * payload: ArrayBuffer
1700 * }}
1701 * @see https://developer.chrome.com/apps/copresence#type-Message
1703 chrome.copresence.Message;
1707 * @typedef {?{
1708 * onlyEarshot: (boolean|undefined)
1709 * }}
1710 * https://developer.chrome.com/apps/copresence#type-AccessPolicy
1712 chrome.copresence.AccessPolicy;
1716 * @typedef {?{
1717 * id: string,
1718 * message: !chrome.copresence.Message,
1719 * timeToLiveMillis: (number|undefined),
1720 * policy: (!chrome.copresence.AccessPolicy|undefined),
1721 * strategies: (!chrome.copresence.Strategy|undefined)
1722 * }}
1723 * @see https://developer.chrome.com/apps/copresence#type-PublishOperation
1725 chrome.copresence.PublishOperation;
1728 /** @typedef {?{type: string}} */
1729 chrome.copresence.SubscriptionFilter;
1733 * @typedef {?{
1734 * id: string,
1735 * filter: !chrome.copresence.SubscriptionFilter,
1736 * timeToLiveMillis: (number|undefined),
1737 * strategies: (!chrome.copresence.Strategy|undefined)
1738 * }}
1739 * @see https://developer.chrome.com/apps/copresence#type-SubscribeOperation
1741 chrome.copresence.SubscribeOperation;
1745 * @typedef {?{
1746 * unpublishId: string
1747 * }}
1748 * @see https://developer.chrome.com/apps/copresence#type-UnpublishOperation
1750 chrome.copresence.UnpublishOperation;
1754 * @typedef {?{
1755 * unsubscribeId: string
1756 * }}
1757 * @see https://developer.chrome.com/apps/copresence#type-UnsubscribeOperation
1759 chrome.copresence.UnsubscribeOperation;
1763 * @typedef {?{
1764 * publish: (!chrome.copresence.PublishOperation|undefined),
1765 * subscribe: (!chrome.copresence.SubscribeOperation|undefined),
1766 * unpublish: (!chrome.copresence.UnpublishOperation|undefined),
1767 * unsubscribe: (!chrome.copresence.UnsubscribeOperation|undefined)
1768 * }}
1769 * @see https://developer.chrome.com/apps/copresence#type-Operation
1771 chrome.copresence.Operation;
1775 * @param {!Array.<!chrome.copresence.Operation>} operations
1776 * @param {function(string): void} callback
1777 * @see https://developer.chrome.com/apps/copresence#method-execute
1779 chrome.copresence.execute = function(operations, callback) {};
1784 * Event whose listeners take a subscription id and received messages as a
1785 * parameter.
1786 * @constructor
1787 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1789 chrome.copresence.MessagesReceivedEvent = function() {};
1793 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1795 chrome.copresence.MessagesReceivedEvent.prototype.addListener =
1796 function(callback) {};
1800 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1802 chrome.copresence.MessagesReceivedEvent.prototype.removeListener =
1803 function(callback) {};
1807 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1808 * @return {boolean}
1810 chrome.copresence.MessagesReceivedEvent.prototype.hasListener =
1811 function(callback) {};
1814 /** @return {boolean} */
1815 chrome.copresence.MessagesReceivedEvent.prototype.hasListeners = function() {};
1819 * @type {!chrome.copresence.MessagesReceivedEvent}
1820 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1822 chrome.copresence.onMessagesReceived;
1826 * @type {!ChromeStringEvent}
1827 * @see https://developer.chrome.com/apps/copresence#event-onStatusUpdated
1829 chrome.copresence.onStatusUpdated;
1833 * @see https://developer.chrome.com/extensions/extension.html
1834 * @const
1836 chrome.extension = {};
1839 /** @type {!Object|undefined} */
1840 chrome.extension.lastError = {};
1844 * @type {string|undefined}
1846 chrome.extension.lastError.message;
1849 /** @type {boolean|undefined} */
1850 chrome.extension.inIncognitoContext;
1853 // TODO: change Object to !Object when it's clear nobody is passing in null
1854 // TODO: change Port to !Port since it should never be null
1856 * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
1857 * extensionId to connect to, in which case connectInfo params can be
1858 * passed in the next optional argument, or the connectInfo params.
1859 * @param {Object.<string>=} opt_connectInfo The connectInfo object,
1860 * if arg1 was the extensionId to connect to.
1861 * @return {Port} New port.
1863 chrome.extension.connect = function(
1864 opt_extensionIdOrConnectInfo, opt_connectInfo) {};
1868 * @return {Window} The global JS object for the background page.
1870 chrome.extension.getBackgroundPage = function() {};
1874 * @param {string} path A path to a resource within an extension expressed
1875 * relative to it's install directory.
1876 * @return {string} The fully-qualified URL to the resource.
1878 chrome.extension.getURL = function(path) {};
1882 * @param {Object=} opt_fetchProperties An object with optional 'type' and
1883 * optional 'windowId' keys.
1884 * @return {Array.<Window>} The global JS objects for each content view.
1886 chrome.extension.getViews = function(opt_fetchProperties) {};
1890 * @param {function(boolean): void} callback Callback function.
1892 chrome.extension.isAllowedFileSchemeAccess = function(callback) {};
1896 * @param {function(boolean): void} callback Callback function.
1898 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
1902 * @param {string|*} extensionIdOrRequest Either the extensionId to send the
1903 * request to, in which case the request is passed as the next arg, or the
1904 * request.
1905 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1906 * @param {function(*): void=} opt_callback The callback function which
1907 * takes a JSON response object sent by the handler of the request.
1909 chrome.extension.sendMessage = function(
1910 extensionIdOrRequest, opt_request, opt_callback) {};
1914 * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
1915 * in which case the request is passed as the next arg, or the request.
1916 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1917 * @param {function(*): void=} opt_callback The callback function which
1918 * takes a JSON response object sent by the handler of the request.
1920 chrome.extension.sendRequest = function(opt_arg1, opt_request, opt_callback) {};
1924 * @param {string} data
1926 chrome.extension.setUpdateUrlData = function(data) {};
1929 /** @type {!ChromeEvent} */
1930 chrome.extension.onConnect;
1933 /** @type {!ChromeEvent} */
1934 chrome.extension.onConnectExternal;
1937 /** @type {!ChromeEvent} */
1938 chrome.extension.onMessage;
1941 /** @type {!ChromeEvent} */
1942 chrome.extension.onRequest;
1945 /** @type {!ChromeEvent} */
1946 chrome.extension.onRequestExternal;
1950 * @see https://developer.chrome.com/extensions/runtime.html
1951 * @const
1953 chrome.runtime = {};
1956 /** @type {!Object|undefined} */
1957 chrome.runtime.lastError = {};
1961 * @type {string|undefined}
1963 chrome.runtime.lastError.message;
1966 /** @type {string} */
1967 chrome.runtime.id;
1971 * @param {function(!Window=): void} callback Callback function.
1973 chrome.runtime.getBackgroundPage = function(callback) {};
1978 * Manifest information returned from chrome.runtime.getManifest. See
1979 * http://developer.chrome.com/extensions/manifest.html. Note that there are
1980 * several other fields not included here. They should be added to these externs
1981 * as needed.
1982 * @constructor
1984 chrome.runtime.Manifest = function() {};
1987 /** @type {string} */
1988 chrome.runtime.Manifest.prototype.name;
1991 /** @type {string} */
1992 chrome.runtime.Manifest.prototype.version;
1995 /** @type {number|undefined} */
1996 chrome.runtime.Manifest.prototype.manifest_version;
1999 /** @type {string|undefined} */
2000 chrome.runtime.Manifest.prototype.description;
2003 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
2004 chrome.runtime.Manifest.prototype.oauth2;
2007 /** @type {!Array.<(string|!Object)>} */
2008 chrome.runtime.Manifest.prototype.permissions;
2013 * Oauth2 info in the manifest.
2014 * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
2015 * @constructor
2017 chrome.runtime.Manifest.Oauth2 = function() {};
2020 /** @type {string} */
2021 chrome.runtime.Manifest.Oauth2.prototype.client_id;
2024 /**@type {!Array.<string>} */
2025 chrome.runtime.Manifest.Oauth2.prototype.scopes;
2029 * http://developer.chrome.com/extensions/runtime.html#method-getManifest
2030 * @return {!chrome.runtime.Manifest} The full manifest file of the app or
2031 * extension.
2033 chrome.runtime.getManifest = function() {};
2037 * @param {string} path A path to a resource within an extension expressed
2038 * relative to it's install directory.
2039 * @return {string} The fully-qualified URL to the resource.
2041 chrome.runtime.getURL = function(path) {};
2045 * @param {string} url This may be used to clean up server-side data, do
2046 * analytics, and implement surveys. Maximum 255 characters.
2048 chrome.runtime.setUninstallUrl = function(url) {};
2052 * Reloads the app or extension.
2054 chrome.runtime.reload = function() {};
2058 * @param {function(string, !Object=): void} callback Called with "throttled",
2059 * "no_update", or "update_available". If an update is available, the object
2060 * contains more information about the available update.
2062 chrome.runtime.requestUpdateCheck = function(callback) {};
2066 * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
2067 * no-op.
2069 chrome.runtime.restart = function() {};
2073 * @param {string|!Object.<string>=} opt_extensionIdOrConnectInfo Either the
2074 * extensionId to connect to, in which case connectInfo params can be
2075 * passed in the next optional argument, or the connectInfo params.
2076 * @param {!Object.<string>=} opt_connectInfo The connectInfo object,
2077 * if arg1 was the extensionId to connect to.
2078 * @return {!Port} New port.
2080 chrome.runtime.connect = function(
2081 opt_extensionIdOrConnectInfo, opt_connectInfo) {};
2085 * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
2086 * @param {string} application Name of the registered native messaging host to
2087 * connect to, like 'com.google.your_product'.
2088 * @return {!Port} New port.
2090 chrome.runtime.connectNative = function(application) {};
2094 * @param {string|*} extensionIdOrMessage Either the extensionId to send the
2095 * message to, in which case the message is passed as the next arg, or the
2096 * message itself.
2097 * @param {(*|Object|function(*): void)=} opt_messageOrOptsOrCallback
2098 * One of:
2099 * The message, if arg1 was the extensionId.
2100 * The options for message sending, if arg1 was the message and this
2101 * argument is not a function.
2102 * The callback, if arg1 was the message and this argument is a function.
2103 * @param {(Object|function(*): void)=} opt_optsOrCallback
2104 * Either the options for message sending, if arg2 was the message,
2105 * or the callback.
2106 * @param {function(*): void=} opt_callback The callback function which
2107 * takes a JSON response object sent by the handler of the request.
2109 chrome.runtime.sendMessage = function(
2110 extensionIdOrMessage, opt_messageOrOptsOrCallback, opt_optsOrCallback,
2111 opt_callback) {};
2115 * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
2116 * @param {string} application Name of the registered native messaging host to
2117 * connect to, like 'com.google.your_product'.
2118 * @param {Object} message The message that will be passed to the native
2119 * messaging host.
2120 * @param {function(*)=} opt_callback Called with the response message sent by
2121 * the native messaging host. If an error occurs while connecting to the
2122 * native messaging host, the callback will be called with no arguments and
2123 * chrome.runtime.lastError will be set to the error message.
2125 chrome.runtime.sendNativeMessage = function(
2126 application, message, opt_callback) {};
2131 * @param {function(!Object)} callback
2133 chrome.runtime.getPlatformInfo = function(callback) {};
2137 * @param {function(!DirectoryEntry)} callback
2139 chrome.runtime.getPackageDirectoryEntry = function(callback) {};
2142 /** @type {!chrome.runtime.PortEvent} */
2143 chrome.runtime.onConnect;
2146 /** @type {!chrome.runtime.PortEvent} */
2147 chrome.runtime.onConnectExternal;
2150 /** @type {!ChromeObjectEvent} */
2151 chrome.runtime.onInstalled;
2154 /** @type {!chrome.runtime.MessageSenderEvent} */
2155 chrome.runtime.onMessage;
2158 /** @type {!chrome.runtime.MessageSenderEvent} */
2159 chrome.runtime.onMessageExternal;
2162 /** @type {!ChromeEvent} */
2163 chrome.runtime.onStartup;
2166 /** @type {!ChromeEvent} */
2167 chrome.runtime.onSuspend;
2170 /** @type {!ChromeEvent} */
2171 chrome.runtime.onSuspendCanceled;
2174 /** @type {!ChromeObjectEvent} */
2175 chrome.runtime.onUpdateAvailable;
2178 /** @type {!ChromeStringEvent} */
2179 chrome.runtime.onRestartRequired;
2184 * Event whose listeners take a Port parameter.
2185 * @constructor
2187 chrome.runtime.PortEvent = function() {};
2191 * @param {function(!Port): void} callback Callback.
2193 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
2197 * @param {function(!Port): void} callback Callback.
2199 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
2203 * @param {function(!Port): void} callback Callback.
2204 * @return {boolean}
2206 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
2210 * @return {boolean}
2212 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
2217 * Event whose listeners take a MessageSender and additional parameters.
2218 * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
2219 * @constructor
2221 chrome.runtime.MessageSenderEvent = function() {};
2225 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2226 * callback Callback.
2228 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
2232 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2233 * callback Callback.
2235 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
2240 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2241 * callback Callback.
2242 * @return {boolean}
2244 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
2248 * @return {boolean}
2250 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
2254 * @const
2255 * @see https://developer.chrome.com/extensions/tabs.html
2257 chrome.tabs = {};
2261 * @typedef {?{
2262 * code: (string|undefined),
2263 * file: (string|undefined),
2264 * allFrames: (boolean|undefined),
2265 * matchAboutBlank: (boolean|undefined),
2266 * runAt: (string|undefined)
2267 * }}
2269 chrome.tabs.InjectDetails;
2273 * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
2274 * @param {number|!chrome.types.ImageDetails|function(string):void}
2275 * windowIdOrOptionsOrCallback One of:
2276 * The target window.
2277 * An object defining details about the format and quality of an image, in
2278 * which case the window defaults to the current window.
2279 * A callback function which accepts the data URL string of a JPEG encoding
2280 * of the visible area of the captured tab.
2281 * @param {(!chrome.types.ImageDetails|function(string):void)=}
2282 * opt_optionsOrCallback Either an object defining details about the
2283 * format and quality of an image, or a callback function which accepts the
2284 * data URL string of a JPEG encoding of the visible area of the captured
2285 * tab.
2286 * @param {function(string):void=} opt_callback A callback function which
2287 * accepts the data URL string of a JPEG encoding of the visible area of the
2288 * captured tab.
2290 chrome.tabs.captureVisibleTab = function(windowIdOrOptionsOrCallback,
2291 opt_optionsOrCallback, opt_callback) {};
2295 * @param {number} tabId Tab Id.
2296 * @param {{name: (string|undefined)}=} connectInfo Info Object.
2298 chrome.tabs.connect = function(tabId, connectInfo) {};
2302 * @typedef {?{
2303 * windowId: (number|undefined),
2304 * index: (number|undefined),
2305 * url: (string|undefined),
2306 * active: (boolean|undefined),
2307 * pinned: (boolean|undefined),
2308 * openerTabId: (number|undefined)
2309 * }}
2311 chrome.tabs.CreateProperties;
2315 * @param {!chrome.tabs.CreateProperties} createProperties Info object.
2316 * @param {function(!Tab): void=} opt_callback The callback function.
2318 chrome.tabs.create = function(createProperties, opt_callback) {};
2322 * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
2323 * @param {number|function(string): void} tabIdOrCallback The tab id, or a
2324 * callback function that will be invoked with the language of the active
2325 * tab in the current window.
2326 * @param {function(string): void=} opt_callback An optional callback function
2327 * that will be invoked with the language of the tab specified as first
2328 * argument.
2330 chrome.tabs.detectLanguage = function(tabIdOrCallback, opt_callback) {};
2334 * @see https://developer.chrome.com/extensions/tabs#method-executeScript
2335 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2336 * Either the id of the tab in which to run the script, or an object
2337 * containing the details of the script to run, in which case the script
2338 * will be executed in the active tab of the current window.
2339 * @param {(!chrome.tabs.InjectDetails|function(!Array.<*>):void)=}
2340 * opt_detailsOrCallback Either an object containing the details of the
2341 * script to run, if the tab id was speficied as first argument, or a
2342 * callback that will be invoked with the result of the execution of the
2343 * script in every injected frame.
2344 * @param {function(!Array.<*>):void=} opt_callback A callback that will be
2345 * invoked with the result of the execution of the script in every
2346 * injected frame.
2348 chrome.tabs.executeScript = function(tabIdOrDetails, opt_detailsOrCallback,
2349 opt_callback) {};
2353 * @param {number} tabId Tab id.
2354 * @param {function(!Tab): void} callback Callback.
2356 chrome.tabs.get = function(tabId, callback) {};
2360 * Note (2014-05-21): Because this function is deprecated, the types of it's
2361 * parameters were not upgraded to make the first parameter optional and to mark
2362 * the Array and Tab in the callback as non-null.
2364 * @param {number?} windowId Window id.
2365 * @param {function(Array.<Tab>): void} callback Callback.
2366 * @deprecated Please use tabs.query {windowId: windowId}.
2368 chrome.tabs.getAllInWindow = function(windowId, callback) {};
2372 * @param {function(!Tab=): void} callback Callback.
2374 chrome.tabs.getCurrent = function(callback) {};
2378 * Note (2014-05-21): Because this function is deprecated, the types of it's
2379 * parameters were not upgraded to make the first parameter optional and to mark
2380 * the Array and Tab in the callback as non-null.
2382 * @param {number?} windowId Window id.
2383 * @param {function(Tab): void} callback Callback.
2384 * @deprecated Please use tabs.query({active: true}).
2386 chrome.tabs.getSelected = function(windowId, callback) {};
2390 * @typedef {?{
2391 * windowId: (number|undefined),
2392 * tabs: (number|!Array.<number>)
2393 * }}
2395 chrome.tabs.HighlightInfo;
2399 * @param {!chrome.tabs.HighlightInfo} highlightInfo
2400 * @param {function(!Window): void} callback Callback function invoked
2401 * with each appropriate Window.
2403 chrome.tabs.highlight = function(highlightInfo, callback) {};
2407 * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
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 CSS to insert, in which case the script
2411 * will be executed in the active tab of the current window.
2412 * @param {(!chrome.tabs.InjectDetails|function():void)=}
2413 * opt_detailsOrCallback Either an object containing the details of the
2414 * CSS to insert, if the tab id was speficied as first argument, or a
2415 * callback that will be invoked after the CSS has been injected.
2416 * @param {function():void=} opt_callback A callback that will be invoked after
2417 * the CSS has been injected.
2419 chrome.tabs.insertCSS = function(tabIdOrDetails, opt_detailsOrCallback,
2420 opt_callback) {};
2424 * @typedef {?{
2425 * windowId: (number|undefined),
2426 * index: number
2427 * }}
2429 chrome.tabs.MoveProperties;
2433 * @param {number|!Array.<number>} tabId Tab id or array of tab ids.
2434 * @param {!chrome.tabs.MoveProperties} moveProperties
2435 * @param {function((!Tab|!Array.<!Tab>)): void=} opt_callback Callback.
2437 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
2441 * @typedef {?{
2442 * active: (boolean|undefined),
2443 * pinned: (boolean|undefined),
2444 * highlighted: (boolean|undefined),
2445 * currentWindow: (boolean|undefined),
2446 * lastFocusedWindow: (boolean|undefined),
2447 * status: (string|undefined),
2448 * title: (string|undefined),
2449 * url: (string|undefined),
2450 * windowId: (number|undefined),
2451 * windowType: (string|undefined),
2452 * index: (number|undefined)
2453 * }}
2455 chrome.tabs.QueryInfo;
2459 * @param {!chrome.tabs.QueryInfo} queryInfo
2460 * @param {function(!Array.<!Tab>): void} callback Callback.
2462 chrome.tabs.query = function(queryInfo, callback) {};
2466 * @see https://developer.chrome.com/extensions/tabs#method-query
2467 * @param {number} tabId The ID of the tab which is to be duplicated.
2468 * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
2469 * details about the duplicated tab.
2471 chrome.tabs.duplicate = function(tabId, opt_callback) {};
2475 * @typedef {?{
2476 * bypassCache: (boolean|undefined)
2477 * }}
2479 chrome.tabs.ReloadProperties;
2483 * @see https://developer.chrome.com/extensions/tabs#method-reload
2484 * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
2485 * opt_tabIdOrReloadPropertiesOrCallback One of:
2486 * The ID of the tab to reload; defaults to the selected tab of the current
2487 * window.
2488 * An object specifying boolean flags to customize the reload operation.
2489 * A callback to be invoked when the reload is complete.
2490 * @param {(!chrome.tabs.ReloadProperties|function():void)=}
2491 * opt_reloadPropertiesOrCallback Either an object specifying boolean flags
2492 * to customize the reload operation, or a callback to be invoked when the
2493 * reload is complete, if no object needs to be specified.
2494 * @param {function():void=} opt_callback A callback to be invoked when the
2495 * reload is complete.
2497 chrome.tabs.reload = function(opt_tabIdOrReloadPropertiesOrCallback,
2498 opt_reloadPropertiesOrCallback, opt_callback) {};
2502 * @param {number|!Array.<number>} tabIds A tab ID or an array of tab IDs.
2503 * @param {function(): void=} opt_callback Callback.
2505 chrome.tabs.remove = function(tabIds, opt_callback) {};
2509 * @param {number} tabId Tab id.
2510 * @param {*} request The request value of any type.
2511 * @param {function(*): void=} opt_callback The callback function which
2512 * takes a JSON response object sent by the handler of the request.
2514 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
2518 * @param {number} tabId Tab id.
2519 * @param {*} request The request value of any type.
2520 * @param {function(*): void=} opt_callback The callback function which
2521 * takes a JSON response object sent by the handler of the request.
2522 * @deprecated Please use runtime.sendMessage.
2524 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
2528 * @typedef {?{
2529 * url: (string|undefined),
2530 * active: (boolean|undefined),
2531 * highlighted: (boolean|undefined),
2532 * pinned: (boolean|undefined),
2533 * openerTabId: (number|undefined)
2534 * }}
2536 chrome.tabs.UpdateProperties;
2540 * @see https://developer.chrome.com/extensions/tabs#method-update
2541 * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
2542 * Either the id of the tab to update, or an object with new property
2543 * values, in which case the selected tab of the current window will be
2544 * updated.
2545 * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
2546 * opt_updatePropertiesOrCallback Either an object with new property values,
2547 * if the tabId was specified as first parameter, or an optional callback
2548 * that will be invoked with information about the tab being updated.
2549 * @param {function(!Tab=): void=} opt_callback An optional callback that will
2550 * be invoked with information about the tab being updated.
2552 chrome.tabs.update = function(tabIdOrUpdateProperties,
2553 opt_updatePropertiesOrCallback, opt_callback) {};
2557 * @type {!ChromeEvent}
2558 * @deprecated Please use tabs.onActivated.
2560 chrome.tabs.onActiveChanged;
2563 /** @type {!ChromeEvent} */
2564 chrome.tabs.onActivated;
2567 /** @type {!ChromeEvent} */
2568 chrome.tabs.onAttached;
2571 /** @type {!ChromeEvent} */
2572 chrome.tabs.onCreated;
2575 /** @type {!ChromeEvent} */
2576 chrome.tabs.onDetached;
2580 * @type {!ChromeEvent}
2581 * @deprecated Please use tabs.onHighlighted.
2583 chrome.tabs.onHighlightChanged;
2587 * @type {!ChromeEvent}
2589 chrome.tabs.onHighlighted;
2592 /** @type {!ChromeEvent} */
2593 chrome.tabs.onMoved;
2596 /** @type {!ChromeEvent} */
2597 chrome.tabs.onRemoved;
2600 /** @type {!ChromeEvent} */
2601 chrome.tabs.onUpdated;
2604 /** @type {!ChromeEvent} */
2605 chrome.tabs.onReplaced;
2607 // DEPRECATED:
2608 // TODO(user): Remove once all usage has been confirmed to have ended.
2612 * @type {!ChromeEvent}
2613 * @deprecated Please use tabs.onActivated.
2615 chrome.tabs.onSelectionChanged;
2619 * @see https://developer.chrome.com/extensions/topSites
2620 * @const
2622 chrome.topSites = {};
2627 * @constructor
2628 * @see https://developer.chrome.com/extensions/topSites#type-MostVisitedURL
2630 chrome.topSites.MostVisitedURL = function() {};
2633 /** @type {string} */
2634 chrome.topSites.MostVisitedURL.prototype.url;
2637 /** @type {string} */
2638 chrome.topSites.MostVisitedURL.prototype.title;
2642 * Gets a list of top sites.
2643 * @param {function(!Array<!chrome.topSites.MostVisitedURL>)} callback Invoked
2644 * with a list of most visited URLs.
2645 * @see https://developer.chrome.com/extensions/topSites#method-get
2647 chrome.topSites.get = function(callback) {};
2651 * @const
2652 * @see https://developer.chrome.com/extensions/windows.html
2654 chrome.windows = {};
2658 * @param {Object=} opt_createData May have many keys to specify parameters.
2659 * Or the callback.
2660 * @param {function(ChromeWindow): void=} opt_callback Callback.
2662 chrome.windows.create = function(opt_createData, opt_callback) {};
2666 * @param {number} id Window id.
2667 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2668 * @param {function(!ChromeWindow): void=} opt_callback Callback when
2669 * opt_getInfo is an object.
2671 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
2675 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2676 * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
2678 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
2682 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2683 * @param {function(ChromeWindow): void=} opt_callback Callback.
2685 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
2689 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2690 * @param {function(ChromeWindow): void=} opt_callback Callback.
2692 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
2696 * @param {number} tabId Tab Id.
2697 * @param {function(): void=} opt_callback Callback.
2699 chrome.windows.remove = function(tabId, opt_callback) {};
2703 * @param {number} tabId Tab Id.
2704 * @param {Object} updateProperties An object which may have many keys for
2705 * various options.
2706 * @param {function(): void=} opt_callback Callback.
2708 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
2711 /** @type {!ChromeEvent} */
2712 chrome.windows.onCreated;
2715 /** @type {!ChromeEvent} */
2716 chrome.windows.onFocusChanged;
2719 /** @type {!ChromeEvent} */
2720 chrome.windows.onRemoved;
2724 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2725 * @type {number}
2727 chrome.windows.WINDOW_ID_NONE;
2731 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2732 * @type {number}
2734 chrome.windows.WINDOW_ID_CURRENT;
2738 * @const
2739 * @see https://developer.chrome.com/extensions/i18n.html
2741 chrome.i18n = {};
2745 * @param {function(Array.<string>): void} callback The callback function which
2746 * accepts an array of the accept languages of the browser, such as
2747 * 'en-US','en','zh-CN'.
2749 chrome.i18n.getAcceptLanguages = function(callback) {};
2753 * @param {string} messageName
2754 * @param {(string|Array.<string>)=} opt_args
2755 * @return {string}
2757 chrome.i18n.getMessage = function(messageName, opt_args) {};
2761 * @return {string}
2763 chrome.i18n.getUILanguage = function() {};
2767 * @const
2768 * @see https://developer.chrome.com/extensions/pageAction.html
2770 chrome.pageAction = {};
2774 * @param {number} tabId Tab Id.
2776 chrome.pageAction.hide = function(tabId) {};
2780 * @param {Object} details An object which has 'tabId' and either
2781 * 'imageData' or 'path'.
2783 chrome.pageAction.setIcon = function(details) {};
2787 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2789 chrome.pageAction.setPopup = function(details) {};
2793 * @param {Object} details An object which has 'tabId' and 'title'.
2795 chrome.pageAction.setTitle = function(details) {};
2799 * @param {number} tabId Tab Id.
2801 chrome.pageAction.show = function(tabId) {};
2804 /** @type {!ChromeEvent} */
2805 chrome.pageAction.onClicked;
2809 * @const
2811 chrome.browser = {};
2815 * @param {{url: string}} details An object with a single 'url' key.
2816 * @param {function(): void} callback The callback function. If an error occurs
2817 * opening the URL, chrome.runtime.lastError will be set to the error message.
2819 chrome.browser.openTab = function(details, callback) {};
2823 * @const
2824 * @see https://developer.chrome.com/extensions/browserAction.html
2826 chrome.browserAction = {};
2830 * @typedef {?{
2831 * tabId: (number|undefined)
2832 * }}
2834 chrome.browserAction.Tab;
2838 * @typedef {Array<number>}
2839 * @see https://developer.chrome.com/extensions/browserAction#type-ColorArray
2841 chrome.browserAction.ColorArray;
2845 * @typedef {{
2846 * imageData: (!ImageData|!Object.<number, !ImageData>|undefined),
2847 * path: (string|!Object.<number, string>|undefined),
2848 * tabId: (number|undefined)
2849 * }}
2851 chrome.browserAction.SetIconImageData;
2855 * @param {{
2856 * title: string,
2857 * tabId: (number|undefined)
2858 * }} details
2859 * @see https://developer.chrome.com/extensions/browserAction#method-setTitle
2861 chrome.browserAction.setTitle = function(details) {};
2865 * @param {!chrome.browserAction.Tab} details
2866 * @param {function(string): void} callback
2867 * @see https://developer.chrome.com/extensions/browserAction#method-getTitle
2869 chrome.browserAction.getTitle = function(details, callback) {};
2873 * @param {!chrome.browserAction.SetIconImageData} details
2874 * @param {function(): void=} opt_callback
2875 * @see https://developer.chrome.com/extensions/browserAction#method-setIcon
2877 chrome.browserAction.setIcon = function(details, opt_callback) {};
2881 * @param {{
2882 * tabId: (number|undefined),
2883 * popup: string
2884 * }} details
2885 * @see https://developer.chrome.com/extensions/browserAction#method-setPopup
2887 chrome.browserAction.setPopup = function(details) {};
2891 * @param {!chrome.browserAction.Tab} details
2892 * @param {function(string): void} callback
2893 * @see https://developer.chrome.com/extensions/browserAction#method-getPopup
2895 chrome.browserAction.getPopup = function(details, callback) {};
2899 * @param {{
2900 * text: string,
2901 * tabId: (number|undefined)
2902 * }} details
2903 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeText
2905 chrome.browserAction.setBadgeText = function(details) {};
2909 * @param {!chrome.browserAction.Tab} details
2910 * @param {function(string): void} callback
2911 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeText
2913 chrome.browserAction.getBadgeText = function(details, callback) {};
2917 * @param {{
2918 * color: (string|chrome.browserAction.ColorArray),
2919 * tabId: (number|undefined)
2920 * }} details
2921 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeBackgroundColor
2923 chrome.browserAction.setBadgeBackgroundColor = function(details) {};
2927 * @param {!chrome.browserAction.Tab} details
2928 * @param {function(chrome.browserAction.ColorArray): void} callback
2929 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeBackgroundColor
2931 chrome.browserAction.getBadgeBackgroundColor = function(details, callback) {};
2935 * @param {number=} opt_tabId
2936 * @see https://developer.chrome.com/extensions/browserAction#method-enable
2938 chrome.browserAction.enable = function(opt_tabId) {};
2942 * @param {number=} opt_tabId
2943 * @see https://developer.chrome.com/extensions/browserAction#method-disable
2945 chrome.browserAction.disable = function(opt_tabId) {};
2949 * @constructor
2951 chrome.browserAction.BrowserActionTabEvent = function() {};
2955 * @param {function(!Tab): void} callback
2957 chrome.browserAction.BrowserActionTabEvent.prototype.addListener =
2958 function(callback) {};
2962 * @param {function(!Tab): void} callback
2964 chrome.browserAction.BrowserActionTabEvent.prototype.removeListener =
2965 function(callback) {};
2969 * @param {function(!Tab): void} callback
2970 * @return {boolean}
2972 chrome.browserAction.BrowserActionTabEvent.prototype.hasListener =
2973 function(callback) {};
2976 /** @return {boolean} */
2977 chrome.browserAction.BrowserActionTabEvent.prototype.hasListeners =
2978 function() {};
2982 * @type {!chrome.browserAction.BrowserActionTabEvent}
2983 * @see https://developer.chrome.com/extensions/browserAction#event-onClicked
2985 chrome.browserAction.onClicked;
2989 * @const
2990 * @see https://developer.chrome.com/extensions/bookmarks.html
2992 chrome.bookmarks = {};
2996 * @typedef {?{
2997 * parentId: (string|undefined),
2998 * index: (number|undefined),
2999 * url: (string|undefined),
3000 * title: (string|undefined)
3001 * }}
3002 * @see https://developer.chrome.com/extensions/bookmarks#method-create
3004 chrome.bookmarks.CreateDetails;
3008 * @typedef {?{
3009 * query: (string|undefined),
3010 * url: (string|undefined),
3011 * title: (string|undefined)
3012 * }}
3013 * @see https://developer.chrome.com/extensions/bookmarks#method-search
3015 chrome.bookmarks.SearchDetails;
3019 * @param {(string|Array.<string>)} idOrIdList
3020 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3021 * callback function which accepts an array of BookmarkTreeNode.
3022 * @return {Array.<BookmarkTreeNode>}
3024 chrome.bookmarks.get = function(idOrIdList, callback) {};
3028 * @param {string} id
3029 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3030 * callback function which accepts an array of BookmarkTreeNode.
3031 * @return {Array.<BookmarkTreeNode>}
3033 chrome.bookmarks.getChildren = function(id, callback) {};
3037 * @param {number} numberOfItems The number of items to return.
3038 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3039 * callback function which accepts an array of BookmarkTreeNode.
3040 * @return {Array.<BookmarkTreeNode>}
3042 chrome.bookmarks.getRecent = function(numberOfItems, callback) {};
3046 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3047 * callback function which accepts an array of BookmarkTreeNode.
3048 * @return {Array.<BookmarkTreeNode>}
3050 chrome.bookmarks.getTree = function(callback) {};
3054 * @param {string} id The ID of the root of the subtree to retrieve.
3055 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3056 * callback function which accepts an array of BookmarkTreeNode.
3057 * @return {Array.<BookmarkTreeNode>}
3059 chrome.bookmarks.getSubTree = function(id, callback) {};
3063 * @param {string|!chrome.bookmarks.SearchDetails} query
3064 * @param {function(Array.<BookmarkTreeNode>): void} callback
3065 * @return {Array.<BookmarkTreeNode>}
3067 chrome.bookmarks.search = function(query, callback) {};
3071 * @param {chrome.bookmarks.CreateDetails} bookmark
3072 * @param {function(BookmarkTreeNode): void=} opt_callback The
3073 * callback function which accepts a BookmarkTreeNode object.
3075 chrome.bookmarks.create = function(bookmark, opt_callback) {};
3079 * @param {string} id
3080 * @param {Object} destination An object which has optional 'parentId' and
3081 * optional 'index'.
3082 * @param {function(BookmarkTreeNode): void=} opt_callback
3083 * The callback function which accepts a BookmarkTreeNode object.
3085 chrome.bookmarks.move = function(id, destination, opt_callback) {};
3089 * @param {string} id
3090 * @param {Object} changes An object which may have 'title' as a key.
3091 * @param {function(BookmarkTreeNode): void=} opt_callback The
3092 * callback function which accepts a BookmarkTreeNode object.
3094 chrome.bookmarks.update = function(id, changes, opt_callback) {};
3098 * @param {string} id
3099 * @param {function(): void=} opt_callback
3101 chrome.bookmarks.remove = function(id, opt_callback) {};
3105 * @param {string} id
3106 * @param {function(): void=} opt_callback
3108 chrome.bookmarks.removeTree = function(id, opt_callback) {};
3112 * @param {function(): void=} opt_callback
3114 chrome.bookmarks.import = function(opt_callback) {};
3118 * @param {function(): void=} opt_callback
3120 chrome.bookmarks.export = function(opt_callback) {};
3123 /** @type {!ChromeEvent} */
3124 chrome.bookmarks.onChanged;
3127 /** @type {!ChromeEvent} */
3128 chrome.bookmarks.onChildrenReordered;
3131 /** @type {!ChromeEvent} */
3132 chrome.bookmarks.onCreated;
3135 /** @type {!ChromeEvent} */
3136 chrome.bookmarks.onImportBegan;
3139 /** @type {!ChromeEvent} */
3140 chrome.bookmarks.onImportEnded;
3143 /** @type {!ChromeEvent} */
3144 chrome.bookmarks.onMoved;
3147 /** @type {!ChromeEvent} */
3148 chrome.bookmarks.onRemoved;
3152 * @typedef {?{
3153 * content: string,
3154 * description: string
3155 * }}
3157 var SuggestResult;
3161 * @const
3162 * @see https://developer.chrome.com/extensions/omnibox.html
3164 chrome.omnibox = {};
3168 /** @constructor */
3169 chrome.omnibox.InputChangedEvent = function() {};
3173 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3175 chrome.omnibox.InputChangedEvent.prototype.addListener = function(callback) {};
3179 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3181 chrome.omnibox.InputChangedEvent.prototype.removeListener =
3182 function(callback) {};
3186 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3187 * @return {boolean}
3189 chrome.omnibox.InputChangedEvent.prototype.hasListener = function(callback) {};
3192 /** @return {boolean} */
3193 chrome.omnibox.InputChangedEvent.prototype.hasListeners = function() {};
3197 /** @constructor */
3198 chrome.omnibox.InputEnteredEvent = function() {};
3201 /** @param {function(string, string): void} callback */
3202 chrome.omnibox.InputEnteredEvent.prototype.addListener = function(callback) {};
3205 /** @param {function(string, string): void} callback */
3206 chrome.omnibox.InputEnteredEvent.prototype.removeListener =
3207 function(callback) {};
3211 * @param {function(string, string): void} callback
3212 * @return {boolean}
3214 chrome.omnibox.InputEnteredEvent.prototype.hasListener = function(callback) {};
3217 /** @return {boolean} */
3218 chrome.omnibox.InputEnteredEvent.prototype.hasListeners = function() {};
3222 * @param {{description: string}} suggestion A partial SuggestResult object.
3224 chrome.omnibox.setDefaultSuggestion = function(suggestion) {};
3227 /** @type {!ChromeEvent} */
3228 chrome.omnibox.onInputCancelled;
3231 /** @type {!chrome.omnibox.InputChangedEvent} */
3232 chrome.omnibox.onInputChanged;
3235 /** @type {!chrome.omnibox.InputEnteredEvent} */
3236 chrome.omnibox.onInputEntered;
3239 /** @type {!ChromeEvent} */
3240 chrome.omnibox.onInputStarted;
3244 * @const
3245 * @see https://developer.chrome.com/extensions/dev/contextMenus.html
3247 chrome.contextMenus = {};
3251 * @typedef {?{
3252 * type: (string|undefined),
3253 * id: (string|undefined),
3254 * title: (string|undefined),
3255 * checked: (boolean|undefined),
3256 * contexts: (!Array.<string>|undefined),
3257 * onclick: (function(!Object, !Tab)|undefined),
3258 * parentId: (number|string|undefined),
3259 * documentUrlPatterns: (!Array.<string>|undefined),
3260 * targetUrlPatterns: (!Array.<string>|undefined),
3261 * enabled: (boolean|undefined)
3262 * }}
3263 * @see https://developer.chrome.com/extensions/contextMenus#method-create
3265 chrome.contextMenus.CreateProperties;
3269 * @typedef {?{
3270 * type: (string|undefined),
3271 * title: (string|undefined),
3272 * checked: (boolean|undefined),
3273 * contexts: (!Array.<string>|undefined),
3274 * onclick: (function(!Object, !Tab)|undefined),
3275 * parentId: (number|string|undefined),
3276 * documentUrlPatterns: (!Array.<string>|undefined),
3277 * targetUrlPatterns: (!Array.<string>|undefined),
3278 * enabled: (boolean|undefined)
3279 * }}
3280 * @see https://developer.chrome.com/extensions/contextMenus#method-update
3282 chrome.contextMenus.UpdateProperties;
3286 * @param {!chrome.contextMenus.CreateProperties} createProperties
3287 * @param {function()=} opt_callback
3288 * @return {(number|string)} The id of the newly created window.
3289 * @see https://developer.chrome.com/extensions/contextMenus#method-create
3291 chrome.contextMenus.create = function(createProperties, opt_callback) {};
3295 * @param {(number|string)} id
3296 * @param {!chrome.contextMenus.UpdateProperties} updateProperties
3297 * @param {function()=} opt_callback
3298 * @see https://developer.chrome.com/extensions/contextMenus#method-update
3300 chrome.contextMenus.update = function(id, updateProperties, opt_callback) {};
3304 * @param {(number|string)} menuItemId
3305 * @param {function()=} opt_callback
3306 * @see https://developer.chrome.com/extensions/contextMenus#method-remove
3308 chrome.contextMenus.remove = function(menuItemId, opt_callback) {};
3312 * @param {function()=} opt_callback
3313 * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
3315 chrome.contextMenus.removeAll = function(opt_callback) {};
3319 * @interface
3320 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3322 chrome.contextMenus.ClickedEvent = function() {};
3326 * @param {function(!Object, !Tab=)} callback
3328 chrome.contextMenus.ClickedEvent.prototype.addListener = function(callback) {};
3332 * @param {function(!Object, !Tab=)} callback
3334 chrome.contextMenus.ClickedEvent.prototype.removeListener =
3335 function(callback) {};
3339 * @param {function(!Object, !Tab=)} callback
3340 * @return {boolean}
3342 chrome.contextMenus.ClickedEvent.prototype.hasListener = function(callback) {};
3346 * @return {boolean}
3348 chrome.contextMenus.ClickedEvent.prototype.hasListeners = function() {};
3352 * @type {!chrome.contextMenus.ClickedEvent}
3353 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3355 chrome.contextMenus.onClicked;
3359 * @const
3360 * @see https://developer.chrome.com/extensions/dev/cookies.html
3362 chrome.cookies = {};
3366 * This typedef is used for the parameters to chrome.cookies.get,
3367 * chrome.cookies.remove, and for the parameter to remove's callback. These uses
3368 * all identify a single cookie uniquely without specifying its content, and the
3369 * objects are identical except for the the storeId being optional vs required.
3370 * If greater divergence occurs, then going to two typedefs is recommended.
3372 * @typedef {?{
3373 * url: string,
3374 * name: string,
3375 * storeId: (string|undefined)
3376 * }}
3378 chrome.cookies.CookieIdentifier;
3382 * @param {!chrome.cookies.CookieIdentifier} details
3383 * @param {function(Cookie=): void} callback
3385 chrome.cookies.get = function(details, callback) {};
3389 * @param {Object} details
3390 * @param {function(Array.<Cookie>): void} callback
3392 chrome.cookies.getAll = function(details, callback) {};
3396 * @param {function(Array.<CookieStore>): void} callback
3398 chrome.cookies.getAllCookieStores = function(callback) {};
3402 * @param {!chrome.cookies.CookieIdentifier} details
3403 * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
3404 * removal failed for any reason, the parameter will be "null", and
3405 * "chrome.runtime.lastError" will be set.
3407 chrome.cookies.remove = function(details, opt_callback) {};
3411 * @typedef {?{
3412 * url: string,
3413 * name: (string|undefined),
3414 * value: (string|undefined),
3415 * domain: (string|undefined),
3416 * path: (string|undefined),
3417 * secure: (boolean|undefined),
3418 * httpOnly: (boolean|undefined),
3419 * expirationDate: (number|undefined),
3420 * storeId: (string|undefined)
3421 * }}
3423 chrome.cookies.CookieSetDetails;
3427 * @param {!chrome.cookies.CookieSetDetails} details
3428 * @param {function(Cookie): void=} opt_callback If setting failed for any
3429 * reason, the parameter will be "null", and "chrome.runtime.lastError" will
3430 * be set.
3432 chrome.cookies.set = function(details, opt_callback) {};
3436 * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
3437 * @type {!ChromeEvent}
3439 chrome.cookies.onChanged;
3443 /** @constructor */
3444 function CookieChangeInfo() {}
3447 /** @type {boolean} */
3448 CookieChangeInfo.prototype.removed;
3451 /** @type {Cookie} */
3452 CookieChangeInfo.prototype.cookie;
3455 /** @type {string} */
3456 CookieChangeInfo.prototype.cause;
3459 /** @const */
3460 chrome.management = {};
3464 * @typedef {?{
3465 * showConfirmDialog: (boolean|undefined)
3466 * }}
3468 chrome.management.InstallOptions;
3472 * @param {string} id
3473 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3474 * function.
3476 chrome.management.get = function(id, opt_callback) {};
3480 * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
3481 * callback function.
3482 * @return {!Array.<!ExtensionInfo>}
3484 chrome.management.getAll = function(opt_callback) {};
3488 * @param {string} id The id of an already installed extension.
3489 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3491 chrome.management.getPermissionWarningsById = function(id, opt_callback) {};
3495 * @param {string} manifestStr Extension's manifest JSON string.
3496 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3498 chrome.management.getPermissionWarningsByManifest =
3499 function(manifestStr, opt_callback) {};
3503 * @param {string} id The id of an already installed extension.
3504 * @param {function(): void=} opt_callback Optional callback function.
3506 chrome.management.launchApp = function(id, opt_callback) {};
3510 * @param {string} id The id of an already installed extension.
3511 * @param {boolean} enabled Whether this item should be enabled.
3512 * @param {function(): void=} opt_callback Optional callback function.
3514 chrome.management.setEnabled = function(id, enabled, opt_callback) {};
3518 * @param {string} id The id of an already installed extension.
3519 * @param {(!chrome.management.InstallOptions|function(): void)=}
3520 * opt_optionsOrCallback An optional uninstall options object or an optional
3521 * callback function.
3522 * @param {function(): void=} opt_callback Optional callback function.
3524 chrome.management.uninstall =
3525 function(id, opt_optionsOrCallback, opt_callback) {};
3529 * @param {(!chrome.management.InstallOptions|function(): void)=}
3530 * opt_optionsOrCallback An optional uninstall options object or an optional
3531 * callback function.
3532 * @param {function(): void=} opt_callback An optional callback function.
3534 chrome.management.uninstallSelf =
3535 function(opt_optionsOrCallback, opt_callback) {};
3539 * @param {string} id The id of an already installed extension.
3540 * @param {function(): void=} opt_callback Optional callback function.
3542 chrome.management.createAppShortcut = function(id, opt_callback) {};
3546 * @param {string} id The id of an already installed extension.
3547 * @param {string} launchType The LaunchType enum value to set. Make sure this
3548 * value is in ExtensionInfo.availableLaunchTypes because the available
3549 * launch types vary on different platforms and configurations.
3550 * @param {function(): void=} opt_callback Optional callback function.
3552 chrome.management.setLaunchType = function(id, launchType, opt_callback) {};
3556 * @param {string} url The URL of a web page. The scheme of the URL can only be
3557 * "http" or "https".
3558 * @param {string} title The title of the generated app.
3559 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3560 * function.
3562 chrome.management.generateAppForLink = function(url, title, opt_callback) {};
3565 /** @type {!ChromeExtensionInfoEvent} */
3566 chrome.management.onDisabled;
3569 /** @type {!ChromeExtensionInfoEvent} */
3570 chrome.management.onEnabled;
3573 /** @type {!ChromeExtensionInfoEvent} */
3574 chrome.management.onInstalled;
3577 /** @type {!ChromeStringEvent} */
3578 chrome.management.onUninstalled;
3582 * @const
3583 * @see https://developer.chrome.com/extensions/idle.html
3585 chrome.idle = {};
3589 * @param {number} thresholdSeconds Threshold in seconds, used to determine
3590 * when a machine is in the idle state.
3591 * @param {function(string): void} callback Callback to handle the state.
3593 chrome.idle.queryState = function(thresholdSeconds, callback) {};
3597 * @param {number} intervalInSeconds Threshold, in seconds, used to determine
3598 * when the system is in an idle state.
3600 chrome.idle.setDetectionInterval = function(intervalInSeconds) {};
3603 /** @type {!ChromeEvent} */
3604 chrome.idle.onStateChanged;
3608 * Chrome Text-to-Speech API.
3609 * @const
3610 * @see https://developer.chrome.com/extensions/tts.html
3612 chrome.tts = {};
3617 * An event from the TTS engine to communicate the status of an utterance.
3618 * @constructor
3620 function TtsEvent() {}
3623 /** @type {string} */
3624 TtsEvent.prototype.type;
3627 /** @type {number} */
3628 TtsEvent.prototype.charIndex;
3631 /** @type {string} */
3632 TtsEvent.prototype.errorMessage;
3637 * A description of a voice available for speech synthesis.
3638 * @constructor
3640 function TtsVoice() {}
3643 /** @type {string} */
3644 TtsVoice.prototype.voiceName;
3647 /** @type {string} */
3648 TtsVoice.prototype.lang;
3651 /** @type {string} */
3652 TtsVoice.prototype.gender;
3655 /** @type {string} */
3656 TtsVoice.prototype.extensionId;
3659 /** @type {Array.<string>} */
3660 TtsVoice.prototype.eventTypes;
3664 * Gets an array of all available voices.
3665 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
3666 * function.
3668 chrome.tts.getVoices = function(opt_callback) {};
3672 * Checks if the engine is currently speaking.
3673 * @param {function(boolean)=} opt_callback The callback function.
3675 chrome.tts.isSpeaking = function(opt_callback) {};
3679 * Speaks text using a text-to-speech engine.
3680 * @param {string} utterance The text to speak, either plain text or a complete,
3681 * well-formed SSML document. Speech engines that do not support SSML will
3682 * strip away the tags and speak the text. The maximum length of the text is
3683 * 32,768 characters.
3684 * @param {Object=} opt_options The speech options.
3685 * @param {function()=} opt_callback Called right away, before speech finishes.
3687 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
3691 * Stops any current speech.
3693 chrome.tts.stop = function() {};
3697 * @const
3698 * @see https://developer.chrome.com/extensions/ttsEngine.html
3700 chrome.ttsEngine = {};
3703 /** @type {!ChromeEvent} */
3704 chrome.ttsEngine.onSpeak;
3707 /** @type {!ChromeEvent} */
3708 chrome.ttsEngine.onStop;
3712 * @const
3713 * @see https://developer.chrome.com/extensions/contentSettings.html
3715 chrome.contentSettings = {};
3718 /** @type {!ContentSetting} */
3719 chrome.contentSettings.cookies;
3722 /** @type {!ContentSetting} */
3723 chrome.contentSettings.images;
3726 /** @type {!ContentSetting} */
3727 chrome.contentSettings.javascript;
3730 /** @type {!ContentSetting} */
3731 chrome.contentSettings.plugins;
3734 /** @type {!ContentSetting} */
3735 chrome.contentSettings.popups;
3738 /** @type {!ContentSetting} */
3739 chrome.contentSettings.notifications;
3743 * @const
3744 * @see https://developer.chrome.com/extensions/fileBrowserHandler
3746 chrome.fileBrowserHandler = {};
3750 * @typedef {?{
3751 * suggestedName: string,
3752 * allowedFileExtensions: (!Array.<string>|undefined)
3753 * }}
3755 chrome.fileBrowserHandler.SelectFileSelectionParams;
3759 * Prompts user to select file path under which file should be saved.
3760 * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3761 * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3762 * Parameters that will be used while selecting the file.
3763 * @param {function(!Object)} callback Function called upon completion.
3765 chrome.fileBrowserHandler.selectFile = function(selectionParams, callback) {};
3769 * @interface
3770 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3772 chrome.fileBrowserHandler.ExecuteEvent = function() {};
3776 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3778 chrome.fileBrowserHandler.ExecuteEvent.prototype.addListener = function(
3779 callback) {};
3783 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3785 chrome.fileBrowserHandler.ExecuteEvent.prototype.removeListener = function(
3786 callback) {};
3790 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3791 * @return {boolean}
3793 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListener = function(
3794 callback) {};
3798 * @return {boolean}
3800 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListeners = function() {};
3804 * Fired when file system action is executed from ChromeOS file browser.
3805 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3806 * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3808 chrome.fileBrowserHandler.onExecute;
3812 * @const
3813 * @see https://developer.chrome.com/extensions/gcm
3815 chrome.gcm = {};
3819 * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3820 * @type {number}
3822 chrome.gcm.MAX_MESSAGE_SIZE;
3826 * Registers the application with GCM. The registration ID will be returned by
3827 * the callback. If register is called again with the same list of senderIds,
3828 * the same registration ID will be returned.
3829 * @see https://developer.chrome.com/extensions/gcm#method-register
3830 * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
3831 * send messages to the application.
3832 * @param {function(string): void} callback Function called when
3833 * registration completes with registration ID as argument.
3835 chrome.gcm.register = function(senderIds, callback) {};
3839 * Unregisters the application from GCM.
3840 * @see https://developer.chrome.com/extensions/gcm#method-unregister
3841 * @param {function(): void} callback Called when unregistration is done.
3843 chrome.gcm.unregister = function(callback) {};
3847 * Sends an upstream message using GCM.
3848 * @see https://developer.chrome.com/extensions/gcm#method-send
3849 * @param {!chrome.gcm.Message} message Message to be sent.
3850 * @param {function(string): void} callback Called with message ID.
3852 chrome.gcm.send = function(message, callback) {};
3856 * Outgoing message.
3857 * @typedef {?{
3858 * destinationId: string,
3859 * messageId: string,
3860 * timeToLive: (number|undefined),
3861 * data: !Object.<string, string>
3862 * }}
3864 chrome.gcm.Message;
3868 * An event, fired when a message is received through GCM.
3869 * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3870 * @type {!chrome.gcm.OnMessageEvent}
3872 chrome.gcm.onMessage;
3876 * An event, fired when GCM server had to delete messages to the application
3877 * from its queue in order to manage its size.
3878 * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3879 * @type {!ChromeEvent}
3881 chrome.gcm.onMessagesDeleted;
3885 * An event indicating problems with sending messages.
3886 * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3887 * @type {!chrome.gcm.OnSendErrorEvent}
3889 chrome.gcm.onSendError;
3894 * @constructor
3896 chrome.gcm.OnMessageEvent = function() {};
3900 * @param {function(!Object): void} callback Callback.
3902 chrome.gcm.OnMessageEvent.prototype.addListener = function(callback) {};
3906 * @param {function(!Object): void} callback Callback.
3908 chrome.gcm.OnMessageEvent.prototype.removeListener = function(callback) {};
3912 * @param {function(!Object): void} callback Callback.
3913 * @return {boolean}
3915 chrome.gcm.OnMessageEvent.prototype.hasListener = function(callback) {};
3919 * @return {boolean}
3921 chrome.gcm.OnMessageEvent.prototype.hasListeners = function() {};
3926 * @constructor
3928 chrome.gcm.OnSendErrorEvent = function() {};
3932 * @param {function(!Object): void} callback Callback.
3934 chrome.gcm.OnSendErrorEvent.prototype.addListener = function(callback) {};
3938 * @param {function(!Object): void} callback Callback.
3940 chrome.gcm.OnSendErrorEvent.prototype.removeListener = function(callback) {};
3944 * @param {function(!Object): void} callback Callback.
3945 * @return {boolean}
3947 chrome.gcm.OnSendErrorEvent.prototype.hasListener = function(callback) {};
3951 * @return {boolean}
3953 chrome.gcm.OnSendErrorEvent.prototype.hasListeners = function() {};
3957 * @const
3958 * @see https://developer.chrome.com/extensions/history.html
3960 chrome.history = {};
3964 * @param {Object.<string, string>} details Object with a 'url' key.
3966 chrome.history.addUrl = function(details) {};
3970 * @param {function(): void} callback Callback function.
3972 chrome.history.deleteAll = function(callback) {};
3976 * @param {Object.<string, string>} range Object with 'startTime'
3977 * and 'endTime' keys.
3978 * @param {function(): void} callback Callback function.
3980 chrome.history.deleteRange = function(range, callback) {};
3984 * @param {Object.<string, string>} details Object with a 'url' key.
3986 chrome.history.deleteUrl = function(details) {};
3990 * @param {Object.<string, string>} details Object with a 'url' key.
3991 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
3992 * @return {!Array.<!VisitItem>}
3994 chrome.history.getVisits = function(details, callback) {};
3998 * @param {Object.<string, string>} query Object with a 'text' (string)
3999 * key and optional 'startTime' (number), 'endTime' (number) and
4000 * 'maxResults' keys.
4001 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
4002 * @return {!Array.<!HistoryItem>}
4004 chrome.history.search = function(query, callback) {};
4007 /** @type {!ChromeEvent} */
4008 chrome.history.onVisitRemoved;
4011 /** @type {!ChromeEvent} */
4012 chrome.history.onVisited;
4016 * @const
4017 * @see http://developer.chrome.com/apps/identity.html
4018 * TODO: replace TokenDetails, InvalidTokenDetails and
4019 * WebAuthFlowDetails with Object.
4021 chrome.identity = {};
4025 * @param {(chrome.identity.TokenDetails|function(string=): void)}
4026 * detailsOrCallback Token options or a callback function if no options are
4027 * specified.
4028 * @param {function(string=): void=} opt_callback A callback function if options
4029 * are specified.
4031 chrome.identity.getAuthToken = function(detailsOrCallback, opt_callback) {};
4034 /** @typedef {{interactive: (boolean|undefined)}} */
4035 chrome.identity.TokenDetails;
4039 * @param {chrome.identity.InvalidTokenDetails} details
4040 * @param {function(): void} callback
4042 chrome.identity.removeCachedAuthToken = function(details, callback) {};
4045 /** @typedef {{token: string}} */
4046 chrome.identity.InvalidTokenDetails;
4050 * @param {chrome.identity.WebAuthFlowDetails} details
4051 * @param {function(string=): void} callback
4053 chrome.identity.launchWebAuthFlow = function(details, callback) {};
4056 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
4057 chrome.identity.WebAuthFlowDetails;
4060 /** @param {!function(!Object=):void} callback */
4061 chrome.identity.getProfileUserInfo = function(callback) {};
4064 /** @type {!ChromeEvent} */
4065 chrome.identity.onSignInChanged;
4069 * @const
4070 * @see https://developer.chrome.com/extensions/input.ime.html
4072 chrome.input = {};
4075 /** @const */
4076 chrome.input.ime = {};
4081 * The OnKeyEvent event takes an extra argument.
4082 * @constructor
4084 function ChromeInputImeOnKeyEventEvent() {}
4088 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4089 * callback.
4090 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
4092 ChromeInputImeOnKeyEventEvent.prototype.addListener =
4093 function(callback, opt_extraInfoSpec) {};
4097 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4098 * callback.
4100 ChromeInputImeOnKeyEventEvent.prototype.removeListener = function(callback) {};
4104 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4105 * callback.
4107 ChromeInputImeOnKeyEventEvent.prototype.hasListener = function(callback) {};
4111 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4112 * callback.
4114 ChromeInputImeOnKeyEventEvent.prototype.hasListeners = function(callback) {};
4118 * @param {!Object.<string,number>} parameters An object with a
4119 * 'contextID' (number) key.
4120 * @param {function(boolean): void} callback Callback function.
4122 chrome.input.ime.clearComposition = function(parameters, callback) {};
4126 * @param {!Object.<string,(string|number)>} parameters An object with
4127 * 'contextID' (number) and 'text' (string) keys.
4128 * @param {function(boolean): void=} opt_callback Callback function.
4130 chrome.input.ime.commitText = function(parameters, opt_callback) {};
4134 * @param {!Object.<string,(string|number)>} parameters An object with
4135 * 'contextID' (number) and 'text' (string) keys.
4136 * @param {function(boolean): void=} opt_callback Callback function.
4138 chrome.input.ime.deleteSurroundingText = function(parameters, opt_callback) {};
4142 * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
4143 * parameters An object with 'engineID' (string) and 'properties'
4144 * (Object) keys.
4145 * @param {function(boolean): void=} opt_callback Callback function.
4147 chrome.input.ime.setCandidateWindowProperties =
4148 function(parameters, opt_callback) {};
4152 * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
4153 * parameters An object with 'contextID' (number) and 'candidates'
4154 * (array of object) keys.
4155 * @param {function(boolean): void=} opt_callback Callback function.
4157 chrome.input.ime.setCandidates = function(parameters, opt_callback) {};
4161 * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
4162 * parameters An object with 'contextID' (number), 'text' (string),
4163 * 'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
4164 * and 'segments' (array of object) keys.
4165 * @param {function(boolean): void=} opt_callback Callback function.
4167 chrome.input.ime.setComposition = function(parameters, opt_callback) {};
4171 * @param {!Object.<string,number>} parameters An object with
4172 * 'contextID' (number) and 'candidateID' (number) keys.
4173 * @param {function(boolean): void=} opt_callback Callback function.
4175 chrome.input.ime.setCursorPosition = function(parameters, opt_callback) {};
4179 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4180 * parameters An object with 'engineID' (string) and 'items'
4181 * (array of object) keys.
4182 * @param {function(): void=} opt_callback Callback function.
4184 chrome.input.ime.setMenuItems = function(parameters, opt_callback) {};
4188 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4189 * parameters An object with 'engineID' (string) and 'items'
4190 * (array of object) keys.
4191 * @param {function(): void=} opt_callback Callback function.
4193 chrome.input.ime.updateMenuItems = function(parameters, opt_callback) {};
4197 * @param {string} requestId Request id of the event that was handled. This
4198 * should come from keyEvent.requestId.
4199 * @param {boolean} response True if the keystroke was handled, false if not.
4201 chrome.input.ime.keyEventHandled = function(requestId, response) {};
4204 /** @type {!ChromeEvent} */
4205 chrome.input.ime.onActivate;
4208 /** @type {!ChromeEvent} */
4209 chrome.input.ime.onBlur;
4212 /** @type {!ChromeEvent} */
4213 chrome.input.ime.onCandidateClicked;
4216 /** @type {!ChromeEvent} */
4217 chrome.input.ime.onDeactivated;
4220 /** @type {!ChromeEvent} */
4221 chrome.input.ime.onFocus;
4224 /** @type {!ChromeEvent} */
4225 chrome.input.ime.onInputContextUpdate;
4228 /** @type {!ChromeInputImeOnKeyEventEvent} */
4229 chrome.input.ime.onKeyEvent;
4232 /** @type {!ChromeEvent} */
4233 chrome.input.ime.onMenuItemActivated;
4236 /** @type {!ChromeEvent} */
4237 chrome.input.ime.onReset;
4240 /** @type {!ChromeEvent} */
4241 chrome.input.ime.onSurroundingTextChanged;
4245 * namespace
4246 * @see http://developer.chrome.com/apps/mediaGalleries
4247 * @const
4249 chrome.mediaGalleries = {};
4253 * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
4254 * detailsOrCallback A details object for whether the request should be
4255 * interactive if permissions haven't been granted yet or the callback.
4256 * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
4257 * no details were supplied as arg1.
4259 chrome.mediaGalleries.getMediaFileSystems = function(
4260 detailsOrCallback, opt_callback) {};
4264 * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
4266 chrome.mediaGalleries.addUserSelectedFolder = function(callback) {};
4270 * @param {string} galleryId ID of the media gallery.
4271 * @param {function()=} opt_callback Optional callback function.
4273 chrome.mediaGalleries.dropPermissionForMediaFileSystem =
4274 function(galleryId, opt_callback) {};
4277 chrome.mediaGalleries.startMediaScan = function() {};
4280 chrome.mediaGalleries.cancelMediaScan = function() {};
4284 * @param {function(!Array.<!FileSystem>)} callback Callback function.
4286 chrome.mediaGalleries.addScanResults = function(callback) {};
4290 * @typedef {{
4291 * name: string,
4292 * galleryId: string,
4293 * deviceId: (string|undefined),
4294 * isRemovable: boolean,
4295 * isMediaDevice: boolean,
4296 * isAvailable: boolean
4297 * }}
4299 chrome.mediaGalleries.MediaFileSystemMetadata;
4303 * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
4304 * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
4306 chrome.mediaGalleries.getMediaFileSystemMetadata = function(mediaFileSystem) {};
4310 * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
4311 * callback Callback function.
4313 chrome.mediaGalleries.getAllMediaFileSystemMetadata = function(callback) {};
4317 * @typedef {{
4318 * mimeType: string,
4319 * height: (number|undefined),
4320 * width: (number|undefined),
4321 * xResolution: (number|undefined),
4322 * yResolution: (number|undefined),
4323 * duration: (number|undefined),
4324 * rotation: (number|undefined),
4325 * cameraMake: (string|undefined),
4326 * cameraModel: (string|undefined),
4327 * exposureTimeSeconds: (number|undefined),
4328 * flashFired: (boolean|undefined),
4329 * fNumber: (number|undefined),
4330 * focalLengthMm: (number|undefined),
4331 * isoEquivalent: (number|undefined),
4332 * album: (string|undefined),
4333 * artist: (string|undefined),
4334 * comment: (string|undefined),
4335 * copyright: (string|undefined),
4336 * disc: (number|undefined),
4337 * genre: (string|undefined),
4338 * language: (string|undefined),
4339 * title: (string|undefined),
4340 * track: (number|undefined),
4341 * rawTags: !Array.<!chrome.mediaGalleries.metadata.RawTag>,
4342 * attachedImages: !Array.<!Blob>
4343 * }}
4345 chrome.mediaGalleries.MetaData;
4348 /** @const */
4349 chrome.mediaGalleries.metadata = {};
4352 /** @constructor */
4353 chrome.mediaGalleries.metadata.RawTag = function() {};
4356 /** @type {string} */
4357 chrome.mediaGalleries.metadata.RawTag.prototype.type;
4360 /** @type {!Object.<string, string>} */
4361 chrome.mediaGalleries.metadata.RawTag.prototype.tags;
4365 * @param {!Blob} mediaFile The media file for which to get metadata.
4366 * @param {{metadataType: (string|undefined)}|
4367 * function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
4368 * for the metadata to retrieve or the callback to invoke with the metadata.
4369 * The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
4370 * 'all' if the metadataType is omitted.
4371 * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
4372 * were passed as arg2, the callback to invoke with the metadata.
4374 chrome.mediaGalleries.getMetadata = function(
4375 mediaFile, optionsOrCallback, opt_callback) {};
4379 * @typedef {function({galleryId: string, success: boolean}): void}
4381 chrome.mediaGalleries.AddGalleryWatchCallback;
4385 * @param {string} galleryId The media gallery's ID.
4386 * @param {!chrome.mediaGalleries.AddGalleryWatchCallback} callback Fired with
4387 * success or failure result.
4389 chrome.mediaGalleries.addGalleryWatch = function(galleryId, callback) {};
4393 * @param {string} galleryId The media gallery's ID.
4395 chrome.mediaGalleries.removeGalleryWatch = function(galleryId) {};
4399 * @param {function(!Array.<string>): void} callback Callback function notifies
4400 * which galleries are being watched.
4402 chrome.mediaGalleries.getAllGalleryWatch = function(callback) {};
4405 chrome.mediaGalleries.removeAllGalleryWatch = function() {};
4410 * @constructor
4412 chrome.mediaGalleries.GalleryChangeEvent = function() {};
4416 * @typedef {function({type: string, galleryId: string}): void}
4418 chrome.mediaGalleries.GalleryChangeCallback;
4422 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4424 chrome.mediaGalleries.GalleryChangeEvent.prototype.addListener =
4425 function(callback) {};
4429 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4431 chrome.mediaGalleries.GalleryChangeEvent.prototype.removeListener =
4432 function(callback) {};
4436 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4438 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListener =
4439 function(callback) {};
4443 * @return {boolean}
4445 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListeners = function() {};
4449 * @type {!chrome.mediaGalleries.GalleryChangeEvent}
4451 chrome.mediaGalleries.onGalleryChanged;
4455 * @typedef {{
4456 * type: string,
4457 * galleryCount: (number|undefined),
4458 * audioCount: (number|undefined),
4459 * imageCount: (number|undefined),
4460 * videoCount: (number|undefined)
4461 * }}
4463 chrome.mediaGalleries.OnScanProgressDetails;
4468 * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
4469 * parameter.
4470 * @constructor
4472 chrome.mediaGalleries.ScanProgressEvent = function() {};
4475 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4476 chrome.mediaGalleries.ScanProgressEvent.prototype.addListener =
4477 function(callback) {};
4480 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4481 chrome.mediaGalleries.ScanProgressEvent.prototype.removeListener =
4482 function(callback) {};
4486 * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
4487 * @return {boolean}
4489 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListener =
4490 function(callback) {};
4493 /** @return {boolean} */
4494 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListeners = function() {};
4497 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
4498 chrome.mediaGalleries.onScanProgress;
4502 * @const
4503 * @see https://developer.chrome.com/extensions/pageCapture.html
4505 chrome.pageCapture = {};
4509 * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
4510 * @param {function(Blob=): void} callback Callback function.
4512 chrome.pageCapture.saveAsMHTML = function(details, callback) {};
4516 * @const
4517 * @see https://developer.chrome.com/extensions/permissions.html
4519 chrome.permissions = {};
4523 * @typedef {{
4524 * permissions: (Array.<string>|undefined),
4525 * origins: (Array.<string>|undefined)
4526 * }}
4527 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
4529 chrome.permissions.Permissions;
4533 * @param {!chrome.permissions.Permissions} permissions
4534 * @param {function(boolean): void} callback Callback function.
4536 chrome.permissions.contains = function(permissions, callback) {};
4540 * @param {function(!chrome.permissions.Permissions): void} callback
4541 * Callback function.
4543 chrome.permissions.getAll = function(callback) {};
4547 * @param {!chrome.permissions.Permissions} permissions
4548 * @param {function(boolean): void=} opt_callback Callback function.
4550 chrome.permissions.remove = function(permissions, opt_callback) {};
4554 * @param {!chrome.permissions.Permissions} permissions
4555 * @param {function(boolean): void=} opt_callback Callback function.
4557 chrome.permissions.request = function(permissions, opt_callback) {};
4560 /** @type {!ChromeEvent} */
4561 chrome.permissions.onAdded;
4564 /** @type {!ChromeEvent} */
4565 chrome.permissions.onRemoved;
4569 * @see http://developer.chrome.com/dev/extensions/power.html
4571 chrome.power = {};
4575 * @param {string} level A string describing the degree to which power
4576 * management should be disabled, should be either "system" or "display".
4578 chrome.power.requestKeepAwake = function(level) {};
4582 * Releases a request previously made via requestKeepAwake().
4584 chrome.power.releaseKeepAwake = function() {};
4588 * @const
4589 * @see https://developer.chrome.com/extensions/privacy.html
4591 chrome.privacy = {};
4594 /** @type {!Object.<string,!ChromeSetting>} */
4595 chrome.privacy.network;
4598 /** @type {!Object.<string,!ChromeSetting>} */
4599 chrome.privacy.services;
4602 /** @type {!Object.<string,!ChromeSetting>} */
4603 chrome.privacy.websites;
4607 * @const
4608 * @see https://developer.chrome.com/extensions/proxy.html
4610 chrome.proxy = {};
4613 /** @type {!Object.<string,!ChromeSetting>} */
4614 chrome.proxy.settings;
4617 /** @type {!ChromeEvent} */
4618 chrome.proxy.onProxyError;
4622 * @const
4623 * @see http://developer.chrome.com/apps/socket.html
4625 chrome.socket = {};
4630 * @constructor
4632 chrome.socket.CreateInfo = function() {};
4635 /** @type {number} */
4636 chrome.socket.CreateInfo.prototype.socketId;
4641 * @constructor
4643 chrome.socket.ReadInfo = function() {};
4646 /** @type {number} */
4647 chrome.socket.ReadInfo.prototype.resultCode;
4650 /** @type {!ArrayBuffer} */
4651 chrome.socket.ReadInfo.prototype.data;
4656 * @constructor
4658 chrome.socket.WriteInfo = function() {};
4661 /** @type {number} */
4662 chrome.socket.WriteInfo.prototype.bytesWritten;
4667 * @constructor
4669 chrome.socket.RecvFromInfo = function() {};
4672 /** @type {number} */
4673 chrome.socket.RecvFromInfo.prototype.resultCode;
4676 /** @type {!ArrayBuffer} */
4677 chrome.socket.RecvFromInfo.prototype.data;
4680 /** @type {string} */
4681 chrome.socket.RecvFromInfo.prototype.address;
4684 /** @type {number} */
4685 chrome.socket.RecvFromInfo.prototype.port;
4690 * @constructor
4692 chrome.socket.AcceptInfo = function() {};
4695 /** @type {number} */
4696 chrome.socket.AcceptInfo.prototype.resultCode;
4699 /** @type {(number|undefined)} */
4700 chrome.socket.AcceptInfo.prototype.socketId;
4705 * @constructor
4707 chrome.socket.SocketInfo = function() {};
4710 /** @type {string} */
4711 chrome.socket.SocketInfo.prototype.socketType;
4714 /** @type {boolean} */
4715 chrome.socket.SocketInfo.prototype.connected;
4718 /** @type {(string|undefined)} */
4719 chrome.socket.SocketInfo.prototype.peerAddress;
4722 /** @type {(number|undefined)} */
4723 chrome.socket.SocketInfo.prototype.peerPort;
4726 /** @type {(string|undefined)} */
4727 chrome.socket.SocketInfo.prototype.localAddress;
4730 /** @type {(number|undefined)} */
4731 chrome.socket.SocketInfo.prototype.localPort;
4736 * @constructor
4738 chrome.socket.NetworkAdapterInfo = function() {};
4741 /** @type {string} */
4742 chrome.socket.NetworkAdapterInfo.prototype.name;
4745 /** @type {string} */
4746 chrome.socket.NetworkAdapterInfo.prototype.address;
4750 * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4751 * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4752 * socket options or callback.
4753 * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4754 * socket has been created.
4756 chrome.socket.create = function(type, optionsOrCallback, opt_callback) {};
4760 * @param {number} socketId The id of the socket to destroy.
4762 chrome.socket.destroy = function(socketId) {};
4766 * @param {number} socketId The id of the socket.
4767 * @param {string} hostname The hostname or IP address of the remote machine.
4768 * @param {number} port The port of the remote machine.
4769 * @param {function(number)} callback Called when the connection attempt is
4770 * complete.
4772 chrome.socket.connect = function(socketId, hostname, port, callback) {};
4776 * @param {number} socketId The id of the socket.
4777 * @param {string} address The address of the local machine.
4778 * @param {number} port The port of the local machine.
4779 * @param {function(number)} callback Called when the bind attempt is complete.
4781 chrome.socket.bind = function(socketId, address, port, callback) {};
4785 * @param {number} socketId The id of the socket to disconnect.
4787 chrome.socket.disconnect = function(socketId) {};
4791 * @param {number} socketId The id of the socket to read from.
4792 * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4793 * read buffer size or the callback.
4794 * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4795 * that was available to be read without blocking.
4797 chrome.socket.read = function(socketId, bufferSizeOrCallback, opt_callback) {};
4801 * @param {number} socketId The id of the socket to write to.
4802 * @param {!ArrayBuffer} data The data to write.
4803 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4804 * operation completes without blocking or an error occurs.
4806 chrome.socket.write = function(socketId, data, callback) {};
4810 * @param {number} socketId The id of the socket to read from.
4811 * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4812 * The read buffer size or the callback.
4813 * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4814 * that was available to be read without blocking.
4816 chrome.socket.recvFrom = function(socketId, bufferSizeOrCallback,
4817 opt_callback) {};
4821 * @param {number} socketId The id of the socket to write to.
4822 * @param {!ArrayBuffer} data The data to write.
4823 * @param {string} address The address of the remote machine.
4824 * @param {number} port The port of the remote machine.
4825 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4826 * operation completes without blocking or an error occurs.
4828 chrome.socket.sendTo = function(socketId, data, address, port, callback) {};
4832 * @param {number} socketId The id of the socket to listen on.
4833 * @param {string} address The address of the local machine to listen on. Use
4834 * '0' to listen on all addresses.
4835 * @param {number} port The port of the local machine.
4836 * @param {(number|function(number))} backlogOrCallback The length of the
4837 * socket's listen queue or the callback.
4838 * @param {function(number)=} opt_callback Called when the listen operation
4839 * completes.
4841 chrome.socket.listen =
4842 function(socketId, address, port, backlogOrCallback, opt_callback) {};
4846 * @param {number} socketId The id of the socket to accept a connection on.
4847 * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4848 * socket is accepted.
4850 chrome.socket.accept = function(socketId, callback) {};
4854 * @param {number} socketId The id of the socket to listen on.
4855 * @param {boolean} enable If true, enable keep-alive functionality.
4856 * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4857 * between the last packet received and the first keepalive probe (default
4858 * is 0) or the callback
4859 * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4860 * is complete.
4862 chrome.socket.setKeepAlive = function(socketId, enable, delayOrCallback,
4863 opt_callback) {};
4867 * @param {number} socketId The id of the socket to listen on.
4868 * @param {boolean} noDelay If true, disables Nagle's algorithm.
4869 * @param {function(boolean)} callback Called when the setNoDelay attempt is
4870 * complete.
4872 chrome.socket.setNoDelay = function(socketId, noDelay, callback) {};
4876 * @param {number} socketId The id of the socket.
4877 * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4878 * is available.
4880 chrome.socket.getInfo = function(socketId, callback) {};
4884 * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
4885 * when local adapter information is available.
4887 chrome.socket.getNetworkList = function(callback) {};
4891 * @param {number} socketId The id of the socket.
4892 * @param {string} address The group address to join. Domain names are not
4893 * supported.
4894 * @param {function(number)} callback Called when the join operation is done.
4896 chrome.socket.joinGroup = function(socketId, address, callback) {};
4900 * @param {number} socketId The id of the socket.
4901 * @param {string} address The group address to leave. Domain names are not
4902 * supported.
4903 * @param {function(number)} callback Called when the leave operation is done.
4905 chrome.socket.leaveGroup = function(socketId, address, callback) {};
4909 * @param {number} socketId The id of the socket.
4910 * @param {number} ttl The time-to-live value.
4911 * @param {function(number)} callback Called when the configuration operation is
4912 * done.
4914 chrome.socket.setMulticastTimeToLive = function(socketId, ttl, callback) {};
4918 * @param {number} socketId The id of the socket.
4919 * @param {boolean} enabled True to enable loopback mode.
4920 * @param {function(number)} callback Called when the configuration operation is
4921 * done.
4923 chrome.socket.setMulticastLoopbackMode = function(socketId, enabled,
4924 callback) {};
4928 * @param {number} socketId The id of the socket.
4929 * @param {function(!Array.<string>)} callback Called with an array of string
4930 * groups.
4932 chrome.socket.getJoinedGroups = function(socketId, callback) {};
4936 * @const
4938 chrome.sockets = {};
4942 * @const
4943 * @see https://developer.chrome.com/apps/sockets_tcp
4945 chrome.sockets.tcp = {};
4950 * @constructor
4951 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketInfo
4953 chrome.sockets.tcp.SocketInfo = function() {};
4956 /** @type {number} */
4957 chrome.sockets.tcp.SocketInfo.prototype.socketId;
4960 /** @type {boolean} */
4961 chrome.sockets.tcp.SocketInfo.prototype.persistent;
4964 /** @type {string|undefined} */
4965 chrome.sockets.tcp.SocketInfo.prototype.name;
4968 /** @type {number|undefined} */
4969 chrome.sockets.tcp.SocketInfo.prototype.bufferSize;
4972 /** @type {boolean} */
4973 chrome.sockets.tcp.SocketInfo.prototype.paused;
4976 /** @type {boolean} */
4977 chrome.sockets.tcp.SocketInfo.prototype.connected;
4980 /** @type {string|undefined} */
4981 chrome.sockets.tcp.SocketInfo.prototype.localAddress;
4984 /** @type {number|undefined} */
4985 chrome.sockets.tcp.SocketInfo.prototype.localPort;
4988 /** @type {string|undefined} */
4989 chrome.sockets.tcp.SocketInfo.prototype.peerAddress;
4992 /** @type {number|undefined} */
4993 chrome.sockets.tcp.SocketInfo.prototype.peerPort;
4997 * @typedef {?{
4998 * persistent: (boolean|undefined),
4999 * name: (string|undefined),
5000 * bufferSize: (number|undefined)
5001 * }}
5002 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketProperties
5004 chrome.sockets.tcp.SocketProperties;
5008 * @typedef {?{
5009 * min: (string|undefined),
5010 * max: (string|undefined)
5011 * }}
5012 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5014 chrome.sockets.tcp.SecurePropertiesTlsVersion;
5018 * @typedef {?{
5019 * tlsVersion: (chrome.sockets.tcp.SecurePropertiesTlsVersion|undefined)
5020 * }}
5021 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5023 chrome.sockets.tcp.SecureProperties;
5027 * @param {!chrome.sockets.tcp.SocketProperties|
5028 * function(!Object)} propertiesOrCallback
5029 * @param {function(!Object)=} opt_callback
5030 * @see https://developer.chrome.com/apps/sockets_tcp#method-create
5032 chrome.sockets.tcp.create = function(propertiesOrCallback, opt_callback) {};
5036 * @param {number} socketId
5037 * @param {!chrome.sockets.tcp.SocketProperties} properties
5038 * @param {function()=} opt_callback
5039 * @see https://developer.chrome.com/apps/sockets_tcp#method-update
5041 chrome.sockets.tcp.update = function(socketId, properties, opt_callback) {};
5045 * @param {number} socketId
5046 * @param {boolean} paused
5047 * @param {function()=} opt_callback
5048 * @see https://developer.chrome.com/apps/sockets_tcp#method-setPaused
5050 chrome.sockets.tcp.setPaused = function(socketId, paused, opt_callback) {};
5054 * @param {number} socketId
5055 * @param {boolean} enable
5056 * @param {(number|function(number))} delayOrCallback
5057 * @param {function(number)=} opt_callback
5058 * @see https://developer.chrome.com/apps/sockets_tcp#method-setKeepAlive
5060 chrome.sockets.tcp.setKeepAlive = function(socketId, enable, delayOrCallback,
5061 opt_callback) {};
5065 * @param {number} socketId
5066 * @param {boolean} noDelay
5067 * @param {function(number)} callback
5068 * @see https://developer.chrome.com/apps/sockets_tcp#method-setNoDelay
5070 chrome.sockets.tcp.setNoDelay = function(socketId, noDelay, callback) {};
5074 * @param {number} socketId
5075 * @param {string} peerAddress
5076 * @param {number} peerPort
5077 * @param {function(number)} callback
5078 * @see https://developer.chrome.com/apps/sockets_tcp#method-connect
5080 chrome.sockets.tcp.connect = function(socketId, peerAddress, peerPort,
5081 callback) {};
5085 * @param {number} socketId The id of the socket to disconnect.
5086 * @param {function()=} opt_callback
5087 * @see https://developer.chrome.com/apps/sockets_tcp#method-disconnect
5089 chrome.sockets.tcp.disconnect = function(socketId, opt_callback) {};
5093 * @param {number} socketId
5094 * @param {!chrome.sockets.tcp.SecureProperties|function(number)}
5095 * optionsOrCallback
5096 * @param {function(number)=} opt_callback
5097 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5099 chrome.sockets.tcp.secure = function(socketId, optionsOrCallback,
5100 opt_callback) {};
5104 * @param {number} socketId
5105 * @param {!ArrayBuffer} data
5106 * @param {function(!Object)} callback
5107 * @see https://developer.chrome.com/apps/sockets_tcp#method-send
5109 chrome.sockets.tcp.send = function(socketId, data, callback) {};
5113 * @param {number} socketId
5114 * @param {function()=} opt_callback
5115 * @see https://developer.chrome.com/apps/sockets_tcp#method-close
5117 chrome.sockets.tcp.close = function(socketId, opt_callback) {};
5121 * @param {number} socketId
5122 * @param {function(!chrome.sockets.tcp.SocketInfo)} callback
5123 * @see https://developer.chrome.com/apps/sockets_tcp#method-getInfo
5125 chrome.sockets.tcp.getInfo = function(socketId, callback) {};
5129 * @param {function(!Array.<!chrome.sockets.tcp.SocketInfo>)} callback
5130 * @see https://developer.chrome.com/apps/sockets_tcp#method-getSockets
5132 chrome.sockets.tcp.getSockets = function(callback) {};
5137 * @constructor
5138 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceive
5140 chrome.sockets.tcp.ReceiveEventData = function() {};
5143 /** @type {number} */
5144 chrome.sockets.tcp.ReceiveEventData.prototype.socketId;
5147 /** @type {!ArrayBuffer} */
5148 chrome.sockets.tcp.ReceiveEventData.prototype.data;
5153 * Event whose listeners take a ReceiveEventData parameter.
5154 * @constructor
5156 chrome.sockets.tcp.ReceiveEvent = function() {};
5160 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5162 chrome.sockets.tcp.ReceiveEvent.prototype.addListener =
5163 function(callback) {};
5167 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5169 chrome.sockets.tcp.ReceiveEvent.prototype.removeListener =
5170 function(callback) {};
5174 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5175 * @return {boolean}
5177 chrome.sockets.tcp.ReceiveEvent.prototype.hasListener =
5178 function(callback) {};
5181 /** @return {boolean} */
5182 chrome.sockets.tcp.ReceiveEvent.prototype.hasListeners = function() {};
5185 /** @type {!chrome.sockets.tcp.ReceiveEvent} */
5186 chrome.sockets.tcp.onReceive;
5191 * @constructor
5192 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceiveError
5194 chrome.sockets.tcp.ReceiveErrorEventData = function() {};
5197 /** @type {number} */
5198 chrome.sockets.tcp.ReceiveErrorEventData.prototype.socketId;
5201 /** @type {number} */
5202 chrome.sockets.tcp.ReceiveErrorEventData.prototype.resultCode;
5207 * Event whose listeners take a ReceiveErrorEventData parameter.
5208 * @constructor
5210 chrome.sockets.tcp.ReceiveErrorEvent = function() {};
5214 * @param {function(
5215 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5217 chrome.sockets.tcp.ReceiveErrorEvent.prototype.addListener =
5218 function(callback) {};
5222 * @param {function(
5223 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5225 chrome.sockets.tcp.ReceiveErrorEvent.prototype.removeListener =
5226 function(callback) {};
5230 * @param {function(
5231 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5232 * @return {boolean}
5234 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListener =
5235 function(callback) {};
5238 /** @return {boolean} */
5239 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListeners =
5240 function() {};
5243 /** @type {!chrome.sockets.tcp.ReceiveErrorEvent} */
5244 chrome.sockets.tcp.onReceiveError;
5248 * @const
5249 * @see https://developer.chrome.com/extensions/storage.html
5251 chrome.storage = {};
5254 /** @type {!StorageArea} */
5255 chrome.storage.sync;
5258 /** @type {!StorageArea} */
5259 chrome.storage.local;
5262 /** @type {!StorageChangeEvent} */
5263 chrome.storage.onChanged;
5266 /** @const */
5267 chrome.system = {};
5271 * @const
5272 * @see https://developer.chrome.com/extensions/system_cpu.html
5274 chrome.system.cpu = {};
5278 * @param {function(!Object)} callback
5280 chrome.system.cpu.getInfo = function(callback) {};
5284 * @const
5285 * @see http://developer.chrome.com/apps/system_display.html
5287 chrome.system.display = {};
5290 /** @type {!ChromeEvent} */
5291 chrome.system.display.onDisplayChanged;
5296 * @constructor
5298 chrome.system.display.Bounds = function() {};
5301 /** @type {number} */
5302 chrome.system.display.Bounds.prototype.left;
5305 /** @type {number} */
5306 chrome.system.display.Bounds.prototype.top;
5309 /** @type {number} */
5310 chrome.system.display.Bounds.prototype.width;
5313 /** @type {number} */
5314 chrome.system.display.Bounds.prototype.height;
5318 * @typedef {{
5319 * left: (number|undefined),
5320 * top: (number|undefined),
5321 * right: (number|undefined),
5322 * bottom: (number|undefined)
5323 * }}
5325 chrome.system.display.Insets;
5330 * @constructor
5332 chrome.system.display.DisplayInfo = function() {};
5335 /** @type {string} */
5336 chrome.system.display.DisplayInfo.prototype.id;
5339 /** @type {string} */
5340 chrome.system.display.DisplayInfo.prototype.name;
5343 /** @type {string} */
5344 chrome.system.display.DisplayInfo.prototype.mirroringSourceId;
5347 /** @type {boolean} */
5348 chrome.system.display.DisplayInfo.prototype.isPrimary;
5351 /** @type {boolean} */
5352 chrome.system.display.DisplayInfo.prototype.isInternal;
5355 /** @type {boolean} */
5356 chrome.system.display.DisplayInfo.prototype.isEnabled;
5359 /** @type {number} */
5360 chrome.system.display.DisplayInfo.prototype.dpiX;
5363 /** @type {number} */
5364 chrome.system.display.DisplayInfo.prototype.dpiY;
5367 /** @type {number} */
5368 chrome.system.display.DisplayInfo.prototype.rotation;
5371 /** @type {!chrome.system.display.Bounds} */
5372 chrome.system.display.DisplayInfo.prototype.bounds;
5375 /** @type {!chrome.system.display.Insets} */
5376 chrome.system.display.DisplayInfo.prototype.overscan;
5379 /** @type {!chrome.system.display.Bounds} */
5380 chrome.system.display.DisplayInfo.prototype.workArea;
5384 * @typedef {{
5385 * mirroringSourceId: (string|undefined),
5386 * isPrimary: (boolean|undefined),
5387 * overscan: (!chrome.system.display.Insets|undefined),
5388 * rotation: (number|undefined),
5389 * boundsOriginX: (number|undefined),
5390 * boundsOriginY: (number|undefined)
5391 * }}
5393 chrome.system.display.SettableDisplayInfo;
5396 chrome.types = {};
5400 * @typedef {?{
5401 * format: (string|undefined),
5402 * quality: (number|undefined)
5403 * }}
5405 chrome.types.ImageDetails;
5409 * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
5410 * callback Called with an array of objects representing display info.
5412 chrome.system.display.getInfo = function(callback) {};
5416 * @param {string} id The display's unique identifier.
5417 * @param {!chrome.system.display.SettableDisplayInfo} info The information
5418 * about display properties that should be changed.
5419 * @param {function()=} opt_callback The callback to execute when the display
5420 * info has been changed.
5422 chrome.system.display.setDisplayProperties =
5423 function(id, info, opt_callback) {};
5427 * @const
5428 * @see https://developer.chrome.com/extensions/types.html
5430 chrome.chromeSetting = {};
5433 /** @type {!ChromeEvent} */
5434 chrome.chromeSetting.onChange;
5438 * @const
5439 * @see https://developer.chrome.com/extensions/webNavigation.html
5441 chrome.webNavigation = {};
5445 * @param {Object} details Object with a 'tabId' (number) key.
5446 * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
5447 * Callback function.
5449 chrome.webNavigation.getAllFrames = function(details, callback) {};
5453 * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
5454 * keys.
5455 * @param {function(Object.<string, (boolean|string)>)} callback
5456 * Callback function.
5458 chrome.webNavigation.getFrame = function(details, callback) {};
5461 /** @type {!ChromeEvent} */
5462 chrome.webNavigation.onBeforeNavigate;
5465 /** @type {!ChromeEvent} */
5466 chrome.webNavigation.onCommitted;
5469 /** @type {!ChromeEvent} */
5470 chrome.webNavigation.onDOMContentLoaded;
5473 /** @type {!ChromeEvent} */
5474 chrome.webNavigation.onCompleted;
5477 /** @type {!ChromeEvent} */
5478 chrome.webNavigation.onErrorOccurred;
5481 /** @type {!ChromeEvent} */
5482 chrome.webNavigation.onCreatedNavigationTarget;
5485 /** @type {!ChromeEvent} */
5486 chrome.webNavigation.onReferenceFragmentUpdated;
5489 /** @type {!ChromeEvent} */
5490 chrome.webNavigation.onTabReplaced;
5493 /** @type {!ChromeEvent} */
5494 chrome.webNavigation.onHistoryStateUpdated;
5499 * Most event listeners for WebRequest take extra arguments.
5500 * @see https://developer.chrome.com/extensions/webRequest.html.
5501 * @constructor
5503 function WebRequestEvent() {}
5507 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5508 * function.
5509 * @param {!RequestFilter} filter A set of filters that restrict
5510 * the events that will be sent to this listener.
5511 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
5512 * that should be passed to the listener function.
5514 WebRequestEvent.prototype.addListener =
5515 function(listener, filter, opt_extraInfoSpec) {};
5519 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5520 * function.
5522 WebRequestEvent.prototype.removeListener = function(listener) {};
5526 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5527 * function.
5529 WebRequestEvent.prototype.hasListener = function(listener) {};
5533 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5534 * function.
5536 WebRequestEvent.prototype.hasListeners = function(listener) {};
5541 * The onErrorOccurred event takes one less parameter than the others.
5542 * @see https://developer.chrome.com/extensions/webRequest.html.
5543 * @constructor
5545 function WebRequestOnErrorOccurredEvent() {}
5549 * @param {function(!Object): void} listener Listener function.
5550 * @param {!RequestFilter} filter A set of filters that restrict
5551 * the events that will be sent to this listener.
5553 WebRequestOnErrorOccurredEvent.prototype.addListener =
5554 function(listener, filter) {};
5558 * @param {function(!Object): void} listener Listener function.
5560 WebRequestOnErrorOccurredEvent.prototype.removeListener = function(listener) {};
5564 * @param {function(!Object): void} listener Listener function.
5566 WebRequestOnErrorOccurredEvent.prototype.hasListener = function(listener) {};
5570 * @param {function(!Object): void} listener Listener function.
5572 WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
5576 * @const
5577 * @see https://developer.chrome.com/extensions/webRequest.html
5579 chrome.webRequest = {};
5583 * @param {function(): void=} opt_callback Callback function.
5585 chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
5588 /** @type {!WebRequestEvent} */
5589 chrome.webRequest.onAuthRequired;
5592 /** @type {!WebRequestEvent} */
5593 chrome.webRequest.onBeforeRedirect;
5596 /** @type {!WebRequestEvent} */
5597 chrome.webRequest.onBeforeRequest;
5600 /** @type {!WebRequestEvent} */
5601 chrome.webRequest.onBeforeSendHeaders;
5604 /** @type {!WebRequestEvent} */
5605 chrome.webRequest.onCompleted;
5608 /** @type {!WebRequestOnErrorOccurredEvent} */
5609 chrome.webRequest.onErrorOccurred;
5612 /** @type {!WebRequestEvent} */
5613 chrome.webRequest.onHeadersReceived;
5616 /** @type {!WebRequestEvent} */
5617 chrome.webRequest.onResponseStarted;
5620 /** @type {!WebRequestEvent} */
5621 chrome.webRequest.onSendHeaders;
5624 // Classes
5628 /**onKeyEvent
5629 * @see https://developer.chrome.com/extensions/management.html
5630 * @constructor
5632 function ExtensionInfo() {}
5635 /** @type {string} */
5636 ExtensionInfo.prototype.id;
5639 /** @type {string} */
5640 ExtensionInfo.prototype.name;
5643 /** @type {string} */
5644 ExtensionInfo.prototype.shortName;
5647 /** @type {string} */
5648 ExtensionInfo.prototype.description;
5651 /** @type {string} */
5652 ExtensionInfo.prototype.version;
5655 /** @type {boolean} */
5656 ExtensionInfo.prototype.mayDisable;
5659 /** @type {boolean} */
5660 ExtensionInfo.prototype.enabled;
5663 /** @type {string|undefined} */
5664 ExtensionInfo.prototype.disabledReason;
5667 /** @type {boolean} */
5668 ExtensionInfo.prototype.isApp;
5671 /** @type {string} */
5672 ExtensionInfo.prototype.type;
5675 /** @type {string|undefined} */
5676 ExtensionInfo.prototype.appLaunchUrl;
5679 /** @type {string|undefined} */
5680 ExtensionInfo.prototype.homepageUrl;
5683 /** @type {string|undefined} */
5684 ExtensionInfo.prototype.updateUrl;
5687 /** @type {boolean} */
5688 ExtensionInfo.prototype.offlineEnabled;
5691 /** @type {string} */
5692 ExtensionInfo.prototype.optionsUrl;
5695 /** @type {!Array.<!IconInfo>|undefined} */
5696 ExtensionInfo.prototype.icons;
5699 /** @type {!Array.<string>} */
5700 ExtensionInfo.prototype.permissions;
5703 /** @type {!Array.<string>} */
5704 ExtensionInfo.prototype.hostPermissions;
5707 /** @type {string} */
5708 ExtensionInfo.prototype.installType;
5711 /** @type {string|undefined} */
5712 ExtensionInfo.prototype.launchType;
5715 /** @type {!Array.<string>|undefined} */
5716 ExtensionInfo.prototype.availableLaunchTypes;
5721 * @see https://developer.chrome.com/extensions/management.html
5722 * @constructor
5724 function IconInfo() {}
5727 /** @type {number} */
5728 IconInfo.prototype.size;
5731 /** @type {string} */
5732 IconInfo.prototype.url;
5737 * @see https://developer.chrome.com/extensions/tabs
5738 * @constructor
5740 function Tab() {}
5743 // TODO: Make this field optional once dependent projects have been updated.
5745 * @type {number}
5747 Tab.prototype.id;
5750 /** @type {number} */
5751 Tab.prototype.index;
5754 /** @type {number} */
5755 Tab.prototype.windowId;
5758 // TODO: Make this field optional once dependent projects have been updated.
5760 * @type {number}
5762 Tab.prototype.openerTabId;
5765 /** @type {boolean} */
5766 Tab.prototype.highlighted;
5769 /** @type {boolean} */
5770 Tab.prototype.active;
5773 /** @type {boolean} */
5774 Tab.prototype.pinned;
5777 // TODO: Make this field optional once dependent projects have been updated.
5779 * @type {string}
5781 Tab.prototype.url;
5784 // TODO: Make this field optional once dependent projects have been updated.
5786 * @type {string}
5788 Tab.prototype.title;
5791 // TODO: Make this field optional once dependent projects have been updated.
5793 * @type {string}
5795 Tab.prototype.favIconUrl;
5798 // TODO: Make this field optional once dependent projects have been updated.
5800 * @type {string}
5802 Tab.prototype.status;
5805 /** @type {boolean} */
5806 Tab.prototype.incognito;
5809 /** @type {number|undefined} */
5810 Tab.prototype.width;
5813 /** @type {number|undefined} */
5814 Tab.prototype.height;
5817 /** @type {number|undefined} */
5818 Tab.prototype.sessionId;
5823 * @see https://developer.chrome.com/extensions/windows.html
5824 * @constructor
5826 function ChromeWindow() {}
5829 /** @type {number} */
5830 ChromeWindow.prototype.id;
5833 /** @type {boolean} */
5834 ChromeWindow.prototype.focused;
5837 /** @type {number} */
5838 ChromeWindow.prototype.top;
5841 /** @type {number} */
5842 ChromeWindow.prototype.left;
5845 /** @type {number} */
5846 ChromeWindow.prototype.width;
5849 /** @type {number} */
5850 ChromeWindow.prototype.height;
5853 /** @type {Array.<Tab>} */
5854 ChromeWindow.prototype.tabs;
5857 /** @type {boolean} */
5858 ChromeWindow.prototype.incognito;
5861 /** @type {string} */
5862 ChromeWindow.prototype.type;
5865 /** @type {string} */
5866 ChromeWindow.prototype.state;
5869 /** @type {boolean} */
5870 ChromeWindow.prototype.alwaysOnTop;
5875 * @see https://developer.chrome.com/extensions/events.html
5876 * @constructor
5878 function ChromeEvent() {}
5881 /** @param {!Function} callback */
5882 ChromeEvent.prototype.addListener = function(callback) {};
5885 /** @param {!Function} callback */
5886 ChromeEvent.prototype.removeListener = function(callback) {};
5890 * @param {!Function} callback
5891 * @return {boolean}
5893 ChromeEvent.prototype.hasListener = function(callback) {};
5896 /** @return {boolean} */
5897 ChromeEvent.prototype.hasListeners = function() {};
5902 * Event whose listeners take a string parameter.
5903 * @constructor
5905 function ChromeStringEvent() {}
5908 /** @param {function(string): void} callback */
5909 ChromeStringEvent.prototype.addListener = function(callback) {};
5912 /** @param {function(string): void} callback */
5913 ChromeStringEvent.prototype.removeListener = function(callback) {};
5917 * @param {function(string): void} callback
5918 * @return {boolean}
5920 ChromeStringEvent.prototype.hasListener = function(callback) {};
5923 /** @return {boolean} */
5924 ChromeStringEvent.prototype.hasListeners = function() {};
5929 * Event whose listeners take a boolean parameter.
5930 * @constructor
5933 function ChromeBooleanEvent() {}
5937 * @param {function(boolean): void} callback
5939 ChromeBooleanEvent.prototype.addListener = function(callback) {};
5943 * @param {function(boolean): void} callback
5945 ChromeBooleanEvent.prototype.removeListener = function(callback) {};
5949 * @param {function(boolean): void} callback
5950 * @return {boolean}
5952 ChromeBooleanEvent.prototype.hasListener = function(callback) {};
5956 * @return {boolean}
5958 ChromeBooleanEvent.prototype.hasListeners = function() {};
5963 * Event whose listeners take a number parameter.
5964 * @constructor
5967 function ChromeNumberEvent() {}
5971 * @param {function(number): void} callback
5973 ChromeNumberEvent.prototype.addListener = function(callback) {};
5977 * @param {function(number): void} callback
5979 ChromeNumberEvent.prototype.removeListener = function(callback) {};
5983 * @param {function(number): void} callback
5984 * @return {boolean}
5986 ChromeNumberEvent.prototype.hasListener = function(callback) {};
5990 * @return {boolean}
5992 ChromeNumberEvent.prototype.hasListeners = function() {};
5997 * Event whose listeners take an Object parameter.
5998 * @constructor
6000 function ChromeObjectEvent() {}
6004 * @param {function(!Object): void} callback Callback.
6006 ChromeObjectEvent.prototype.addListener = function(callback) {};
6010 * @param {function(!Object): void} callback Callback.
6012 ChromeObjectEvent.prototype.removeListener = function(callback) {};
6016 * @param {function(!Object): void} callback Callback.
6017 * @return {boolean}
6019 ChromeObjectEvent.prototype.hasListener = function(callback) {};
6023 * @return {boolean}
6025 ChromeObjectEvent.prototype.hasListeners = function() {};
6030 * Event whose listeners take an ExtensionInfo parameter.
6031 * @constructor
6033 function ChromeExtensionInfoEvent() {}
6036 /** @param {function(!ExtensionInfo): void} callback */
6037 ChromeExtensionInfoEvent.prototype.addListener = function(callback) {};
6040 /** @param {function(!ExtensionInfo): void} callback */
6041 ChromeExtensionInfoEvent.prototype.removeListener = function(callback) {};
6045 * @param {function(!ExtensionInfo): void} callback
6046 * @return {boolean}
6048 ChromeExtensionInfoEvent.prototype.hasListener = function(callback) {};
6051 /** @return {boolean} */
6052 ChromeExtensionInfoEvent.prototype.hasListeners = function() {};
6057 * Event whose listeners take a string array parameter.
6058 * @constructor
6060 function ChromeStringArrayEvent() {}
6063 /** @param {function(!Array.<string>): void} callback */
6064 ChromeStringArrayEvent.prototype.addListener = function(callback) {};
6067 /** @param {function(!Array.<string>): void} callback */
6068 ChromeStringArrayEvent.prototype.removeListener = function(callback) {};
6072 * @param {function(!Array.<string>): void} callback
6073 * @return {boolean}
6075 ChromeStringArrayEvent.prototype.hasListener = function(callback) {};
6078 /** @return {boolean} */
6079 ChromeStringArrayEvent.prototype.hasListeners = function() {};
6084 * Event whose listeners take two strings as parameters.
6085 * @constructor
6087 function ChromeStringStringEvent() {}
6090 /** @param {function(string, string): void} callback */
6091 ChromeStringStringEvent.prototype.addListener = function(callback) {};
6094 /** @param {function(string, string): void} callback */
6095 ChromeStringStringEvent.prototype.removeListener = function(callback) {};
6099 * @param {function(string, string): void} callback
6100 * @return {boolean}
6102 ChromeStringStringEvent.prototype.hasListener = function(callback) {};
6105 /** @return {boolean} */
6106 ChromeStringStringEvent.prototype.hasListeners = function() {};
6110 * @see http://developer.chrome.com/extensions/pushMessaging.html
6111 * @const
6113 chrome.pushMessaging = {};
6117 * @type {!chrome.pushMessaging.PushMessageEvent}
6119 chrome.pushMessaging.onMessage;
6123 * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
6124 * interactiveOrCallback Either a flag(optional), if set to true, user will
6125 * be asked to log in if they are not already logged in, or, when he flag is
6126 * not given, the callback.
6127 * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
6128 * Callback.
6130 chrome.pushMessaging.getChannelId =
6131 function(interactiveOrCallback, opt_callback) {};
6136 * Event whose listeners take a chrome.pushMessaging.Message parameter.
6137 * @constructor
6139 chrome.pushMessaging.PushMessageEvent = function() {};
6143 * @param {function(!chrome.pushMessaging.Message): void} callback
6145 chrome.pushMessaging.PushMessageEvent.prototype.addListener =
6146 function(callback) {};
6150 * @param {function(!chrome.pushMessaging.Message): void} callback
6152 chrome.pushMessaging.PushMessageEvent.prototype.removeListener =
6153 function(callback) {};
6157 * @param {function(!chrome.pushMessaging.Message): void} callback
6158 * @return {boolean}
6160 chrome.pushMessaging.PushMessageEvent.prototype.hasListener =
6161 function(callback) {};
6165 * @return {boolean}
6167 chrome.pushMessaging.PushMessageEvent.prototype.hasListeners = function() {};
6172 * @see http://developer.chrome.com/apps/runtime.html#type-Port
6173 * @constructor
6175 function Port() {}
6178 /** @type {string} */
6179 Port.prototype.name;
6182 /** @type {!ChromeEvent} */
6183 Port.prototype.onDisconnect;
6186 /** @type {!ChromeEvent} */
6187 Port.prototype.onMessage;
6190 /** @type {MessageSender} */
6191 Port.prototype.sender;
6195 * @param {Object.<string>} obj Message object.
6197 Port.prototype.postMessage = function(obj) {};
6201 * Note: as of 2012-04-12, this function is no longer documented on
6202 * the public web pages, but there are still existing usages.
6204 Port.prototype.disconnect = function() {};
6209 * @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
6210 * @constructor
6212 function MessageSender() {}
6215 /** @type {!Tab|undefined} */
6216 MessageSender.prototype.tab;
6219 /** @type {string|undefined} */
6220 MessageSender.prototype.id;
6223 /** @type {string|undefined} */
6224 MessageSender.prototype.url;
6227 /** @type {string|undefined} */
6228 MessageSender.prototype.tlsChannelId;
6233 * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
6234 * @constructor
6236 function BookmarkTreeNode() {}
6239 /** @type {string} */
6240 BookmarkTreeNode.prototype.id;
6243 /** @type {string|undefined} */
6244 BookmarkTreeNode.prototype.parentId;
6247 /** @type {number|undefined} */
6248 BookmarkTreeNode.prototype.index;
6251 /** @type {string|undefined} */
6252 BookmarkTreeNode.prototype.url;
6255 /** @type {string} */
6256 BookmarkTreeNode.prototype.title;
6259 /** @type {number|undefined} */
6260 BookmarkTreeNode.prototype.dateAdded;
6263 /** @type {number|undefined} */
6264 BookmarkTreeNode.prototype.dateGroupModified;
6267 /** @type {string|undefined} */
6268 BookmarkTreeNode.prototype.unmodifiable;
6271 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
6272 BookmarkTreeNode.prototype.children;
6277 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
6278 * @constructor
6280 function Cookie() {}
6283 /** @type {string} */
6284 Cookie.prototype.name;
6287 /** @type {string} */
6288 Cookie.prototype.value;
6291 /** @type {string} */
6292 Cookie.prototype.domain;
6295 /** @type {boolean} */
6296 Cookie.prototype.hostOnly;
6299 /** @type {string} */
6300 Cookie.prototype.path;
6303 /** @type {boolean} */
6304 Cookie.prototype.secure;
6307 /** @type {boolean} */
6308 Cookie.prototype.httpOnly;
6311 /** @type {boolean} */
6312 Cookie.prototype.session;
6315 /** @type {number} */
6316 Cookie.prototype.expirationDate;
6319 /** @type {string} */
6320 Cookie.prototype.storeId;
6325 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
6326 * @constructor
6328 function CookieStore() {}
6331 /** @type {string} */
6332 CookieStore.prototype.id;
6335 /** @type {Array.<number>} */
6336 CookieStore.prototype.tabIds;
6341 * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
6342 * @constructor
6344 function OnClickData() {}
6347 /** @type {number} */
6348 OnClickData.prototype.menuItemId;
6351 /** @type {number} */
6352 OnClickData.prototype.parentMenuItemId;
6355 /** @type {string} */
6356 OnClickData.prototype.mediaType;
6359 /** @type {string} */
6360 OnClickData.prototype.linkUrl;
6363 /** @type {string} */
6364 OnClickData.prototype.srcUrl;
6367 /** @type {string} */
6368 OnClickData.prototype.pageUrl;
6371 /** @type {string} */
6372 OnClickData.prototype.frameUrl;
6375 /** @type {string} */
6376 OnClickData.prototype.selectionText;
6379 /** @type {string} */
6380 OnClickData.prototype.editable;
6385 * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
6386 * @constructor
6388 function Debuggee() {}
6391 /** @type {number} */
6392 Debuggee.prototype.tabId;
6397 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
6398 * @constructor
6400 function ResourceIdentifier() {}
6403 /** @type {string} */
6404 ResourceIdentifier.prototype.id;
6407 /** @type {string} */
6408 ResourceIdentifier.prototype.description;
6413 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
6414 * @constructor
6416 function ContentSetting() {}
6420 * @param {!Object.<string,string>} details Settings details.
6421 * @param {function(): void=} opt_callback Callback function.
6423 ContentSetting.prototype.clear = function(details, opt_callback) {};
6427 * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
6428 * Settings details.
6429 * @param {function(): void} callback Callback function.
6431 ContentSetting.prototype.get = function(details, callback) {};
6435 * @param {function(): void} callback Callback function.
6437 ContentSetting.prototype.getResourceIdentifiers = function(callback) {};
6441 * @param {!Object.<string,(string|ResourceIdentifier)>} details
6442 * Settings details.
6443 * @param {function(): void=} opt_callback Callback function.
6445 ContentSetting.prototype.set = function(details, opt_callback) {};
6450 * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
6451 * @constructor
6453 function HistoryItem() {}
6456 /** @type {string} */
6457 HistoryItem.prototype.id;
6460 /** @type {string} */
6461 HistoryItem.prototype.url;
6464 /** @type {string} */
6465 HistoryItem.prototype.title;
6468 /** @type {number} */
6469 HistoryItem.prototype.lastVisitTime;
6472 /** @type {number} */
6473 HistoryItem.prototype.visitCount;
6476 /** @type {number} */
6477 HistoryItem.prototype.typedCount;
6482 * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
6483 * @constructor
6485 function VisitItem() {}
6488 /** @type {string} */
6489 VisitItem.prototype.id;
6492 /** @type {string} */
6493 VisitItem.prototype.visitId;
6496 /** @type {number} */
6497 VisitItem.prototype.visitTime;
6500 /** @type {string} */
6501 VisitItem.prototype.referringVisitId;
6504 /** @type {string} */
6505 VisitItem.prototype.transition;
6510 * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
6511 * @constructor
6513 function FileHandlerExecuteEventDetails() {}
6516 /** @type {!Array.<!FileEntry>} */
6517 FileHandlerExecuteEventDetails.prototype.entries;
6520 /** @type {number|undefined} */
6521 FileHandlerExecuteEventDetails.prototype.tab_id;
6526 * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
6527 * @constructor
6529 function ChromeKeyboardEvent() {}
6532 /** @type {string} */
6533 ChromeKeyboardEvent.prototype.type;
6536 /** @type {string} */
6537 ChromeKeyboardEvent.prototype.requestId;
6540 /** @type {string|undefined} */
6541 ChromeKeyboardEvent.prototype.extensionId;
6544 /** @type {string} */
6545 ChromeKeyboardEvent.prototype.key;
6548 /** @type {string} */
6549 ChromeKeyboardEvent.prototype.code;
6552 /** @type {number|undefined} */
6553 ChromeKeyboardEvent.prototype.keyCode;
6556 /** @type {boolean|undefined} */
6557 ChromeKeyboardEvent.prototype.altKey;
6560 /** @type {boolean|undefined} */
6561 ChromeKeyboardEvent.prototype.ctrlKey;
6564 /** @type {boolean|undefined} */
6565 ChromeKeyboardEvent.prototype.shiftKey;
6568 /** @type {boolean|undefined} */
6569 ChromeKeyboardEvent.prototype.capsLock;
6574 * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
6575 * @constructor
6577 function InputContext() {}
6580 /** @type {number} */
6581 InputContext.prototype.contextID;
6584 /** @type {string} */
6585 InputContext.prototype.type;
6590 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
6591 * @constructor
6593 function ProxyServer() {}
6596 /** @type {string} */
6597 ProxyServer.prototype.scheme;
6600 /** @type {string} */
6601 ProxyServer.prototype.host;
6604 /** @type {number} */
6605 ProxyServer.prototype.port;
6610 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
6611 * @constructor
6613 function ProxyRules() {}
6616 /** @type {ProxyServer} */
6617 ProxyRules.prototype.singleProxy;
6620 /** @type {ProxyServer} */
6621 ProxyRules.prototype.proxyForHttp;
6624 /** @type {ProxyServer} */
6625 ProxyRules.prototype.proxyForHttps;
6628 /** @type {ProxyServer} */
6629 ProxyRules.prototype.proxyForFtp;
6632 /** @type {ProxyServer} */
6633 ProxyRules.prototype.fallbackProxy;
6636 /** @type {!Array.<string>} */
6637 ProxyRules.prototype.bypassList;
6642 * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
6643 * @constructor
6645 function PacScript() {}
6648 /** @type {string} */
6649 PacScript.prototype.url;
6652 /** @type {string} */
6653 PacScript.prototype.data;
6656 /** @type {boolean} */
6657 PacScript.prototype.mandatory;
6662 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
6663 * @constructor
6665 function ProxyConfig() {}
6668 /** @type {ProxyRules} */
6669 ProxyConfig.prototype.rules;
6672 /** @type {PacScript} */
6673 ProxyConfig.prototype.pacScript;
6676 /** @type {string} */
6677 ProxyConfig.prototype.mode;
6682 * The event listener for Storage receives an Object mapping each
6683 * key that changed to its corresponding StorageChange for that item.
6685 * @see https://developer.chrome.com/extensions/storage.html
6686 * @constructor
6688 function StorageChangeEvent() {}
6692 * @param {function(!Object.<string, !StorageChange>, string)} callback
6693 * Listener will receive an object that maps each key to its StorageChange,
6694 * and the namespace ("sync" or "local") of the storage area the changes
6695 * are for.
6697 StorageChangeEvent.prototype.addListener = function(callback) {};
6700 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6701 StorageChangeEvent.prototype.removeListener = function(callback) {};
6704 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6705 StorageChangeEvent.prototype.hasListener = function(callback) {};
6708 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6709 StorageChangeEvent.prototype.hasListeners = function(callback) {};
6714 * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
6715 * @constructor
6717 function StorageChange() {}
6720 /** @type {?} */
6721 StorageChange.prototype.oldValue;
6724 /** @type {?} */
6725 StorageChange.prototype.newValue;
6730 * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
6731 * @constructor
6733 function StorageArea() {}
6737 * Removes all items from storage.
6738 * @param {function(): void=} opt_callback Callback function.
6740 StorageArea.prototype.clear = function(opt_callback) {};
6744 * @param {(string|!Array.<string>|!Object|null)=} opt_keys
6745 * A single key to get, list of keys to get, or a dictionary
6746 * specifying default values (see description of the
6747 * object). An empty list or object will return an empty
6748 * result object. Pass in null to get the entire contents of storage.
6749 * @param {function(Object)=} opt_callback Callback with storage items, or null
6750 * on failure.
6752 StorageArea.prototype.get = function(opt_keys, opt_callback) {};
6756 * @param {(string|!Array.<string>)} keys
6757 * A single key or a list of keys for items to remove.
6758 * @param {function()=} opt_callback Callback.
6760 StorageArea.prototype.remove = function(keys, opt_callback) {};
6764 * @param {!Object.<string>} keys
6765 * Object specifying items to augment storage
6766 * with. Values that cannot be serialized (functions, etc) will be ignored.
6767 * @param {function()=} opt_callback Callback.
6769 StorageArea.prototype.set = function(keys, opt_callback) { };
6773 * @param {(string|!Array.<string>|null)=} opt_keys
6774 * A single key or list of keys to get the total usage for. An empty list
6775 * will return 0. Pass in null to get the total usage of all of storage.
6776 * @param {function(number)=} opt_callback
6777 * Callback with the amount of space being used by storage.
6779 StorageArea.prototype.getBytesInUse = function(opt_keys, opt_callback) { };
6784 * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
6785 * @constructor
6787 function ChromeSetting() {}
6791 * @param {Object} details Object with a 'scope' (string) key.
6792 * @param {function(): void=} opt_callback Callback function.
6794 ChromeSetting.prototype.clear = function(details, opt_callback) {};
6798 * @param {Object} details Object with an 'incognito' (boolean) key.
6799 * @param {function(Object.<string, *>): void} callback Callback function.
6801 ChromeSetting.prototype.get = function(details, callback) {};
6805 * @param {Object} details Object with a 'value' (*) key and an optional
6806 * 'scope' (string) key.
6807 * @param {function(): void=} opt_callback Callback function.
6809 ChromeSetting.prototype.set = function(details, opt_callback) {};
6814 * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
6815 * @constructor
6817 function RequestFilter() {}
6820 /** @type {!Array.<string>} */
6821 RequestFilter.prototype.urls;
6824 /** @type {!Array.<string>} */
6825 RequestFilter.prototype.types;
6828 /** @type {number} */
6829 RequestFilter.prototype.tabId;
6832 /** @type {number} */
6833 RequestFilter.prototype.windowId;
6838 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6839 * @constructor
6841 function HttpHeader() {}
6844 /** @type {string} */
6845 HttpHeader.prototype.name;
6848 /** @type {string} */
6849 HttpHeader.prototype.value;
6852 /** @type {!Array.<number>} */
6853 HttpHeader.prototype.binaryValue;
6857 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6858 * @typedef {Array.<!HttpHeader>}
6859 * @private
6861 var HttpHeaders_;
6866 * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
6867 * @constructor
6869 function BlockingResponse() {}
6872 /** @type {boolean} */
6873 BlockingResponse.prototype.cancel;
6876 /** @type {string} */
6877 BlockingResponse.prototype.redirectUrl;
6880 /** @type {!HttpHeaders_} */
6881 BlockingResponse.prototype.requestHeaders;
6884 /** @type {!HttpHeaders_} */
6885 BlockingResponse.prototype.responseHeaders;
6888 /** @type {Object.<string,string>} */
6889 BlockingResponse.prototype.authCredentials;
6894 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
6895 * @constructor
6897 chrome.pushMessaging.Message = function() {};
6901 * @type {number}
6903 chrome.pushMessaging.Message.prototype.subchannelId;
6907 * @type {string}
6909 chrome.pushMessaging.Message.prototype.payload;
6914 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
6915 * @constructor
6917 chrome.pushMessaging.ChannelIdResult = function() {};
6921 * @type {string}
6923 chrome.pushMessaging.ChannelIdResult.prototype.channelId;
6927 * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
6928 * defined in {@code javascript/externs/fileapi.js}.
6929 * @const
6930 * @see http://developer.chrome.com/apps/fileSystem.html
6932 chrome.fileSystem = {};
6936 * @param {!Entry} entry The entry to get the display path for. The entry can
6937 * originally be obtained through
6938 * {@code chrome.fileSystem.chooseEntry} or
6939 * {@code chrome.fileSystem.restoreEntry}.
6940 * @param {function(string)} callback A success callback.
6941 * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
6943 chrome.fileSystem.getDisplayPath = function(entry, callback) {};
6947 * @param {!Entry} entry The entry to get a writable entry for.
6948 * @param {function(!Entry)} callback A success callback.
6949 * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
6951 chrome.fileSystem.getWritableEntry = function(entry, callback) {};
6955 * @param {!Entry} entry The entry to query writability.
6956 * @param {function(boolean)} callback A success callback.
6957 * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
6959 chrome.fileSystem.isWritableEntry = function(entry, callback) {};
6963 * @typedef {{
6964 * description: (string|undefined),
6965 * mimeTypes: (!Array.<string>|undefined),
6966 * extensions: (!Array.<string>|undefined)
6967 * }}
6968 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6970 chrome.fileSystem.AcceptsOption;
6974 * @typedef {{
6975 * type: (string|undefined),
6976 * suggestedName: (string|undefined),
6977 * accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
6978 * acceptsAllTypes: (boolean|undefined),
6979 * acceptsMultiple: (boolean|undefined)
6980 * }}
6981 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6983 chrome.fileSystem.ChooseEntryOptions;
6987 * @typedef {?{
6988 * volumeId: string,
6989 * writable: (boolean|undefined)
6990 * }}
6991 * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6993 chrome.fileSystem.RequestFileSystemOptions;
6997 * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6998 * @constructor
7000 chrome.fileSystem.Volume = function() {};
7003 /** @type {string} */
7004 chrome.fileSystem.Volume.prototype.volumeId;
7007 /** @type {boolean} */
7008 chrome.fileSystem.Volume.prototype.writable;
7012 * @param {!chrome.fileSystem.ChooseEntryOptions|
7013 * function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
7014 * options for the file prompt or the callback.
7015 * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
7016 * callback, if arg1 is options.
7017 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
7019 chrome.fileSystem.chooseEntry = function(optionsOrCallback, opt_callback) {};
7023 * @param {string} id The ID of the file entry to restore.
7024 * @param {function(!Entry)} callback A success callback.
7025 * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
7027 chrome.fileSystem.restoreEntry = function(id, callback) {};
7031 * @param {string} id The ID of the file entry to query restorability.
7032 * @param {function(boolean)} callback A success callback.
7033 * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
7035 chrome.fileSystem.isRestorable = function(id, callback) {};
7039 * @param {!Entry} entry The entry to regain access to.
7040 * @return {string} The ID that can be passed to restoreEntry to regain access
7041 * to the given file entry.
7042 * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
7044 chrome.fileSystem.retainEntry = function(entry) {};
7048 * @param {!chrome.fileSystem.RequestFileSystemOptions} options Options for the
7049 * request.
7050 * @param {function(!FileSystem=)} callback A completion callback with the file
7051 * system in case of a success. Otherwise the error is passed as
7052 * chrome.runtime.lastError.
7053 * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
7055 chrome.fileSystem.requestFileSystem = function(options, callback) {};
7059 * @param {function(!Array<!chrome.fileSystem.Volume>=)} callback A completion
7060 * callback with the file system list in case of a success. Otherwise the
7061 * error is passed as chrome.runtime.lastError.
7062 * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
7064 chrome.fileSystem.getVolumeList = function(callback) {};
7068 * @const
7069 * @see https://developer.chrome.com/apps/syncFileSystem
7071 chrome.syncFileSystem = {};
7075 * Returns a syncable filesystem backed by Google Drive. The returned
7076 * DOMFileSystem instance can be operated on in the same way as
7077 * the Temporary and Persistant file systems (see
7078 * http://www.w3.org/TR/file-system-api/), except that the filesystem
7079 * object returned for Sync FileSystem does NOT support directory
7080 * operations (yet). You can get a list of file entries by reading
7081 * the root directory (by creating a new DirectoryReader),
7082 * but cannot create a new directory in it.
7084 * <p>Calling this multiple times from the same app will return the same
7085 * handle to the same file system.
7087 * <p>Note this call can fail. For example, if the user is not signed in
7088 * to Chrome or if there is no network operation. To handle these errors
7089 * it is important chrome.runtime.lastError is checked in the callback.
7091 * @param {function(!FileSystem)} callback A callback type for
7092 * requestFileSystem.
7093 * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
7095 chrome.syncFileSystem.requestFileSystem = function(callback) {};
7099 * Sets the default conflict resolution policy for the 'syncable' file
7100 * storage for the app. By default it is set to 'last_write_win'.
7101 * When conflict resolution policy is set to 'last_write_win' conflicts
7102 * for existing files are automatically resolved next time the file is updated.
7103 * {@code callback} can be optionally given to know if the request has
7104 * succeeded or not.
7106 * @param {string} policy Any of 'last_write_win' or 'manual'
7107 * @param {function()=} opt_callback
7109 * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
7111 chrome.syncFileSystem.setConflictResolutionPolicy =
7112 function(policy, opt_callback) {};
7116 * Gets the current conflict resolution policy.
7118 * @param {function(string)} callback Accepting any of 'last_write_win'
7119 * or 'manual'.
7120 * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
7122 chrome.syncFileSystem.getConflictResolutionPolicy = function(callback) {};
7126 * Returns the current usage and quota in bytes for the 'syncable' file
7127 * storage for the app.
7129 * @param {!FileSystem} fileSystem
7130 * @param {function(!Object)} callback Taking an object substantially similar
7131 * to {@code {'usageBytes': number, quotaBytes: number}}.
7132 * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
7134 chrome.syncFileSystem.getUsageAndQuota = function(fileSystem, callback) {};
7138 * Returns the FileStatus for the given fileEntry. The status value can be
7139 * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
7140 * happens when the service's conflict resolution policy is set to 'manual'.
7142 * @param {!Entry} fileEntry
7143 * @param {function(string)} callback Called with any of 'synced', 'pending'
7144 * or 'conflicting'.
7146 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
7148 chrome.syncFileSystem.getFileStatus = function(fileEntry, callback) {};
7152 * Returns each FileStatus for the given fileEntry array. Typically called
7153 * with the result from dirReader.readEntries().
7155 * @param {!Array.<!FileEntry>} fileEntries
7156 * @param {function(!Array.<!Object>)} callback Each object will look like:
7157 * {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
7159 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
7161 chrome.syncFileSystem.getFileStatuses = function(fileEntries, callback) {};
7165 * Since Chrome 31.
7167 * <p>Returns the current sync backend status.
7169 * @param {function(string)} callback Arg is any of 'initializing', 'running',
7170 * 'authentication_required', 'temporary_unavailable', or 'disabled'.
7172 * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
7174 chrome.syncFileSystem.getServiceStatus = function(callback) {};
7178 * Fired when an error or other status change has happened in the sync
7179 * backend (for example, when the sync is temporarily disabled due
7180 * to network or authentication error).
7182 * @type {!ChromeObjectEvent}
7184 * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
7186 chrome.syncFileSystem.onServiceStatusChanged;
7190 * Fired when a file has been updated by the background sync service.
7192 * @type {!ChromeObjectEvent}
7194 * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
7196 chrome.syncFileSystem.onFileStatusChanged;
7200 * @const
7201 * @see http://developer.chrome.com/extensions/alarms.html
7203 chrome.alarms = {};
7207 * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
7208 * is fired. If there is another alarm with the same name (or no name if none is
7209 * specified), it will be cancelled and replaced by this alarm.
7210 * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
7211 * the name to identify this alarm or the info used to create the alarm. If
7212 * no name is passed, the empty string is used to identify the alarm.
7213 * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
7214 * as arg1, the info used to create the alarm.
7215 * @see http://developer.chrome.com/extensions/alarms.html#method-create
7217 chrome.alarms.create = function(nameOrAlarmCreateInfo, opt_alarmInfo) {};
7221 * Retrieves details about the specified alarm.
7222 * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
7223 * of the alarm to get or the callback to invoke with the alarm. If no name
7224 * is passed, the empty string is used to get the alarm.
7225 * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
7226 * as arg1, the callback to invoke with the alarm.
7227 * @see http://developer.chrome.com/extensions/alarms.html#method-get
7229 chrome.alarms.get = function(nameOrCallback, opt_callback) {};
7233 * Gets an array of all the alarms.
7234 * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
7235 * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
7237 chrome.alarms.getAll = function(callback) {};
7241 * Clears the alarm with the given name.
7242 * @param {string=} opt_name
7243 * @param {function(boolean)=} opt_callback A callback that will be called with
7244 * a boolean for whether the alarm was cleared.
7245 * @see http://developer.chrome.com/extensions/alarms.html#method-clear
7247 chrome.alarms.clear = function(opt_name, opt_callback) {};
7251 * Clears all alarms.
7252 * @param {function(boolean)=} opt_callback A callback that will be called with
7253 * a boolean for whether the alarms were cleared.
7254 * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
7256 chrome.alarms.clearAll = function(opt_callback) {};
7260 * Fired when an alarm has elapsed. Useful for event pages.
7261 * @type {!chrome.alarms.AlarmEvent}
7262 * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
7264 chrome.alarms.onAlarm;
7269 * @constructor
7271 chrome.alarms.AlarmEvent = function() {};
7275 * @param {function(!chrome.alarms.Alarm): void} callback
7277 chrome.alarms.AlarmEvent.prototype.addListener = function(callback) {};
7281 * @param {function(!chrome.alarms.Alarm): void} callback
7283 chrome.alarms.AlarmEvent.prototype.removeListener = function(callback) {};
7287 * @param {function(!chrome.alarms.Alarm): void} callback
7288 * @return {boolean}
7290 chrome.alarms.AlarmEvent.prototype.hasListener = function(callback) {};
7294 * @return {boolean}
7296 chrome.alarms.AlarmEvent.prototype.hasListeners = function() {};
7301 * @interface
7302 * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
7304 chrome.alarms.Alarm = function() {};
7308 * Name of this alarm.
7309 * @type {string}
7311 chrome.alarms.Alarm.prototype.name;
7315 * Time at which this alarm was scheduled to fire, in milliseconds past the
7316 * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
7317 * delayed an arbitrary amount beyond this.
7318 * @type {number}
7320 chrome.alarms.Alarm.prototype.scheduledTime;
7324 * If not null, the alarm is a repeating alarm and will fire again in
7325 * periodInMinutes minutes.
7326 * @type {?number}
7328 chrome.alarms.Alarm.prototype.periodInMinutes;
7332 * @typedef {{
7333 * when: (number|undefined),
7334 * delayInMinutes: (number|undefined),
7335 * periodInMinutes: (number|undefined)
7336 * }}
7337 * @see http://developer.chrome.com/extensions/alarms.html#method-create
7339 chrome.alarms.AlarmCreateInfo;
7343 * @see https://developer.chrome.com/apps/hid
7344 * @const
7346 chrome.hid = {};
7350 * @typedef {?{
7351 * vendorId: number,
7352 * productId: number
7353 * }}
7354 * @see https://developer.chrome.com/apps/hid#method-getDevices
7356 chrome.hid.HidGetDevicesOptions;
7360 * @typedef {?{
7361 * usagePage: number,
7362 * usage: number,
7363 * reportIds: !Array.<number>
7364 * }}
7365 * @see https://developer.chrome.com/apps/hid#method-getDevices
7367 chrome.hid.HidDeviceUsage;
7371 * @typedef {?{
7372 * deviceId: number,
7373 * vendorId: number,
7374 * productId: number,
7375 * collections: !Array.<!chrome.hid.HidDeviceUsage>,
7376 * maxInputReportSize: number,
7377 * maxOutputReportSize: number,
7378 * maxFeatureReportSize: number
7379 * }}
7380 * @see https://developer.chrome.com/apps/hid#method-getDevices
7382 chrome.hid.HidDeviceInfo;
7386 * @typedef {?{
7387 * connectionId: number
7388 * }}
7389 * @see https://developer.chrome.com/apps/hid#method-connect
7391 chrome.hid.HidConnectInfo;
7395 * @see https://developer.chrome.com/apps/hid#method-getDevices
7396 * Enumerates all the connected HID devices specified by the
7397 * vendorId/productId/interfaceId tuple.
7398 * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
7399 * for on target devices.
7400 * @param {function(!Array.<!Object>)} callback Invoked with a list of
7401 * |HidDeviceInfo|s on complete.
7403 chrome.hid.getDevices = function(options, callback) {};
7407 * @see https://developer.chrome.com/apps/hid#method-connect
7408 * Opens a connection to a HID device for communication.
7409 * @param {number} deviceId The ID of the device to open.
7410 * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
7411 * connection succeeds, or undefined if it fails.
7413 chrome.hid.connect = function(deviceId, callback) {};
7417 * @see https://developer.chrome.com/apps/hid#method-disconnect
7418 * Disconnects from a device.
7419 * @param {number} connectionId The connection to close.
7420 * @param {function()=} opt_callback The callback to invoke once the connection
7421 * is closed.
7423 chrome.hid.disconnect = function(connectionId, opt_callback) {};
7427 * @see https://developer.chrome.com/apps/hid#method-receive
7428 * Receives an input report from an HID device.
7429 * @param {number} connectionId The connection from which to receive the report.
7430 * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
7431 * the received report.
7433 chrome.hid.receive = function(connectionId, callback) {};
7437 * @see https://developer.chrome.com/apps/hid#method-send
7438 * Sends an output report to an HID device.
7439 * @param {number} connectionId The connection to which to send the report.
7440 * @param {number} reportId The report ID to use, or 0 if none.
7441 * @param {!ArrayBuffer} data The report data.
7442 * @param {function()} callback The callback to invoke once the write is
7443 * finished.
7445 chrome.hid.send = function(connectionId, reportId, data, callback) {};
7449 * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
7450 * Receives a feature report from the device.
7451 * @param {number} connectionId The connection from which to read the feature
7452 * report.
7453 * @param {number} reportId The report ID to use, or 0 if none.
7454 * @param {number} size The size of the feature report to receive.
7455 * @param {function(!ArrayBuffer)} callback The callback to invoke with the
7456 * received report.
7458 chrome.hid.receiveFeatureReport =
7459 function(connectionId, reportId, size, callback) {};
7463 * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
7464 * Sends a feature report to the device.
7465 * @param {number} connectionId The connection to which to send the feature
7466 * report.
7467 * @param {number} reportId The report ID to use, or 0 if none.
7468 * @param {!ArrayBuffer} data The report data.
7469 * @param {function()} callback The callback to invoke once the write is
7470 * finished.
7472 chrome.hid.sendFeatureReport =
7473 function(connectionId, reportId, data, callback) {};
7477 * @see http://developer.chrome.com/extensions/notifications.html
7478 * @const
7480 chrome.notifications = {};
7484 * @typedef {{
7485 * title: string,
7486 * iconUrl: (string|undefined)
7487 * }}
7488 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7490 chrome.notifications.NotificationButton;
7494 * @typedef {{
7495 * title: string,
7496 * message: string
7497 * }}
7498 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7500 chrome.notifications.NotificationItem;
7504 * @typedef {{
7505 * type: (string|undefined),
7506 * iconUrl: (string|undefined),
7507 * title: (string|undefined),
7508 * message: (string|undefined),
7509 * contextMessage: (string|undefined),
7510 * priority: (number|undefined),
7511 * eventTime: (number|undefined),
7512 * buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
7513 * imageUrl: (string|undefined),
7514 * items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
7515 * progress: (number|undefined),
7516 * isClickable: (boolean|undefined)
7517 * }}
7518 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7520 chrome.notifications.NotificationOptions;
7524 * @typedef {function(boolean): void}
7525 * @see http://developer.chrome.com/extensions/notifications.html#method-update
7526 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7528 chrome.notifications.BooleanCallback;
7532 * @typedef {function(!Object): void}
7533 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7535 chrome.notifications.ObjectCallback;
7539 * @typedef {function(string, boolean): void}
7540 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7542 chrome.notifications.ClosedCallback;
7546 * @typedef {function(string, number): void}
7547 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7549 chrome.notifications.ButtonCallback;
7553 * @param {string|!chrome.notifications.NotificationOptions}
7554 * notificationIdOrOptions
7555 * @param {(!chrome.notifications.NotificationOptions|function(string): void)=}
7556 * opt_optionsOrCallback
7557 * @param {(function(string): void)=} opt_callback
7558 * @see http://developer.chrome.com/extensions/notifications.html#method-create
7560 chrome.notifications.create = function(notificationIdOrOptions,
7561 opt_optionsOrCallback, opt_callback) {};
7565 * @param {string} notificationId
7566 * @param {!chrome.notifications.NotificationOptions} options
7567 * @param {chrome.notifications.BooleanCallback=} opt_callback
7568 * @see http://developer.chrome.com/extensions/notifications.html#method-update
7570 chrome.notifications.update =
7571 function(notificationId, options, opt_callback) {};
7575 * @param {string} notificationId
7576 * @param {!chrome.notifications.BooleanCallback=} opt_callback
7577 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7579 chrome.notifications.clear = function(notificationId, opt_callback) {};
7583 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7584 * @param {!chrome.notifications.ObjectCallback} callback
7586 chrome.notifications.getAll = function(callback) {};
7590 * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
7591 * @param {function(string): void} callback takes 'granted' or 'denied'
7593 chrome.notifications.getPermissionLevel = function(callback) {};
7597 * @type {!chrome.notifications.ClosedEvent}
7598 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7600 chrome.notifications.onClosed;
7604 * The user clicked a non-button area of the notification. Callback receives a
7605 * notificationId.
7606 * @type {!ChromeStringEvent}
7607 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
7609 chrome.notifications.onClicked;
7613 * @type {!chrome.notifications.ButtonClickedEvent}
7614 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7616 chrome.notifications.onButtonClicked;
7620 * Indicates permission level change. Callback should expect 'granted' or
7621 * 'denied'.
7622 * @type {!ChromeStringEvent}
7623 * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
7625 chrome.notifications.onPermissionLevelChanged;
7629 * @type {!ChromeEvent}
7630 * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
7632 chrome.notifications.onShowSettings;
7637 * @interface
7638 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7640 chrome.notifications.ClosedEvent = function() {};
7644 * @param {!chrome.notifications.ClosedCallback} callback
7646 chrome.notifications.ClosedEvent.prototype.addListener = function(callback) {};
7650 * @param {!chrome.notifications.ClosedCallback} callback
7652 chrome.notifications.ClosedEvent.prototype.removeListener =
7653 function(callback) {};
7657 * @param {!chrome.notifications.ClosedCallback} callback
7658 * @return {boolean}
7660 chrome.notifications.ClosedEvent.prototype.hasListener = function(callback) {};
7664 * @return {boolean}
7666 chrome.notifications.ClosedEvent.prototype.hasListeners = function() {};
7671 * @interface
7672 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7674 chrome.notifications.ButtonClickedEvent = function() {};
7678 * @param {!chrome.notifications.ButtonCallback} callback
7680 chrome.notifications.ButtonClickedEvent.prototype.addListener =
7681 function(callback) {};
7685 * @param {!chrome.notifications.ButtonCallback} callback
7687 chrome.notifications.ButtonClickedEvent.prototype.removeListener =
7688 function(callback) {};
7692 * @param {!chrome.notifications.ButtonCallback} callback
7693 * @return {boolean}
7695 chrome.notifications.ButtonClickedEvent.prototype.hasListener =
7696 function(callback) {};
7700 * @return {boolean}
7702 chrome.notifications.ButtonClickedEvent.prototype.hasListeners = function() {};
7706 * @const
7707 * @see http://developer.chrome.com/apps/system_storage.html
7709 chrome.system.storage = {};
7713 /** @constructor */
7714 chrome.system.storage.StorageUnitInfo = function() {};
7717 /** @type {string} */
7718 chrome.system.storage.StorageUnitInfo.id;
7721 /** @type {string} */
7722 chrome.system.storage.StorageUnitInfo.name;
7725 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
7726 chrome.system.storage.StorageUnitInfo.type;
7729 /** @type {number} */
7730 chrome.system.storage.StorageUnitInfo.capacity;
7735 * Event whose listeners take a StorageUnitInfoEvent parameter.
7736 * @constructor
7738 chrome.system.storage.StorageUnitInfoEvent = function() {};
7741 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7742 chrome.system.storage.StorageUnitInfoEvent.prototype.addListener =
7743 function(callback) {};
7746 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7747 chrome.system.storage.StorageUnitInfoEvent.prototype.removeListener =
7748 function(callback) {};
7752 * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
7753 * @return {boolean}
7755 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListener =
7756 function(callback) {};
7759 /** @return {boolean} */
7760 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListeners =
7761 function() {};
7764 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
7765 chrome.system.storage.onAttached;
7768 /** @type {!ChromeStringEvent} */
7769 chrome.system.storage.onDetached;
7773 * Gets the storage information from the system.
7774 * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
7776 chrome.system.storage.getInfo = function(callback) {};
7780 * Ejects a removable storage device.
7781 * @param {string} id The transient device ID from StorageUnitInfo.
7782 * @param {function(string)} callback Callback function where the value
7783 * is any of: "success", "in_use", "no_such_device", "failure"
7785 chrome.system.storage.ejectDevice = function(id, callback) {};
7789 * Gets the available capacity of a specified storage device.
7790 * @param {string} id The transient device ID from StorageUnitInfo.
7791 * @param {function(Object.<string, number>)} callback A callback function that
7792 * accepts an object with {@code id} and {@code availableCapacity} fields.
7794 chrome.system.storage.getAvailableCapacity = function(id, callback) {};
7798 * @see http://developer.chrome.com/apps/usb.html
7799 * @const
7801 chrome.usb = {};
7805 /** @constructor */
7806 chrome.usb.Device = function Device() {};
7809 /** @type {number} */
7810 chrome.usb.Device.prototype.device;
7813 /** @type {number} */
7814 chrome.usb.Device.prototype.vendorId;
7817 /** @type {number} */
7818 chrome.usb.Device.prototype.productId;
7822 /** @constructor */
7823 chrome.usb.ConnectionHandle = function ConnectionHandle() {};
7826 /** @type {number} */
7827 chrome.usb.ConnectionHandle.prototype.handle;
7830 /** @type {number} */
7831 chrome.usb.ConnectionHandle.prototype.vendorId;
7834 /** @type {number} */
7835 chrome.usb.ConnectionHandle.prototype.productId;
7839 * @typedef {?{
7840 * direction: string,
7841 * endpoint: number,
7842 * length: (number|undefined),
7843 * data: (!ArrayBuffer|undefined)
7844 * }}
7846 chrome.usb.GenericTransferInfo;
7850 * @typedef {?{
7851 * direction: string,
7852 * recipient: string,
7853 * requestType: string,
7854 * request: number,
7855 * value: number,
7856 * index: number,
7857 * length: (number|undefined),
7858 * data: (!ArrayBuffer|undefined)
7859 * }}
7861 chrome.usb.ControlTransferInfo;
7865 /** @constructor */
7866 chrome.usb.TransferResultInfo = function() {};
7869 /** @type {number|undefined} */
7870 chrome.usb.TransferResultInfo.prototype.resultCode;
7873 /** @type {!ArrayBuffer|undefined} */
7874 chrome.usb.TransferResultInfo.prototype.data;
7878 * @typedef {?{
7879 * deviceId: number,
7880 * productId: number,
7881 * interfaceId: (number|undefined)
7882 * }}
7884 chrome.usb.FindDevicesOptions;
7888 * @see http://developer.chrome.com/apps/usb.html#method-getDevices
7889 * @param {!Object} options The properties to search for on target devices.
7890 * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
7891 * of |Device|s on complete.
7893 chrome.usb.getDevices = function(options, callback) {};
7897 * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
7898 * @param {!chrome.usb.Device} device The device to request access to.
7899 * @param {number} interfaceId
7900 * @param {function(boolean)} callback
7902 chrome.usb.requestAccess = function(device, interfaceId, callback) {};
7906 * @see http://developer.chrome.com/apps/usb.html#method-openDevice
7907 * @param {!chrome.usb.Device} device The device to open.
7908 * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
7909 * created ConnectionHandle on complete.
7911 chrome.usb.openDevice = function(device, callback) {};
7915 * @see http://developer.chrome.com/apps/usb.html#method-findDevices
7916 * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
7917 * on target devices.
7918 * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
7919 * with the opened ConnectionHandle on complete.
7921 chrome.usb.findDevices = function(options, callback) {};
7925 * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
7926 * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
7927 * @param {function()=} opt_callback The callback to invoke once the device is
7928 * closed.
7930 chrome.usb.closeDevice = function(handle, opt_callback) {};
7934 * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
7935 * @param {!chrome.usb.ConnectionHandle} handle The device from which the
7936 * interfaces should be listed.
7937 * @param {function(!Array.<!Object>)} callback
7938 * The callback to invoke when the interfaces are enumerated.
7940 chrome.usb.listInterfaces = function(handle, callback) {};
7944 * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
7945 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7946 * interface is to be claimed.
7947 * @param {number} interfaceNumber
7948 * @param {function()} callback The callback to invoke once the interface is
7949 * claimed.
7951 chrome.usb.claimInterface = function(handle, interfaceNumber, callback) {};
7955 * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
7956 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7957 * interface is to be released.
7958 * @param {number} interfaceNumber
7959 * @param {function()} callback The callback to invoke once the interface is
7960 * released.
7962 chrome.usb.releaseInterface = function(handle, interfaceNumber, callback) {};
7966 * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
7967 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7968 * interface settings are to be set.
7969 * @param {number} interfaceNumber
7970 * @param {number} alternateSetting The alternate setting to set.
7971 * @param {function()} callback The callback to invoke once the interface
7972 * setting is set.
7974 chrome.usb.setInterfaceAlternateSetting = function(
7975 handle, interfaceNumber, alternateSetting, callback) {};
7979 * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
7980 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7981 * transfer on.
7982 * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
7983 * transfer.
7984 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7985 * transfer has completed.
7987 chrome.usb.controlTransfer = function(handle, transferInfo, callback) {};
7991 * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
7992 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
7993 * the transfer on.
7994 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7995 * transfer. See GenericTransferInfo.
7996 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7997 * transfer has completed.
7999 chrome.usb.bulkTransfer = function(handle, transferInfo, callback) {};
8003 * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
8004 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
8005 * transfer on.
8006 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
8007 * transfer. See GenericTransferInfo.
8008 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
8009 * transfer has completed.
8011 chrome.usb.interruptTransfer = function(handle, transferInfo, callback) {};
8015 * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
8016 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
8017 * transfer on.
8018 * @param {!Object} transferInfo The parameters to the transfer. See
8019 * IsochronousTransferInfo.
8020 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
8021 * transfer has been completed.
8023 chrome.usb.isochronousTransfer = function(handle, transferInfo, callback) {};
8027 * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
8028 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
8029 * @param {function(boolean)} callback Invoked once the device is reset with a
8030 * boolean indicating whether the reset completed successfully.
8032 chrome.usb.resetDevice = function(handle, callback) {};
8036 * @see https://developer.chrome.com/apps/serial
8037 * @const
8039 chrome.serial = {};
8044 * @typedef {?{
8045 * persistent: (boolean|undefined),
8046 * name: (string|undefined),
8047 * bufferSize: (number|undefined),
8048 * bitRate: (number|undefined),
8049 * dataBits: (string|undefined),
8050 * parityBits: (string|undefined),
8051 * stopBits: (string|undefined),
8052 * ctsFlowControl: (boolean|undefined),
8053 * receiveTimeout: (number|undefined),
8054 * sendTimeout: (number|undefined)
8055 * }}
8056 * @see https://developer.chrome.com/apps/serial#type-ConnectionOptions
8058 chrome.serial.ConnectionOptions;
8062 * @typedef {?{
8063 * connectionId: number,
8064 * paused: boolean,
8065 * persistent: boolean,
8066 * name: string,
8067 * bufferSize: number,
8068 * receiveTimeout: number,
8069 * sendTimeout: number,
8070 * bitRate: (number|undefined),
8071 * dataBits: (string|undefined),
8072 * parityBits: (string|undefined),
8073 * stopBits: (string|undefined),
8074 * ctsFlowControl: (boolean|undefined)
8075 * }}
8076 * @see https://developer.chrome.com/apps/serial#type-ConnectionInfo
8078 chrome.serial.ConnectionInfo;
8082 * Returns information about available serial devices on the system. The
8083 * list is regenerated each time this method is called.
8084 * @param {function(!Array<!Object>)} callback Invoked with a
8085 * list of ports on complete.
8086 * @see https://developer.chrome.com/apps/serial#method-getDevices
8088 chrome.serial.getDevices = function(callback) {};
8092 * Connects to a given serial port.
8093 * @param {string} path The system path of the serial port to open.
8094 * @param {!chrome.serial.ConnectionOptions|
8095 * function(!chrome.serial.ConnectionInfo)} optionsOrCallback
8096 * Port configuration options, or the callback invoked with the created
8097 * ConnectionInfo on complete.
8098 * @param {function(!chrome.serial.ConnectionInfo)=} opt_callback Invoked with
8099 * the created ConnectionInfo on complete.
8100 * @see https://developer.chrome.com/apps/serial#method-connect
8102 chrome.serial.connect = function(path, optionsOrCallback, opt_callback) {};
8106 * Update the option settings on an open serial port connection.
8107 * @param {number} connectionId The id of the opened connection.
8108 * @param {!chrome.serial.ConnectionOptions} options Port configuration
8109 * options.
8110 * @param {function(boolean)} callback Called when the configuration has
8111 * completed.
8112 * @see https://developer.chrome.com/apps/serial#method-update
8114 chrome.serial.update = function(connectionId, options, callback) {};
8118 * Disconnects from a serial port.
8119 * @param {number} connectionId The id of the opened connection.
8120 * @param {function(boolean)} callback Called when the connection
8121 * has been closed.
8122 * @see https://developer.chrome.com/apps/serial#method-disconnect
8124 chrome.serial.disconnect = function(connectionId, callback) {};
8128 * Pauses or unpauses an open connection.
8129 * @param {number} connectionId The id of the opened connection.
8130 * @param {boolean} paused Flag to indicate whether to pause or unpause.
8131 * @param {function()} callback Called when the configuration has completed.
8132 * @see https://developer.chrome.com/apps/serial#method-setPaused
8134 chrome.serial.setPaused = function(connectionId, paused, callback) {};
8138 * Retrieves the state of a given connection.
8139 * @param {number} connectionId The id of the opened connection.
8140 * @param {function(!chrome.serial.ConnectionInfo)} callback
8141 * Called with connection state information when available.
8142 * @see https://developer.chrome.com/apps/serial#method-getInfo
8144 chrome.serial.getInfo = function(connectionId, callback) {};
8148 * Retrieves the list of currently opened serial port connections owned by
8149 * the application.
8150 * @param {function(!Array.<!chrome.serial.ConnectionInfo>)} callback
8151 * Called with the list of |ConnectionInfo|s when available.
8152 * @see https://developer.chrome.com/apps/serial#method-getConnections
8154 chrome.serial.getConnections = function(callback) {};
8158 * Writes data to the given connection.
8159 * @param {number} connectionId The id of the opened connection.
8160 * @param {!ArrayBuffer} data The data to send.
8161 * @param {function(!Object)} callback Called when the operation has
8162 * completed.
8163 * @see https://developer.chrome.com/apps/serial#method-send
8165 chrome.serial.send = function(connectionId, data, callback) {};
8169 * Flushes all bytes in the given connection's input and output buffers.
8170 * @param {number} connectionId The id of the opened connection.
8171 * @param {function(boolean)} callback
8172 * @see https://developer.chrome.com/apps/serial#method-flush
8174 chrome.serial.flush = function(connectionId, callback) {};
8180 * Retrieves the state of control signals on a given connection.
8181 * @param {number} connectionId The id of the opened connection.
8182 * @param {function(!Object)} callback
8183 * @see https://developer.chrome.com/apps/serial#method-getControlSignals
8185 chrome.serial.getControlSignals = function(connectionId, callback) {};
8189 * @typedef {?{
8190 * dtr: (boolean|undefined),
8191 * rts: (boolean|undefined)
8192 * }}
8194 chrome.serial.ControlSignals;
8198 * Sets the state of control signals on a given connection.
8199 * @param {number} connectionId The id of the opened connection.
8200 * @param {!chrome.serial.ControlSignals} signals
8201 * The set of signal changes to send to the device.
8202 * @param {function(boolean)} callback Called once the control signals
8203 * have been set.
8204 * @see https://developer.chrome.com/apps/serial#method-setControlSignals
8206 chrome.serial.setControlSignals = function(connectionId, signals, callback) {};
8210 * Event raised when data has been read from the connection.
8211 * @type {!ChromeObjectEvent}
8212 * @see https://developer.chrome.com/apps/serial#event-onReceive
8214 chrome.serial.onReceive;
8218 * Event raised when an error occurred while the runtime was waiting for
8219 * data on the serial port. Once this event is raised, the connection may
8220 * be set to paused. A "timeout" error does not pause the connection.
8221 * @type {!ChromeObjectEvent}
8222 * @see https://developer.chrome.com/apps/serial#event-onReceiveError
8224 chrome.serial.onReceiveError;
8228 * @const
8229 * @see https://developer.chrome.com/apps/webstore
8231 chrome.webstore = {};
8235 * @param {string|function()|function(string)=}
8236 * opt_urlOrSuccessCallbackOrFailureCallback Either the URL to install or
8237 * the succcess callback taking no arg or the failure callback taking an
8238 * error string arg.
8239 * @param {function()|function(string)=} opt_successCallbackOrFailureCallback
8240 * Either the succcess callback taking no arg or the failure callback
8241 * taking an error string arg.
8242 * @param {function(string)=} opt_failureCallback The failure callback.
8244 chrome.webstore.install = function(
8245 opt_urlOrSuccessCallbackOrFailureCallback,
8246 opt_successCallbackOrFailureCallback,
8247 opt_failureCallback) {};
8250 /** @type {!ChromeStringEvent} */
8251 chrome.webstore.onInstallStageChanged;
8254 /** @type {!ChromeNumberEvent} */
8255 chrome.webstore.onDownloadProgress;
8258 ////////////////////////////////////////////////////////////////////////////////
8259 /////////////////////////// Chrome Private APIs ////////////////////////////////
8260 ////////////////////////////////////////////////////////////////////////////////
8263 /** @const */
8264 chrome.screenlockPrivate = {};
8268 * @param {string} message Displayed on the unlock screen.
8270 chrome.screenlockPrivate.showMessage = function(message) {};
8274 * @param {function(boolean)} callback
8276 chrome.screenlockPrivate.getLocked = function(callback) {};
8280 * @param {boolean} locked If true and the screen is unlocked, locks the screen.
8281 * If false and the screen is locked, unlocks the screen.
8283 chrome.screenlockPrivate.setLocked = function(locked) {};
8286 /** @type {!ChromeBooleanEvent} */
8287 chrome.screenlockPrivate.onChanged;
8291 * @const
8293 chrome.musicManagerPrivate = {};
8297 * @param {function(string): void} callback
8299 chrome.musicManagerPrivate.getDeviceId = function(callback) {};
8303 * @const
8305 chrome.mediaGalleriesPrivate = {};
8309 * @typedef {function({deviceId: string, deviceName: string}): void}
8311 chrome.mediaGalleriesPrivate.DeviceCallback;
8315 * @typedef {function({galleryId: string}): void}
8317 chrome.mediaGalleriesPrivate.GalleryChangeCallback;
8321 * @typedef {function({galleryId: string, success: boolean}): void}
8323 chrome.mediaGalleriesPrivate.AddGalleryWatchCallback;
8327 * @param {string} galleryId
8328 * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
8330 chrome.mediaGalleriesPrivate.addGalleryWatch = function(galleryId, callback) {};
8334 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8335 * @deprecated Use {chrome.system.storage.onAttach}.
8337 chrome.mediaGalleriesPrivate.onDeviceAttached;
8341 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8342 * @deprecated Use {chrome.system.storage.onDetach}.
8344 chrome.mediaGalleriesPrivate.onDeviceDetached;
8348 * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
8350 chrome.mediaGalleriesPrivate.onGalleryChanged;
8355 * @interface
8356 * @deprecated Use {chrome.system.storage.DeviceEvent}.
8358 chrome.mediaGalleriesPrivate.DeviceEvent = function() {};
8362 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8363 * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
8365 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.addListener =
8366 function(callback) {};
8370 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8371 * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
8373 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.removeListener =
8374 function(callback) {};
8378 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8379 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
8381 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListener =
8382 function(callback) {};
8386 * @return {boolean}
8387 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
8389 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListeners =
8390 function(callback) {};
8395 * @interface
8397 chrome.mediaGalleriesPrivate.GalleryChangeEvent = function() {};
8401 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8403 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.addListener =
8404 function(callback) {};
8408 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8410 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.removeListener =
8411 function(callback) {};
8415 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8417 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListener =
8418 function(callback) {};
8422 * @return {boolean}
8424 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners =
8425 function() {};
8429 * Externs for networking_private.idl:
8430 * https://code.google.com/p/chromium/codesearch#chromium/src/extensions/common/api/networking_private.idl
8431 * WARNING(2015/04/09): This API is still under active development and has a few
8432 * issues with typing:
8434 * 1. This API uses the ONC specification:
8435 * http://www.chromium.org/chromium-os/chromiumos-design-docs/open-network-configuration
8436 * 2. The types for getProperties and getManagedProperties are not currently
8437 * defined. They correspond to ONC Property dictionaries. They are treated as
8438 * Objects rather than types.
8439 * 3. NetworkStateProperties defines a subset of NetworkProperties used by
8440 * getState and getNetworks. Since these match ONC property names they
8441 * use ONC PascalCase naming conventions instead of traditional JS
8442 * camelCase naming.
8443 * 4. The types for setProperties and createNetwork are not currently defined.
8444 * These use a subset of ONC properties and the complete set (and their
8445 * relationship to the type for getProperties) is still being determined.
8447 * Because of the above issues, this API should not be used as an example for
8448 * other APIs. Please contact stevenjb@ for questions on and maintenance.
8449 * @const
8450 * @see https://developer.chrome.com/extensions/networkingPrivate
8452 chrome.networkingPrivate = {};
8456 * @constructor
8457 * @struct
8458 * @see https://developer.chrome.com/extensions/networkingPrivate#type-CellularStateProperties
8460 chrome.networkingPrivate.CellularStateProperties = function() {};
8464 * @type {string|undefined}
8466 chrome.networkingPrivate.CellularStateProperties.prototype.ActivationState;
8470 * @type {string|undefined}
8472 chrome.networkingPrivate.CellularStateProperties.prototype.NetworkTechnology;
8476 * @type {string|undefined}
8478 chrome.networkingPrivate.CellularStateProperties.prototype.RoamingState;
8482 * @type {number|undefined}
8484 chrome.networkingPrivate.CellularStateProperties.prototype.SignalStrength;
8488 * @constructor
8489 * @struct
8490 * @see https://developer.chrome.com/extensions/networkingPrivate#type-DeviceStateProperties
8492 chrome.networkingPrivate.DeviceStateProperties = function() {};
8496 * @type {boolean|undefined}
8498 chrome.networkingPrivate.DeviceStateProperties.prototype.Scanning;
8502 * @type {string}
8504 chrome.networkingPrivate.DeviceStateProperties.prototype.State;
8508 * @type {string}
8510 chrome.networkingPrivate.DeviceStateProperties.prototype.Type;
8514 * @constructor
8515 * @struct
8516 * @see https://developer.chrome.com/extensions/networkingPrivate#type-EthernetStateProperties
8518 chrome.networkingPrivate.EthernetStateProperties = function() {};
8522 * @type {string}
8524 chrome.networkingPrivate.EthernetStateProperties.prototype.Authentication;
8528 * @constructor
8529 * @struct
8530 * @see https://developer.chrome.com/extensions/networkingPrivate#type-IPSecProperties
8532 chrome.networkingPrivate.IPSecProperties = function() {};
8536 * @type {string}
8538 chrome.networkingPrivate.IPSecProperties.prototype.AuthenticationType;
8542 * @constructor
8543 * @struct
8544 * @see https://developer.chrome.com/extensions/networkingPrivate#type-ThirdPartyVPNProperties
8546 chrome.networkingPrivate.ThirdPartyVPNProperties = function() {};
8550 * @type {string}
8552 chrome.networkingPrivate.ThirdPartyVPNProperties.prototype.ExtensionID;
8556 * @constructor
8557 * @struct
8558 * @see https://developer.chrome.com/extensions/networkingPrivate#type-VPNStateProperties
8560 chrome.networkingPrivate.VPNStateProperties = function() {};
8564 * @type {!chrome.networkingPrivate.IPSecProperties|undefined}
8566 chrome.networkingPrivate.VPNStateProperties.prototype.IPSec;
8570 * @type {!chrome.networkingPrivate.ThirdPartyVPNProperties|undefined}
8572 chrome.networkingPrivate.VPNStateProperties.prototype.ThirdPartyVPN;
8576 * @type {string}
8578 chrome.networkingPrivate.VPNStateProperties.prototype.Type;
8582 * @constructor
8583 * @struct
8584 * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8586 chrome.networkingPrivate.WiFiStateProperties = function() {};
8590 * @type {string}
8592 chrome.networkingPrivate.WiFiStateProperties.prototype.Security;
8596 * @type {number|undefined}
8598 chrome.networkingPrivate.WiFiStateProperties.prototype.SignalStrength;
8602 * @constructor
8603 * @struct
8604 * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8606 chrome.networkingPrivate.WiMAXStateProperties = function() {};
8610 * @type {number|undefined}
8612 chrome.networkingPrivate.WiMAXStateProperties.prototype.SignalStrength;
8616 * @typedef {?{
8617 * Cellular: (!chrome.networkingPrivate.CellularStateProperties|undefined),
8618 * Connectable: (boolean|undefined),
8619 * ConnectionState: (string|undefined),
8620 * ErrorState: (string|undefined),
8621 * Ethernet: (!chrome.networkingPrivate.EthernetStateProperties|undefined),
8622 * GUID: string,
8623 * Name: (string|undefined),
8624 * Priority: (number|undefined),
8625 * Source: (string|undefined),
8626 * Type: string,
8627 * VPN: (!chrome.networkingPrivate.VPNStateProperties|undefined),
8628 * WiFi: (!chrome.networkingPrivate.WiFiStateProperties|undefined),
8629 * WiMAX: (!chrome.networkingPrivate.WiMAXStateProperties|undefined)
8630 * }}
8632 chrome.networkingPrivate.NetworkStateProperties;
8636 * @typedef {?{
8637 * certificate: string,
8638 * intermediateCertificates: (!Array<string>|undefined),
8639 * publicKey: string,
8640 * nonce: string,
8641 * signedData: string,
8642 * deviceSerial: string,
8643 * deviceSsid: string,
8644 * deviceBssid: string
8645 * }}
8647 chrome.networkingPrivate.VerificationProperties;
8651 * @typedef {?{
8652 * networkType: string,
8653 * visible: (boolean|undefined),
8654 * configured: (boolean|undefined),
8655 * limit: (number|undefined)
8656 * }}
8658 chrome.networkingPrivate.NetworkFilter;
8662 * @param {string} guid
8663 * @param {function(!Object)} callback
8665 chrome.networkingPrivate.getProperties = function(guid, callback) {};
8669 * @param {string} guid
8670 * @param {function(!Object)} callback
8672 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {};
8676 * @param {string} guid
8677 * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback
8679 chrome.networkingPrivate.getState = function(guid, callback) {};
8683 * TODO: Use NetworkConfigProperties for |properties| once fully
8684 * defined.
8685 * @param {string} guid
8686 * @param {!Object} properties
8687 * @param {function()=} opt_callback
8689 chrome.networkingPrivate.setProperties =
8690 function(guid, properties, opt_callback) {};
8694 * TODO: Use NetworkConfigProperties for |properties| once fully
8695 * defined.
8696 * @param {boolean} shared
8697 * @param {!Object} properties
8698 * @param {function(string)=} opt_callback Returns guid of the configured
8699 * configuration.
8701 chrome.networkingPrivate.createNetwork =
8702 function(shared, properties, opt_callback) {};
8706 * @param {string} guid
8707 * @param {function()=} opt_callback Called when the operation has completed.
8709 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {};
8713 * @param {!chrome.networkingPrivate.NetworkFilter} filter
8714 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8715 * callback
8717 chrome.networkingPrivate.getNetworks = function(filter, callback) {};
8721 * @param {string} type
8722 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8723 * callback
8724 * @deprecated Use chrome.networkingPrivate.getNetworks with filter.visible=true
8726 chrome.networkingPrivate.getVisibleNetworks = function(type, callback) {};
8730 * @param {function(!Array.<string>)} callback
8731 * @deprecated Use chrome.networkingPrivate.getDeviceStates.
8733 chrome.networkingPrivate.getEnabledNetworkTypes = function(callback) {};
8737 * @param {function(!Array.<!chrome.networkingPrivate.DeviceStateProperties>)}
8738 * callback
8740 chrome.networkingPrivate.getDeviceStates = function(callback) {};
8743 /** @param {string} networkType */
8744 chrome.networkingPrivate.enableNetworkType = function(networkType) {};
8747 /** @param {string} networkType */
8748 chrome.networkingPrivate.disableNetworkType = function(networkType) {};
8752 * Requests that the networking subsystem scan for new networks and update the
8753 * list returned by getVisibleNetworks.
8755 chrome.networkingPrivate.requestNetworkScan = function() {};
8759 * @param {string} guid
8760 * @param {function()=} opt_callback
8762 chrome.networkingPrivate.startConnect = function(guid, opt_callback) {};
8766 * @param {string} guid
8767 * @param {function()=} opt_callback
8769 chrome.networkingPrivate.startDisconnect = function(guid, opt_callback) {};
8773 * @param {string} guid
8774 * @param {(string|function())=} opt_carrierOrCallback
8775 * @param {function()=} opt_callback
8777 chrome.networkingPrivate.startActivate =
8778 function(guid, opt_carrierOrCallback, opt_callback) {};
8782 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8783 * @param {function(boolean)} callback
8785 chrome.networkingPrivate.verifyDestination =
8786 function(verificationInfo, callback) {};
8790 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8791 * @param {string} guid
8792 * @param {function(string)} callback
8794 chrome.networkingPrivate.verifyAndEncryptCredentials =
8795 function(verificationInfo, guid, callback) {};
8799 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8800 * @param {string} data
8801 * @param {function(string)} callback
8803 chrome.networkingPrivate.verifyAndEncryptData =
8804 function(verificationInfo, data, callback) {};
8808 * @param {string} ipOrMacAddress
8809 * @param {boolean} enabled
8810 * @param {function(string)=} opt_callback
8812 chrome.networkingPrivate.setWifiTDLSEnabledState =
8813 function(ipOrMacAddress, enabled, opt_callback) {};
8817 * @param {string} ipOrMacAddress
8818 * @param {function(string)} callback
8820 chrome.networkingPrivate.getWifiTDLSStatus =
8821 function(ipOrMacAddress, callback) {};
8825 * @param {string} guid
8826 * @param {function(string)} callback
8828 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {};
8831 /** @type {!ChromeStringArrayEvent} */
8832 chrome.networkingPrivate.onNetworksChanged;
8835 /** @type {!ChromeStringArrayEvent} */
8836 chrome.networkingPrivate.onNetworkListChanged;
8839 /** @type {!ChromeStringStringEvent} */
8840 chrome.networkingPrivate.onPortalDetectionCompleted;
8844 * WARNING(2014/08/14): This API is still under active initial development and
8845 * unstable. The types are not well defined or documented, and this API
8846 * definition here should not be used as an example for other APIs added to this
8847 * file. Please contact mednik@ for questions on and maintenance for this API.
8848 * @const
8849 * @see http://goo.gl/afV8wB
8851 chrome.mdns = {};
8855 * Data type sent to the event handler of chrome.mdns.onServiceList.
8856 * @constructor
8858 chrome.mdns.MdnsService = function() {};
8861 /** @type {string} */
8862 chrome.mdns.MdnsService.prototype.serviceName;
8865 /** @type {string} */
8866 chrome.mdns.MdnsService.prototype.serviceHostPort;
8869 /** @type {string} */
8870 chrome.mdns.MdnsService.prototype.ipAddress;
8873 /** @type {!Array.<string>} */
8874 chrome.mdns.MdnsService.prototype.serviceData;
8878 * Event whose listeners take an array of MdnsService parameter.
8879 * @constructor
8881 chrome.mdns.ServiceListEvent = function() {};
8885 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8886 * @param {!Object=} opt_filter
8888 chrome.mdns.ServiceListEvent.prototype.addListener =
8889 function(callback, opt_filter) {};
8892 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
8893 chrome.mdns.ServiceListEvent.prototype.removeListener = function(callback) {};
8897 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8898 * @return {boolean}
8900 chrome.mdns.ServiceListEvent.prototype.hasListener = function(callback) {};
8903 /** @return {boolean} */
8904 chrome.mdns.ServiceListEvent.prototype.hasListeners = function() {};
8907 /** @type {!chrome.mdns.ServiceListEvent} */
8908 chrome.mdns.onServiceList;
8912 * @const
8913 * @see http://goo.gl/79p5h5
8915 chrome.gcdPrivate = {};
8919 * Represents a GCD device discovered locally or registered to a given user.
8920 * deviceId: Opaque device identifier to be passed to API.
8921 * setupType: How this device was discovered.
8922 * cloudId: Cloud identifier string.
8923 * deviceName: Device human readable name.
8924 * deviceType: Device type (camera, printer, etc).
8925 * deviceDescription: Device human readable description.
8926 * @typedef {?{
8927 * deviceId: string,
8928 * setupType: string,
8929 * cloudId: (string|undefined),
8930 * deviceType: string,
8931 * deviceName: string,
8932 * deviceDescription: string
8933 * }}
8935 chrome.gcdPrivate.Device;
8939 * Returns the list of cloud devices visible locally or available in the
8940 * cloud for user account.
8941 * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
8943 chrome.gcdPrivate.getCloudDeviceList = function(callback) {};
8947 * Queries network for local devices. Triggers onDeviceStateChanged and
8948 * onDeviceRemoved events. Call this function *only* after registering for
8949 * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
8951 chrome.gcdPrivate.queryForNewLocalDevices = function() {};
8955 * Cache the WiFi password in the browser process for use during
8956 * provisioning. This is done to allow the gathering of the wifi password to
8957 * not be done while connected to the device's network. Callback is called
8958 * with true if wifi password was cached and false if it was unavailable.
8959 * @param {string} ssid
8960 * @param {function(boolean): void} callback
8962 chrome.gcdPrivate.prefetchWifiPassword = function(ssid, callback) {};
8966 * Establish the session.
8967 * TODO(user): Deprecated. Remove after app updated to use createSession.
8968 * @param {string} ipAddress
8969 * @param {number} port
8970 * @param {function(number, string, !Array.<string>): void}
8971 * callback Called when the session is established or on error. 1st param,
8972 * |sessionId|, is the session ID (identifies the session for future calls).
8973 * 2nd param, |status|, is the status (success or type of error). 3rd param,
8974 * |pairingTypes|, is a list of pairing types supported by this device.
8976 chrome.gcdPrivate.establishSession = function(ipAddress, port, callback) {};
8980 * Create new pairing session.
8981 * @param {string} serviceName The mDNS service name of the device.
8982 * @param {function(number, string, !Array.<string>): void}
8983 * callback Called when the session is established or on error. 1st param,
8984 * |sessionId|, is the session ID (identifies the session for future calls).
8985 * 2nd param, |status|, is the status (success or type of error). 3rd param,
8986 * |pairingTypes|, is a list of pairing types supported by this device.
8988 chrome.gcdPrivate.createSession = function(serviceName, callback) {};
8992 * Start pairing with the selected method.
8993 * @param {number} sessionId
8994 * @param {string} pairingType
8995 * @param {function(string): void} callback
8997 chrome.gcdPrivate.startPairing = function(sessionId, pairingType, callback) {};
9001 * Confirm pairing code.
9002 * @param {number} sessionId
9003 * @param {string} code
9004 * @param {function(string): void} callback
9006 chrome.gcdPrivate.confirmCode = function(sessionId, code, callback) {};
9010 * Send an encrypted message to the device. If the message is a setup message
9011 * with a wifi ssid specified but no password, the password cached from
9012 * prefetchWifiPassword() will be used and the call will fail if it's not
9013 * available. For open networks use an empty string as the password.
9014 * @param {number} sessionId
9015 * @param {string} api The API path.
9016 * @param {!Object} input The input message to be sent over the encrypted
9017 * channel.
9018 * @param {function(string, ?Object): void} callback
9020 chrome.gcdPrivate.sendMessage = function(sessionId, api, input, callback) {};
9024 * Terminate the session with the device.
9025 * @param {number} sessionId
9027 chrome.gcdPrivate.terminateSession = function(sessionId) {};
9031 * Returns command definitions.
9032 * @param {string} deviceId The device to get command definitions for.
9033 * @param {function(!Object): void} callback The result callback.
9035 chrome.gcdPrivate.getCommandDefinitions = function(deviceId, callback) {};
9039 * Creates and sends a new command.
9040 * @param {string} deviceId The device to send the command to.
9041 * @param {number} expireInMs The number of milliseconds since now before the
9042 * command expires. An expired command should not be executed by the device.
9043 * Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
9044 * inclusive. All values outside that range will be replaced by 30 days.
9045 * @param {!Object} command Described at
9046 * https://developers.google.com/cloud-devices/v1/reference/commands.
9047 * @param {function(!Object): void} callback The result callback.
9049 chrome.gcdPrivate.insertCommand = function(
9050 deviceId, expireInMs, command, callback) {};
9054 * Returns a particular command.
9055 * @param {string} commandId Unique command ID.
9056 * @param {function(!Object): void} callback The result callback.
9058 chrome.gcdPrivate.getCommand = function(commandId, callback) {};
9062 * Cancels a command.
9063 * @param {string} commandId Unique command ID.
9064 * @param {function(!Object): void} callback The result callback.
9066 chrome.gcdPrivate.cancelCommand = function(commandId, callback) {};
9070 * Lists all commands in order of creation.
9071 * @param {string} deviceId The device to send the command to.
9072 * @param {string} byUser List all the commands issued by the user. Special
9073 * value 'me' can be used to list by the current user.
9074 * @param {string} state Command state.
9075 * @param {function(!Array.<!Object>): void} callback The result callback.
9077 chrome.gcdPrivate.getCommandsList = function(
9078 deviceId, byUser, state, callback) {};
9083 * Event whose listeners take a chrome.gcdPrivate.Device.
9084 * @constructor
9086 chrome.gcdPrivate.DeviceEvent = function() {};
9089 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
9090 chrome.gcdPrivate.DeviceEvent.prototype.addListener = function(callback) {};
9093 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
9094 chrome.gcdPrivate.DeviceEvent.prototype.removeListener = function(callback) {};
9098 * @param {function(!chrome.gcdPrivate.Device): void} callback
9099 * @return {boolean}
9101 chrome.gcdPrivate.DeviceEvent.prototype.hasListener = function(callback) {};
9104 /** @return {boolean} */
9105 chrome.gcdPrivate.DeviceEvent.prototype.hasListeners = function() {};
9109 * Fires when a device's state changes. When a listener is first added, this
9110 * event fires for all known devices on the network. Afterwards, it will fire
9111 * with device status updates.
9112 * @type {!chrome.gcdPrivate.DeviceEvent}
9114 chrome.gcdPrivate.onDeviceStateChanged;
9118 * Fires when a given device disappears.
9119 * |deviceId| The device that has disappeared.
9120 * @type {!ChromeStringEvent}
9122 chrome.gcdPrivate.onDeviceRemoved;
9126 * @const
9127 * @see http://goo.gl/bKHibo
9129 chrome.bluetoothPrivate = {};
9133 /** @constructor */
9134 chrome.bluetoothPrivate.PairingEvent = function() {};
9137 /** @type {string} */
9138 chrome.bluetoothPrivate.PairingEvent.prototype.pairing;
9141 /** @type {!chrome.bluetooth.Device} */
9142 chrome.bluetoothPrivate.PairingEvent.prototype.device;
9145 /** @type {string|undefined} */
9146 chrome.bluetoothPrivate.PairingEvent.prototype.pincode;
9149 /** @type {number|undefined} */
9150 chrome.bluetoothPrivate.PairingEvent.prototype.passkey;
9153 /** @type {number|undefined} */
9154 chrome.bluetoothPrivate.PairingEvent.prototype.enteredKey;
9158 * @typedef {{
9159 * name: (string|undefined),
9160 * powered: (boolean|undefined),
9161 * discoverable: (boolean|undefined)
9162 * }}
9164 chrome.bluetoothPrivate.NewAdapterState;
9168 * @typedef {{
9169 * device: !chrome.bluetooth.Device,
9170 * response: (string|undefined),
9171 * pincode: (string|undefined),
9172 * passkey: (number|undefined),
9173 * enteredKey: (number|undefined)
9174 * }}
9176 chrome.bluetoothPrivate.SetPairingResponseOptions;
9180 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
9181 * @param {function()} callback
9183 chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
9187 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
9188 * @param {function()} callback
9190 chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
9195 * Event whose listeners take a PairingEvent parameter.
9196 * @constructor
9198 chrome.bluetoothPrivate.PairingEventEvent = function() {};
9201 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
9202 chrome.bluetoothPrivate.PairingEventEvent.prototype.addListener =
9203 function(callback) {};
9206 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
9207 chrome.bluetoothPrivate.PairingEventEvent.prototype.removeListener =
9208 function(callback) {};
9212 * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
9213 * @return {boolean}
9215 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListener =
9216 function(callback) {};
9219 /** @return {boolean} */
9220 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListeners =
9221 function() {};
9224 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
9225 chrome.bluetoothPrivate.onPairing;
9230 * @const
9231 * @see http://goo.gl/XmVdHm
9233 chrome.inlineInstallPrivate = {};
9237 * Installs the given app ID.
9238 * @param {string} id
9239 * @param {function(string, string): void=} opt_callback Response callback that
9240 * returns two string: (1) an error string (or empty string on success) and
9241 * (2) an error code in case of error
9243 chrome.inlineInstallPrivate.install = function(id, opt_callback) {};