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
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.
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
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
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.
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
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
107 * * permissions: (!Array.<string>|undefined),
108 * * origins: (!Array.<string>|undefined)
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:
129 * chrome.extension.Port = function() {}
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.
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) {};
161 * * at-param {function(*, !chrome.runtime.MessageSender,
162 * * function(*): void): (boolean|undefined)} callback Callback.
163 * chrome.runtime.MessageSenderEvent.prototype.addListener =
164 * function(callback) {};
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
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.
179 * Private Chrome APIs (such as those that end in "Private") should go at the
180 * bottom of this file.
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}.
193 * Ensure projects don't execute this file.
194 * The throw is to catch executions of this file, however, without the guard,
195 * the compiler's flow analysis stops at the throw, even for an externs file.
196 * Therefore, the Math.random() guard fools the compiler during externs
199 if (Math.random() < 1) { // always true but the compiler doesn't know that
200 throw 'Externs file "chrome_extensions.js" should not be executed';
205 * @see https://developer.chrome.com/extensions/accessibilityFeatures
208 chrome.accessibilityFeatures = {};
211 /** @type {!ChromeSetting} */
212 chrome.accessibilityFeatures.spokenFeedback;
215 /** @type {!ChromeSetting} */
216 chrome.accessibilityFeatures.largeCursor;
219 /** @type {!ChromeSetting} */
220 chrome.accessibilityFeatures.stickyKeys;
223 /** @type {!ChromeSetting} */
224 chrome.accessibilityFeatures.highContrast;
227 /** @type {!ChromeSetting} */
228 chrome.accessibilityFeatures.screenMagnifier;
231 /** @type {!ChromeSetting} */
232 chrome.accessibilityFeatures.autoclick;
235 /** @type {!ChromeSetting} */
236 chrome.accessibilityFeatures.virtualKeyboard;
239 /** @type {!ChromeSetting} */
240 chrome.accessibilityFeatures.animationPolicy;
245 * @see http://developer.chrome.com/apps/app.runtime.html
247 chrome.app.runtime = {};
253 * @see http://developer.chrome.com/apps/app_runtime.html
255 chrome.app.runtime.LaunchItem = function() {};
258 /** @type {!FileEntry} */
259 chrome.app.runtime.LaunchItem.prototype.entry;
262 /** @type {string} */
263 chrome.app.runtime.LaunchItem.prototype.type;
269 * @see http://developer.chrome.com/apps/app_runtime.html
271 chrome.app.runtime.LaunchData = function() {};
274 /** @type {string|undefined} */
275 chrome.app.runtime.LaunchData.prototype.id;
278 /** @type {!Array.<!chrome.app.runtime.LaunchItem>|undefined} */
279 chrome.app.runtime.LaunchData.prototype.items;
282 /** @type {string|undefined} */
283 chrome.app.runtime.LaunchData.prototype.url;
286 /** @type {string|undefined} */
287 chrome.app.runtime.LaunchData.prototype.referrerUrl;
290 /** @type {boolean|undefined} */
291 chrome.app.runtime.LaunchData.prototype.isKioskSession;
296 * The type of chrome.app.runtime.onLaunched.
299 chrome.app.runtime.LaunchEvent = function() {};
303 * @param {function(!chrome.app.runtime.LaunchData)} callback
304 * @see http://developer.chrome.com/apps/app.runtime.html#event-onLaunched
306 chrome.app.runtime.LaunchEvent.prototype.addListener = function(callback) {};
310 * @param {function(!chrome.app.runtime.LaunchData)} callback
312 chrome.app.runtime.LaunchEvent.prototype.removeListener = function(callback) {};
316 * @param {function(!chrome.app.runtime.LaunchData)} callback
319 chrome.app.runtime.LaunchEvent.prototype.hasListener = function(callback) {};
325 chrome.app.runtime.LaunchEvent.prototype.hasListeners = function() {};
328 /** @type {!chrome.app.runtime.LaunchEvent} */
329 chrome.app.runtime.onLaunched;
333 * @type {!ChromeEvent}
334 * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
336 chrome.app.runtime.onRestarted;
341 * @see http://developer.chrome.com/apps/app.window.html
343 chrome.app.window = {};
347 * @see https://developer.chrome.com/apps/app_window#method-getAll
348 * @return {!Array.<!chrome.app.window.AppWindow>}
350 chrome.app.window.getAll = function() {};
354 * @see https://developer.chrome.com/apps/app_window#method-get
356 * @return {chrome.app.window.AppWindow}
358 chrome.app.window.get = function(id) {};
364 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
366 chrome.app.window.AppWindow = function() {};
370 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
372 chrome.app.window.AppWindow.prototype.focus = function() {};
376 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
378 chrome.app.window.AppWindow.prototype.fullscreen = function() {};
383 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
385 chrome.app.window.AppWindow.prototype.isFullscreen = function() {};
389 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
391 chrome.app.window.AppWindow.prototype.minimize = function() {};
396 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
398 chrome.app.window.AppWindow.prototype.isMinimized = function() {};
402 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
404 chrome.app.window.AppWindow.prototype.maximize = function() {};
409 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
411 chrome.app.window.AppWindow.prototype.isMaximized = function() {};
415 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
417 chrome.app.window.AppWindow.prototype.restore = function() {};
421 * @param {number} left The new left position, in pixels.
422 * @param {number} top The new top position, in pixels.
423 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
425 chrome.app.window.AppWindow.prototype.moveTo = function(left, top) {};
429 * @param {number} width The new width, in pixels.
430 * @param {number} height The new height, in pixels.
431 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
433 chrome.app.window.AppWindow.prototype.resizeTo = function(width, height) {};
437 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
439 chrome.app.window.AppWindow.prototype.drawAttention = function() {};
443 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
445 chrome.app.window.AppWindow.prototype.clearAttention = function() {};
449 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
451 chrome.app.window.AppWindow.prototype.close = function() {};
455 * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
456 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
458 chrome.app.window.AppWindow.prototype.show = function(opt_focus) {};
462 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
464 chrome.app.window.AppWindow.prototype.hide = function() {};
468 * @return {!chrome.app.window.Bounds} The current window bounds.
469 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
471 chrome.app.window.AppWindow.prototype.getBounds = function() {};
475 * @param {!chrome.app.window.Bounds} bounds The new window bounds.
476 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
478 chrome.app.window.AppWindow.prototype.setBounds = function(bounds) {};
483 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
485 chrome.app.window.AppWindow.prototype.isAlwaysOnTop = function() {};
489 * @param {boolean} alwaysOnTop Set whether the window should stay above most
491 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
493 chrome.app.window.AppWindow.prototype.setAlwaysOnTop = function(alwaysOnTop) {};
496 /** @type {!ChromeEvent} */
497 chrome.app.window.AppWindow.prototype.onBoundsChanged;
500 /** @type {!ChromeEvent} */
501 chrome.app.window.AppWindow.prototype.onClosed;
504 /** @type {!ChromeEvent} */
505 chrome.app.window.AppWindow.prototype.onFullscreened;
508 /** @type {!ChromeEvent} */
509 chrome.app.window.AppWindow.prototype.onMinimized;
512 /** @type {!ChromeEvent} */
513 chrome.app.window.AppWindow.prototype.onMaximized;
516 /** @type {!ChromeEvent} */
517 chrome.app.window.AppWindow.prototype.onRestored;
520 /** @type {!Window} */
521 chrome.app.window.AppWindow.prototype.contentWindow;
526 * left: (number|undefined),
527 * top: (number|undefined),
528 * width: (number|undefined),
529 * height: (number|undefined)
531 * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
533 chrome.app.window.Bounds;
538 * id: (string|undefined),
539 * minWidth: (number|undefined),
540 * minHeight: (number|undefined),
541 * maxWidth: (number|undefined),
542 * maxHeight: (number|undefined),
543 * frame: (string|undefined),
544 * bounds: (!chrome.app.window.Bounds|undefined),
545 * transparentBackground: (boolean|undefined),
546 * state: (string|undefined),
547 * hidden: (boolean|undefined),
548 * resizable: (boolean|undefined),
549 * alwaysOnTop: (boolean|undefined),
550 * focused: (boolean|undefined)
552 * @see http://developer.chrome.com/apps/app.window.html#method-create
554 chrome.app.window.CreateWindowOptions;
558 * @param {string} url URL to create.
559 * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
561 * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
562 * Callback to be run.
563 * @see http://developer.chrome.com/apps/app.window.html#method-create
565 chrome.app.window.create = function(
566 url, opt_options, opt_createWindowCallback) {};
570 * Returns an AppWindow object for the current script context (ie JavaScript
572 * @return {!chrome.app.window.AppWindow}
573 * @see http://developer.chrome.com/apps/app.window.html#method-current
575 chrome.app.window.current = function() {};
579 * @type {!ChromeEvent}
580 * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
582 chrome.app.window.onBoundsChanged;
586 * @type {!ChromeEvent}
587 * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
589 chrome.app.window.onClosed;
593 * @type {!ChromeEvent}
594 * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
596 chrome.app.window.onFullscreened;
600 * @type {!ChromeEvent}
601 * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
603 chrome.app.window.onMaximized;
607 * @type {!ChromeEvent}
608 * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
610 chrome.app.window.onMinimized;
614 * @type {!ChromeEvent}
615 * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
617 chrome.app.window.onRestored;
624 * @see https://code.google.com/p/chromium/codesearch#chromium/src/chrome/common/extensions/api/audio_modem.idl
625 * @see go/chrome-modem
627 chrome.audioModem = {};
632 * tokenLength: number,
633 * crc: (boolean|undefined),
634 * parity: (boolean|undefined)
637 chrome.audioModem.TokenEncoding;
642 * timeoutMillis: number,
644 * encoding: !chrome.audioModem.TokenEncoding
647 chrome.audioModem.RequestParams;
651 chrome.audioModem.ReceivedToken = function() {};
654 /** @type {!ArrayBuffer} */
655 chrome.audioModem.ReceivedToken.prototype.token;
658 /** @type {string} */
659 chrome.audioModem.ReceivedToken.prototype.band;
663 * @param {!chrome.audioModem.RequestParams} params
664 * @param {!ArrayBuffer} token
665 * @param {function(string)} callback
667 chrome.audioModem.transmit = function(params, token, callback) {};
671 * @param {string} band
672 * @param {function(string)} callback
674 chrome.audioModem.stopTransmit = function(band, callback) {};
678 * @param {!chrome.audioModem.RequestParams} params
679 * @param {function(string)} callback
681 chrome.audioModem.receive = function(params, callback) {};
685 * @param {string} band
686 * @param {function(string)} callback
688 chrome.audioModem.stopReceive = function(band, callback) {};
692 chrome.audioModem.ReceivedEvent = function() {};
696 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
698 chrome.audioModem.ReceivedEvent.prototype.addListener = function(callback) {};
702 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
704 chrome.audioModem.ReceivedEvent.prototype.removeListener =
705 function(callback) {};
709 * @param {function(!Array<!chrome.audioModem.ReceivedToken>)} callback
712 chrome.audioModem.ReceivedEvent.prototype.hasListener = function(callback) {};
718 chrome.audioModem.ReceivedEvent.prototype.hasListeners = function() {};
721 /** @type {!chrome.audioModem.ReceivedEvent} */
722 chrome.audioModem.onReceived;
725 /** @type {!ChromeStringEvent} */
726 chrome.audioModem.onTransmitFail;
731 * @see https://developer.chrome.com/apps/bluetooth
733 chrome.bluetooth = function() {};
739 * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
741 chrome.bluetooth.AdapterState = function() {};
744 /** @type {string} */
745 chrome.bluetooth.AdapterState.prototype.address;
748 /** @type {string} */
749 chrome.bluetooth.AdapterState.prototype.name;
752 /** @type {boolean} */
753 chrome.bluetooth.AdapterState.prototype.powered;
756 /** @type {boolean} */
757 chrome.bluetooth.AdapterState.prototype.available;
760 /** @type {boolean} */
761 chrome.bluetooth.AdapterState.prototype.discovering;
767 * @see https://developer.chrome.com/apps/bluetooth#type-Device
769 chrome.bluetooth.Device = function() {};
772 /** @type {string} */
773 chrome.bluetooth.Device.prototype.address;
776 /** @type {string|undefined} */
777 chrome.bluetooth.Device.prototype.name;
780 /** @type {number|undefined} */
781 chrome.bluetooth.Device.prototype.deviceClass;
784 /** @type {string|undefined} */
785 chrome.bluetooth.Device.prototype.vendorIdSource;
788 /** @type {string|undefined} */
789 chrome.bluetooth.Device.prototype.vendorId;
792 /** @type {number|undefined} */
793 chrome.bluetooth.Device.prototype.productId;
796 /** @type {number|undefined} */
797 chrome.bluetooth.Device.prototype.deviceId;
800 /** @type {string|undefined} */
801 chrome.bluetooth.Device.prototype.type;
804 /** @type {boolean|undefined} */
805 chrome.bluetooth.Device.prototype.paired;
808 /** @type {boolean|undefined} */
809 chrome.bluetooth.Device.prototype.connected;
812 /** @type {!Array.<string>|undefined} */
813 chrome.bluetooth.Device.prototype.uuids;
817 * @param {function(!chrome.bluetooth.AdapterState)} callback
818 * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
820 chrome.bluetooth.getAdapterState = function(callback) {};
824 * @param {string} deviceAddress
825 * @param {function(!chrome.bluetooth.Device)} callback
826 * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
828 chrome.bluetooth.getDevice = function(deviceAddress, callback) {};
832 * @param {function(!Array.<!chrome.bluetooth.Device>)} callback
833 * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
835 chrome.bluetooth.getDevices = function(callback) {};
839 * @param {function()=} opt_callback
840 * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
842 chrome.bluetooth.startDiscovery = function(opt_callback) {};
846 * @param {function()=} opt_callback
847 * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
849 chrome.bluetooth.stopDiscovery = function(opt_callback) {};
854 * Event whose listeners take an AdapaterState parameter.
857 chrome.bluetooth.AdapterStateEvent = function() {};
860 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
861 chrome.bluetooth.AdapterStateEvent.prototype.addListener =
862 function(callback) {};
865 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
866 chrome.bluetooth.AdapterStateEvent.prototype.removeListener =
867 function(callback) {};
871 * @param {function(!chrome.bluetooth.AdapterState): void} callback
874 chrome.bluetooth.AdapterStateEvent.prototype.hasListener =
875 function(callback) {};
878 /** @return {boolean} */
879 chrome.bluetooth.AdapterStateEvent.prototype.hasListeners = function() {};
883 * @type {!chrome.bluetooth.AdapterStateEvent}
884 * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
886 chrome.bluetooth.onAdapterStateChanged;
891 * Event whose listeners take an Device parameter.
894 chrome.bluetooth.DeviceEvent = function() {};
897 /** @param {function(!chrome.bluetooth.Device): void} callback */
898 chrome.bluetooth.DeviceEvent.prototype.addListener = function(callback) {};
901 /** @param {function(!chrome.bluetooth.Device): void} callback */
902 chrome.bluetooth.DeviceEvent.prototype.removeListener = function(callback) {};
906 * @param {function(!chrome.bluetooth.Device): void} callback
909 chrome.bluetooth.DeviceEvent.prototype.hasListener = function(callback) {};
912 /** @return {boolean} */
913 chrome.bluetooth.DeviceEvent.prototype.hasListeners = function() {};
917 * @type {!chrome.bluetooth.DeviceEvent}
918 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
920 chrome.bluetooth.onDeviceAdded;
924 * @type {!chrome.bluetooth.DeviceEvent}
925 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
927 chrome.bluetooth.onDeviceChanged;
931 * @type {!chrome.bluetooth.DeviceEvent}
932 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
934 chrome.bluetooth.onDeviceRemoved;
939 * @see https://developer.chrome.com/apps/bluetoothSocket
941 chrome.bluetoothSocket = {};
946 * persistent: (boolean|undefined),
947 * name: (string|undefined),
948 * bufferSize: (number|undefined)
950 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
952 chrome.bluetoothSocket.SocketProperties;
957 * channel: (number|undefined),
958 * psm: (number|undefined),
959 * backlog: (number|undefined)
961 * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
963 chrome.bluetoothSocket.ListenOptions;
969 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
971 chrome.bluetoothSocket.SocketInfo = function() {};
974 /** @type {number} */
975 chrome.bluetoothSocket.SocketInfo.prototype.socketId;
978 /** @type {boolean} */
979 chrome.bluetoothSocket.SocketInfo.prototype.persistent;
982 /** @type {string|undefined} */
983 chrome.bluetoothSocket.SocketInfo.prototype.name;
986 /** @type {number|undefined} */
987 chrome.bluetoothSocket.SocketInfo.prototype.bufferSize;
990 /** @type {boolean} */
991 chrome.bluetoothSocket.SocketInfo.prototype.paused;
994 /** @type {boolean} */
995 chrome.bluetoothSocket.SocketInfo.prototype.connected;
998 /** @type {string|undefined} */
999 chrome.bluetoothSocket.SocketInfo.prototype.address;
1002 /** @type {string|undefined} */
1003 chrome.bluetoothSocket.SocketInfo.prototype.uuid;
1007 * @param {!chrome.bluetoothSocket.SocketProperties|
1008 * function(!{socketId: number})} propertiesOrCallback
1009 * @param {function(!{socketId: number})=} opt_callback
1010 * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
1012 chrome.bluetoothSocket.create = function(propertiesOrCallback, opt_callback) {};
1016 * @param {number} socketId
1017 * @param {!chrome.bluetoothSocket.SocketProperties} properties
1018 * @param {function()=} opt_callback
1019 * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
1021 chrome.bluetoothSocket.update = function(socketId, properties, opt_callback) {};
1025 * @param {number} socketId
1026 * @param {boolean} paused
1027 * @param {function()=} opt_callback
1028 * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
1030 chrome.bluetoothSocket.setPaused = function(socketId, paused, opt_callback) {};
1034 * @param {number} socketId
1035 * @param {string} uuid
1036 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1037 * @param {function()=} opt_callback
1038 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingRfcomm
1040 chrome.bluetoothSocket.listenUsingRfcomm =
1041 function(socketId, uuid, optionsOrCallback, opt_callback) {};
1045 * @param {number} socketId
1046 * @param {string} uuid
1047 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
1048 * @param {function()=} opt_callback
1049 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
1051 chrome.bluetoothSocket.listenUsingL2cap =
1052 function(socketId, uuid, optionsOrCallback, opt_callback) {};
1056 * @param {number} socketId
1057 * @param {string} address
1058 * @param {string} uuid
1059 * @param {function()} callback
1060 * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
1062 chrome.bluetoothSocket.connect = function(socketId, address, uuid, callback) {};
1066 * @param {number} socketId
1067 * @param {function()=} opt_callback
1068 * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
1070 chrome.bluetoothSocket.disconnect = function(socketId, opt_callback) {};
1074 * @param {number} socketId
1075 * @param {function()=} opt_callback
1076 * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
1078 chrome.bluetoothSocket.close = function(socketId, opt_callback) {};
1082 * @param {number} socketId
1083 * @param {!ArrayBuffer} data
1084 * @param {function(number)=} opt_callback
1085 * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
1087 chrome.bluetoothSocket.send = function(socketId, data, opt_callback) {};
1091 * @param {number} socketId
1092 * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
1093 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
1095 chrome.bluetoothSocket.getInfo = function(socketId, callback) {};
1099 * @param {function(!Array.<!chrome.bluetoothSocket.SocketInfo>)} callback
1100 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
1102 chrome.bluetoothSocket.getSockets = function(callback) {};
1108 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
1110 chrome.bluetoothSocket.AcceptEventData = function() {};
1113 /** @type {number} */
1114 chrome.bluetoothSocket.AcceptEventData.prototype.socketId;
1117 /** @type {number} */
1118 chrome.bluetoothSocket.AcceptEventData.prototype.clientSocketId;
1123 * Event whose listeners take a AcceptEventData parameter.
1126 chrome.bluetoothSocket.AcceptEvent = function() {};
1130 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1132 chrome.bluetoothSocket.AcceptEvent.prototype.addListener =
1133 function(callback) {};
1137 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1139 chrome.bluetoothSocket.AcceptEvent.prototype.removeListener =
1140 function(callback) {};
1144 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
1147 chrome.bluetoothSocket.AcceptEvent.prototype.hasListener =
1148 function(callback) {};
1151 /** @return {boolean} */
1152 chrome.bluetoothSocket.AcceptEvent.prototype.hasListeners = function() {};
1155 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
1156 chrome.bluetoothSocket.onAccept;
1162 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
1164 chrome.bluetoothSocket.AcceptErrorEventData = function() {};
1167 /** @type {number} */
1168 chrome.bluetoothSocket.AcceptErrorEventData.prototype.socketId;
1171 /** @type {string} */
1172 chrome.bluetoothSocket.AcceptErrorEventData.prototype.errorMessage;
1175 /** @type {string} */
1176 chrome.bluetoothSocket.AcceptErrorEventData.prototype.error;
1181 * Event whose listeners take a AcceptErrorEventData parameter.
1184 chrome.bluetoothSocket.AcceptErrorEvent = function() {};
1189 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1191 chrome.bluetoothSocket.AcceptErrorEvent.prototype.addListener =
1192 function(callback) {};
1197 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1199 chrome.bluetoothSocket.AcceptErrorEvent.prototype.removeListener =
1200 function(callback) {};
1205 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1208 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListener =
1209 function(callback) {};
1212 /** @return {boolean} */
1213 chrome.bluetoothSocket.AcceptErrorEvent.prototype.hasListeners =
1217 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1218 chrome.bluetoothSocket.onAcceptError;
1224 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1226 chrome.bluetoothSocket.ReceiveEventData = function() {};
1229 /** @type {number} */
1230 chrome.bluetoothSocket.ReceiveEventData.prototype.socketId;
1233 /** @type {!ArrayBuffer} */
1234 chrome.bluetoothSocket.ReceiveEventData.prototype.data;
1239 * Event whose listeners take a ReceiveEventData parameter.
1242 chrome.bluetoothSocket.ReceiveEvent = function() {};
1246 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1248 chrome.bluetoothSocket.ReceiveEvent.prototype.addListener =
1249 function(callback) {};
1253 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1255 chrome.bluetoothSocket.ReceiveEvent.prototype.removeListener =
1256 function(callback) {};
1260 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1263 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListener =
1264 function(callback) {};
1267 /** @return {boolean} */
1268 chrome.bluetoothSocket.ReceiveEvent.prototype.hasListeners = function() {};
1271 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1272 chrome.bluetoothSocket.onReceive;
1278 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1280 chrome.bluetoothSocket.ReceiveErrorEventData = function() {};
1283 /** @type {number} */
1284 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.socketId;
1287 /** @type {string} */
1288 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.errorMessage;
1291 /** @type {string} */
1292 chrome.bluetoothSocket.ReceiveErrorEventData.prototype.error;
1297 * Event whose listeners take a ReceiveErrorEventData parameter.
1300 chrome.bluetoothSocket.ReceiveErrorEvent = function() {};
1305 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1307 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.addListener =
1308 function(callback) {};
1313 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1315 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.removeListener =
1316 function(callback) {};
1321 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1324 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListener =
1325 function(callback) {};
1328 /** @return {boolean} */
1329 chrome.bluetoothSocket.ReceiveErrorEvent.prototype.hasListeners =
1333 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1334 chrome.bluetoothSocket.onReceiveError;
1338 * @see https://developer.chrome.com/apps/bluetoothLowEnergy
1341 chrome.bluetoothLowEnergy = {};
1346 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Service
1348 chrome.bluetoothLowEnergy.Service = function() {};
1351 /** @type {string} */
1352 chrome.bluetoothLowEnergy.Service.prototype.uuid;
1355 /** @type {boolean} */
1356 chrome.bluetoothLowEnergy.Service.prototype.isPrimary;
1359 /** @type {string|undefined} */
1360 chrome.bluetoothLowEnergy.Service.prototype.instanceId;
1363 /** @type {string|undefined} */
1364 chrome.bluetoothLowEnergy.Service.prototype.deviceAddress;
1369 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Characteristic
1371 chrome.bluetoothLowEnergy.Characteristic = function() {};
1374 /** @type {string} */
1375 chrome.bluetoothLowEnergy.Characteristic.prototype.uuid;
1378 /** @type {!chrome.bluetoothLowEnergy.Service} */
1379 chrome.bluetoothLowEnergy.Characteristic.prototype.service;
1382 /** @type {!Array.<string>} */
1383 chrome.bluetoothLowEnergy.Characteristic.prototype.properties;
1386 /** @type {string|undefined} */
1387 chrome.bluetoothLowEnergy.Characteristic.prototype.instanceId;
1390 /** @type {!ArrayBuffer|undefined} */
1391 chrome.bluetoothLowEnergy.Characteristic.prototype.value;
1396 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#type-Descriptor
1398 chrome.bluetoothLowEnergy.Descriptor = function() {};
1400 /** @type {string} */
1401 chrome.bluetoothLowEnergy.Descriptor.prototype.uuid;
1404 /** @type {!chrome.bluetoothLowEnergy.Characteristic} */
1405 chrome.bluetoothLowEnergy.Descriptor.prototype.characteristic;
1408 /** @type {string|undefined} */
1409 chrome.bluetoothLowEnergy.Descriptor.prototype.instanceId;
1412 /** @type {!ArrayBuffer|undefined} */
1413 chrome.bluetoothLowEnergy.Descriptor.prototype.value;
1418 * persistent: boolean
1421 chrome.bluetoothLowEnergy.ConnectionProperties;
1425 * @param {string} deviceAddress
1426 * @param {!chrome.bluetoothLowEnergy.ConnectionProperties|function()}
1427 * propertiesOrCallback
1428 * @param {function()=} opt_callback
1429 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-connect
1431 chrome.bluetoothLowEnergy.connect =
1432 function(deviceAddress, propertiesOrCallback, opt_callback) {};
1435 * @param {string} deviceAddress
1436 * @param {function()=} opt_callback
1437 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-disconnect
1439 chrome.bluetoothLowEnergy.disconnect = function(deviceAddress, opt_callback) {};
1443 * @param {string} serviceId
1444 * @param {function(!chrome.bluetoothLowEnergy.Service)} callback
1445 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getService
1447 chrome.bluetoothLowEnergy.getService = function(serviceId, callback) {};
1451 * @param {string} deviceAddress
1452 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1453 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getServices
1455 chrome.bluetoothLowEnergy.getServices = function(deviceAddress, callback) {};
1459 * @param {string} characteristicId
1460 * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1461 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristic
1463 chrome.bluetoothLowEnergy.getCharacteristic =
1464 function(characteristicId, callback) {};
1468 * @param {string} serviceId
1469 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Characteristic>)}
1471 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getCharacteristics
1473 chrome.bluetoothLowEnergy.getCharacteristics =
1474 function(serviceId, callback) {};
1478 * @param {string} serviceId
1479 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Service>)} callback
1480 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getIncludedServices
1482 chrome.bluetoothLowEnergy.getIncludedServices =
1483 function(serviceId, callback) {};
1487 * @param {string} descriptorId
1488 * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1489 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptor
1491 chrome.bluetoothLowEnergy.getDescriptor = function(descriptorId, callback) {};
1495 * @param {string} characteristicId
1496 * @param {function(!Array.<!chrome.bluetoothLowEnergy.Descriptor>)} callback
1497 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-getDescriptors
1499 chrome.bluetoothLowEnergy.getDescriptors =
1500 function(characteristicId, callback) {};
1504 * @param {string} characteristicId
1505 * @param {function(!chrome.bluetoothLowEnergy.Characteristic)} callback
1506 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readCharacteristicValue
1508 chrome.bluetoothLowEnergy.readCharacteristicValue =
1509 function(characteristicId, callback) {};
1513 * @param {string} characteristicId
1514 * @param {!ArrayBuffer} value
1515 * @param {function()} callback
1516 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeCharacteristicValue
1518 chrome.bluetoothLowEnergy.writeCharacteristicValue =
1519 function(characteristicId, value, callback) {};
1524 * persistent: boolean
1527 chrome.bluetoothLowEnergy.NotificationSessionProperties;
1530 * @param {string} characteristicId
1531 * @param {!chrome.bluetoothLowEnergy.NotificationSessionProperties|function()}
1532 * propertiesOrCallback
1533 * @param {function()=} opt_callback
1534 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-startCharacteristicNotifications
1536 chrome.bluetoothLowEnergy.startCharacteristicNotifications =
1537 function(characteristicId, propertiesOrCallback, opt_callback) {};
1541 * @param {string} characteristicId
1542 * @param {function()=} opt_callback
1543 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-stopCharacteristicNotifications
1545 chrome.bluetoothLowEnergy.stopCharacteristicNotifications =
1546 function(characteristicId, opt_callback) {};
1550 * @param {string} descriptorId
1551 * @param {function(!chrome.bluetoothLowEnergy.Descriptor)} callback
1552 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-readDescriptorValue
1554 chrome.bluetoothLowEnergy.readDescriptorValue =
1555 function(descriptorId, callback) {};
1559 * @param {string} descriptorId
1560 * @param {!ArrayBuffer} value
1561 * @param {function()} callback
1562 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#method-writeDescriptorValue
1564 chrome.bluetoothLowEnergy.writeDescriptorValue =
1565 function(descriptorId, value, callback) {};
1569 * Event whose listeners take a Service parameter.
1572 chrome.bluetoothLowEnergy.ServiceEvent = function() {};
1575 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1576 chrome.bluetoothLowEnergy.ServiceEvent.prototype.addListener =
1577 function(callback) {};
1580 /** @param {function(!chrome.bluetoothLowEnergy.Service): void} callback */
1581 chrome.bluetoothLowEnergy.ServiceEvent.prototype.removeListener =
1582 function(callback) {};
1585 * @param {function(!chrome.bluetoothLowEnergy.Service): void} callback
1588 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListener =
1589 function(callback) {};
1592 /** @return {boolean} */
1593 chrome.bluetoothLowEnergy.ServiceEvent.prototype.hasListeners =
1597 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1598 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceAdded
1600 chrome.bluetoothLowEnergy.onServiceAdded;
1604 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1605 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceChanged
1607 chrome.bluetoothLowEnergy.onServiceChanged;
1611 * @type {!chrome.bluetoothLowEnergy.ServiceEvent}
1612 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onServiceRemoved
1614 chrome.bluetoothLowEnergy.onServiceRemoved;
1618 * Event whose listeners take a Characteristic parameter.
1621 chrome.bluetoothLowEnergy.CharacteristicEvent = function() {};
1625 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1628 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.addListener =
1629 function(callback) {};
1633 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1636 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.removeListener =
1637 function(callback) {};
1641 * @param {function(!chrome.bluetoothLowEnergy.Characteristic): void}
1645 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListener =
1646 function(callback) {};
1649 /** @return {boolean} */
1650 chrome.bluetoothLowEnergy.CharacteristicEvent.prototype.hasListeners =
1655 * @type {!chrome.bluetoothLowEnergy.CharacteristicEvent}
1656 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onCharacteristicValueChanged
1658 chrome.bluetoothLowEnergy.onCharacteristicValueChanged;
1662 * Event whose listeners take a Characteristic parameter.
1665 chrome.bluetoothLowEnergy.DescriptorEvent = function() {};
1669 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1672 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.addListener =
1673 function(callback) {};
1677 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void}
1680 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.removeListener =
1681 function(callback) {};
1685 * @param {function(!chrome.bluetoothLowEnergy.Descriptor): void} callback
1688 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListener =
1689 function(callback) {};
1692 /** @return {boolean} */
1693 chrome.bluetoothLowEnergy.DescriptorEvent.prototype.hasListeners =
1698 * @type {!chrome.bluetoothLowEnergy.DescriptorEvent}
1699 * @see https://developer.chrome.com/apps/bluetoothLowEnergy#event-onDescriptorValueChanged
1701 chrome.bluetoothLowEnergy.onDescriptorValueChanged;
1705 * @see http://developer.chrome.com/extensions/commands.html
1708 chrome.commands = {};
1712 * @param {function(Array.<string>): void} callback Callback function.
1714 chrome.commands.getAll = function(callback) {};
1717 /** @type {!ChromeEvent} */
1718 chrome.commands.onCommand;
1722 * @see https://developer.chrome.com/apps/copresence
1725 chrome.copresence = {};
1730 * lowPower: (boolean|undefined),
1731 * onlyBroadcast: (boolean|undefined),
1732 * onlyScan: (boolean|undefined),
1733 * audible: (boolean|undefined)
1735 * @see https://developer.chrome.com/apps/copresence#type-Strategy
1737 chrome.copresence.Strategy;
1743 * payload: ArrayBuffer
1745 * @see https://developer.chrome.com/apps/copresence#type-Message
1747 chrome.copresence.Message;
1752 * onlyEarshot: (boolean|undefined)
1754 * https://developer.chrome.com/apps/copresence#type-AccessPolicy
1756 chrome.copresence.AccessPolicy;
1762 * message: !chrome.copresence.Message,
1763 * timeToLiveMillis: (number|undefined),
1764 * policy: (!chrome.copresence.AccessPolicy|undefined),
1765 * strategies: (!chrome.copresence.Strategy|undefined)
1767 * @see https://developer.chrome.com/apps/copresence#type-PublishOperation
1769 chrome.copresence.PublishOperation;
1772 /** @typedef {?{type: string}} */
1773 chrome.copresence.SubscriptionFilter;
1779 * filter: !chrome.copresence.SubscriptionFilter,
1780 * timeToLiveMillis: (number|undefined),
1781 * strategies: (!chrome.copresence.Strategy|undefined)
1783 * @see https://developer.chrome.com/apps/copresence#type-SubscribeOperation
1785 chrome.copresence.SubscribeOperation;
1790 * unpublishId: string
1792 * @see https://developer.chrome.com/apps/copresence#type-UnpublishOperation
1794 chrome.copresence.UnpublishOperation;
1799 * unsubscribeId: string
1801 * @see https://developer.chrome.com/apps/copresence#type-UnsubscribeOperation
1803 chrome.copresence.UnsubscribeOperation;
1808 * publish: (!chrome.copresence.PublishOperation|undefined),
1809 * subscribe: (!chrome.copresence.SubscribeOperation|undefined),
1810 * unpublish: (!chrome.copresence.UnpublishOperation|undefined),
1811 * unsubscribe: (!chrome.copresence.UnsubscribeOperation|undefined)
1813 * @see https://developer.chrome.com/apps/copresence#type-Operation
1815 chrome.copresence.Operation;
1819 * @param {!Array.<!chrome.copresence.Operation>} operations
1820 * @param {function(string): void} callback
1821 * @see https://developer.chrome.com/apps/copresence#method-execute
1823 chrome.copresence.execute = function(operations, callback) {};
1828 * Event whose listeners take a subscription id and received messages as a
1831 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1833 chrome.copresence.MessagesReceivedEvent = function() {};
1837 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1839 chrome.copresence.MessagesReceivedEvent.prototype.addListener =
1840 function(callback) {};
1844 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1846 chrome.copresence.MessagesReceivedEvent.prototype.removeListener =
1847 function(callback) {};
1851 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1854 chrome.copresence.MessagesReceivedEvent.prototype.hasListener =
1855 function(callback) {};
1858 /** @return {boolean} */
1859 chrome.copresence.MessagesReceivedEvent.prototype.hasListeners = function() {};
1863 * @type {!chrome.copresence.MessagesReceivedEvent}
1864 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1866 chrome.copresence.onMessagesReceived;
1870 * @type {!ChromeStringEvent}
1871 * @see https://developer.chrome.com/apps/copresence#event-onStatusUpdated
1873 chrome.copresence.onStatusUpdated;
1877 * @see https://developer.chrome.com/extensions/enterprise_platformKeys
1880 chrome.enterprise = {};
1885 * platformKeys allows for generating hardware-backed keys and the installation
1886 * of certificates for these keys.
1887 * @see https://developer.chrome.com/extensions/enterprise_platformKeys.
1889 chrome.enterprise.platformKeys = function() {};
1894 * @see https://developer.chrome.com/extensions/enterprise_platformKeys#type-Token
1896 chrome.enterprise.Token = function() {};
1900 * @type {string} Unique id for the Token, either "user" or "system."
1902 chrome.enterprise.Token.prototype.id;
1906 * @type {!webCrypto.SubtleCrypto} Implements the WebCrypto's
1907 * SubtleCrypto interface. The cryptographic operations, including key
1908 * generation, are hardware-backed.
1910 chrome.enterprise.Token.prototype.subtleCrypto;
1914 * @param {function(!Array.<!chrome.enterprise.Token>): void} callback Called
1915 * with an array of Tokens.
1917 chrome.enterprise.platformKeys.getTokens = function(callback) {};
1921 * @param {string} tokenId Id of cetificate token either "user" or "system".
1922 * @param {(function(!Array.<!ArrayBuffer>): void)} callback Array of DER
1923 * encoded x.509 certificates.
1925 chrome.enterprise.platformKeys.getCertificates = function(tokenId, callback) {};
1929 * @param {string} tokenId The id of a Token returned by getTokens.
1930 * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1931 * @param {function(): void=} opt_callback Called back when this operation is
1934 chrome.enterprise.platformKeys.importCertificate =
1935 function(tokenId, certificate, opt_callback) {};
1939 * @param {string} tokenId The id of a Token returned by getTokens.
1940 * @param {!ArrayBuffer} certificate The DER encoding of a X.509 certificate.
1941 * @param {(function(): void)=} opt_callback Called back when this operation is
1944 chrome.enterprise.platformKeys.removeCertificate =
1945 function(tokenId, certificate, opt_callback) {};
1949 * @see https://developer.chrome.com/extensions/extension.html
1952 chrome.extension = {};
1955 /** @type {!Object|undefined} */
1956 chrome.extension.lastError = {};
1960 * @type {string|undefined}
1962 chrome.extension.lastError.message;
1965 /** @type {boolean|undefined} */
1966 chrome.extension.inIncognitoContext;
1969 // TODO: change Object to !Object when it's clear nobody is passing in null
1970 // TODO: change Port to !Port since it should never be null
1972 * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
1973 * extensionId to connect to, in which case connectInfo params can be
1974 * passed in the next optional argument, or the connectInfo params.
1975 * @param {Object.<string>=} opt_connectInfo The connectInfo object,
1976 * if arg1 was the extensionId to connect to.
1977 * @return {Port} New port.
1979 chrome.extension.connect = function(
1980 opt_extensionIdOrConnectInfo, opt_connectInfo) {};
1984 * @return {Window} The global JS object for the background page.
1986 chrome.extension.getBackgroundPage = function() {};
1990 * @param {string} path A path to a resource within an extension expressed
1991 * relative to it's install directory.
1992 * @return {string} The fully-qualified URL to the resource.
1994 chrome.extension.getURL = function(path) {};
1998 * @param {Object=} opt_fetchProperties An object with optional 'type' and
1999 * optional 'windowId' keys.
2000 * @return {Array.<Window>} The global JS objects for each content view.
2002 chrome.extension.getViews = function(opt_fetchProperties) {};
2006 * @param {function(boolean): void} callback Callback function.
2008 chrome.extension.isAllowedFileSchemeAccess = function(callback) {};
2012 * @param {function(boolean): void} callback Callback function.
2014 chrome.extension.isAllowedIncognitoAccess = function(callback) {};
2018 * @param {string|*} extensionIdOrRequest Either the extensionId to send the
2019 * request to, in which case the request is passed as the next arg, or the
2021 * @param {*=} opt_request The request value, if arg1 was the extensionId.
2022 * @param {function(*): void=} opt_callback The callback function which
2023 * takes a JSON response object sent by the handler of the request.
2025 chrome.extension.sendMessage = function(
2026 extensionIdOrRequest, opt_request, opt_callback) {};
2030 * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
2031 * in which case the request is passed as the next arg, or the request.
2032 * @param {*=} opt_request The request value, if arg1 was the extensionId.
2033 * @param {function(*): void=} opt_callback The callback function which
2034 * takes a JSON response object sent by the handler of the request.
2036 chrome.extension.sendRequest = function(opt_arg1, opt_request, opt_callback) {};
2040 * @param {string} data
2042 chrome.extension.setUpdateUrlData = function(data) {};
2045 /** @type {!ChromeEvent} */
2046 chrome.extension.onConnect;
2049 /** @type {!ChromeEvent} */
2050 chrome.extension.onConnectExternal;
2053 /** @type {!ChromeEvent} */
2054 chrome.extension.onMessage;
2057 /** @type {!ChromeEvent} */
2058 chrome.extension.onRequest;
2061 /** @type {!ChromeEvent} */
2062 chrome.extension.onRequestExternal;
2066 /** @type {string} */
2071 * @param {function(!Window=): void} callback Callback function.
2073 chrome.runtime.getBackgroundPage = function(callback) {};
2077 * @param {function(): void=} opt_callback Callback function.
2079 chrome.runtime.openOptionsPage = function(opt_callback) {};
2083 * Manifest information returned from chrome.runtime.getManifest. See
2084 * http://developer.chrome.com/extensions/manifest.html. Note that there are
2085 * several other fields not included here. They should be added to these externs
2089 chrome.runtime.Manifest = function() {};
2092 /** @type {string} */
2093 chrome.runtime.Manifest.prototype.name;
2096 /** @type {string} */
2097 chrome.runtime.Manifest.prototype.version;
2100 /** @type {number|undefined} */
2101 chrome.runtime.Manifest.prototype.manifest_version;
2104 /** @type {string|undefined} */
2105 chrome.runtime.Manifest.prototype.description;
2108 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
2109 chrome.runtime.Manifest.prototype.oauth2;
2112 /** @type {!Array.<(string|!Object)>} */
2113 chrome.runtime.Manifest.prototype.permissions;
2118 * Oauth2 info in the manifest.
2119 * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
2122 chrome.runtime.Manifest.Oauth2 = function() {};
2125 /** @type {string} */
2126 chrome.runtime.Manifest.Oauth2.prototype.client_id;
2129 /**@type {!Array.<string>} */
2130 chrome.runtime.Manifest.Oauth2.prototype.scopes;
2134 * http://developer.chrome.com/extensions/runtime.html#method-getManifest
2135 * @return {!chrome.runtime.Manifest} The full manifest file of the app or
2138 chrome.runtime.getManifest = function() {};
2142 * @param {string} path A path to a resource within an extension expressed
2143 * relative to it's install directory.
2144 * @return {string} The fully-qualified URL to the resource.
2146 chrome.runtime.getURL = function(path) {};
2150 * @param {string} url This may be used to clean up server-side data, do
2151 * analytics, and implement surveys. Maximum 255 characters.
2153 chrome.runtime.setUninstallUrl = function(url) {};
2157 * Reloads the app or extension.
2159 chrome.runtime.reload = function() {};
2163 * @param {function(string, !Object=): void} callback Called with "throttled",
2164 * "no_update", or "update_available". If an update is available, the object
2165 * contains more information about the available update.
2167 chrome.runtime.requestUpdateCheck = function(callback) {};
2171 * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
2174 chrome.runtime.restart = function() {};
2179 * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
2180 * @param {string} application Name of the registered native messaging host to
2181 * connect to, like 'com.google.your_product'.
2182 * @return {!Port} New port.
2184 chrome.runtime.connectNative = function(application) {};
2188 * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
2189 * @param {string} application Name of the registered native messaging host to
2190 * connect to, like 'com.google.your_product'.
2191 * @param {Object} message The message that will be passed to the native
2193 * @param {function(*)=} opt_callback Called with the response message sent by
2194 * the native messaging host. If an error occurs while connecting to the
2195 * native messaging host, the callback will be called with no arguments and
2196 * chrome.runtime.lastError will be set to the error message.
2198 chrome.runtime.sendNativeMessage = function(
2199 application, message, opt_callback) {};
2204 * @param {function(!Object)} callback
2206 chrome.runtime.getPlatformInfo = function(callback) {};
2210 * @param {function(!DirectoryEntry)} callback
2212 chrome.runtime.getPackageDirectoryEntry = function(callback) {};
2215 /** @type {!chrome.runtime.PortEvent} */
2216 chrome.runtime.onConnect;
2219 /** @type {!chrome.runtime.PortEvent} */
2220 chrome.runtime.onConnectExternal;
2223 /** @type {!ChromeObjectEvent} */
2224 chrome.runtime.onInstalled;
2227 /** @type {!chrome.runtime.MessageSenderEvent} */
2228 chrome.runtime.onMessage;
2231 /** @type {!chrome.runtime.MessageSenderEvent} */
2232 chrome.runtime.onMessageExternal;
2235 /** @type {!ChromeEvent} */
2236 chrome.runtime.onStartup;
2239 /** @type {!ChromeEvent} */
2240 chrome.runtime.onSuspend;
2243 /** @type {!ChromeEvent} */
2244 chrome.runtime.onSuspendCanceled;
2247 /** @type {!ChromeObjectEvent} */
2248 chrome.runtime.onUpdateAvailable;
2251 /** @type {!ChromeStringEvent} */
2252 chrome.runtime.onRestartRequired;
2257 * Event whose listeners take a Port parameter.
2260 chrome.runtime.PortEvent = function() {};
2264 * @param {function(!Port): void} callback Callback.
2266 chrome.runtime.PortEvent.prototype.addListener = function(callback) {};
2270 * @param {function(!Port): void} callback Callback.
2272 chrome.runtime.PortEvent.prototype.removeListener = function(callback) {};
2276 * @param {function(!Port): void} callback Callback.
2279 chrome.runtime.PortEvent.prototype.hasListener = function(callback) {};
2285 chrome.runtime.PortEvent.prototype.hasListeners = function() {};
2290 * Event whose listeners take a MessageSender and additional parameters.
2291 * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
2294 chrome.runtime.MessageSenderEvent = function() {};
2298 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2299 * callback Callback.
2301 chrome.runtime.MessageSenderEvent.prototype.addListener = function(callback) {};
2305 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2306 * callback Callback.
2308 chrome.runtime.MessageSenderEvent.prototype.removeListener = function(callback)
2313 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
2314 * callback Callback.
2317 chrome.runtime.MessageSenderEvent.prototype.hasListener = function(callback) {};
2323 chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
2328 * @see https://developer.chrome.com/extensions/tabs.html
2335 * code: (string|undefined),
2336 * file: (string|undefined),
2337 * allFrames: (boolean|undefined),
2338 * matchAboutBlank: (boolean|undefined),
2339 * runAt: (string|undefined)
2342 chrome.tabs.InjectDetails;
2346 * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
2347 * @param {number|!chrome.types.ImageDetails|function(string):void}
2348 * windowIdOrOptionsOrCallback One of:
2349 * The target window.
2350 * An object defining details about the format and quality of an image, in
2351 * which case the window defaults to the current window.
2352 * A callback function which accepts the data URL string of a JPEG encoding
2353 * of the visible area of the captured tab.
2354 * @param {(!chrome.types.ImageDetails|function(string):void)=}
2355 * opt_optionsOrCallback Either an object defining details about the
2356 * format and quality of an image, or a callback function which accepts the
2357 * data URL string of a JPEG encoding of the visible area of the captured
2359 * @param {function(string):void=} opt_callback A callback function which
2360 * accepts the data URL string of a JPEG encoding of the visible area of the
2363 chrome.tabs.captureVisibleTab = function(windowIdOrOptionsOrCallback,
2364 opt_optionsOrCallback, opt_callback) {};
2368 * @param {number} tabId Tab Id.
2369 * @param {{name: (string|undefined)}=} connectInfo Info Object.
2371 chrome.tabs.connect = function(tabId, connectInfo) {};
2376 * windowId: (number|undefined),
2377 * index: (number|undefined),
2378 * url: (string|undefined),
2379 * active: (boolean|undefined),
2380 * pinned: (boolean|undefined),
2381 * openerTabId: (number|undefined)
2384 chrome.tabs.CreateProperties;
2388 * @param {!chrome.tabs.CreateProperties} createProperties Info object.
2389 * @param {function(!Tab): void=} opt_callback The callback function.
2391 chrome.tabs.create = function(createProperties, opt_callback) {};
2395 * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
2396 * @param {number|function(string): void} tabIdOrCallback The tab id, or a
2397 * callback function that will be invoked with the language of the active
2398 * tab in the current window.
2399 * @param {function(string): void=} opt_callback An optional callback function
2400 * that will be invoked with the language of the tab specified as first
2403 chrome.tabs.detectLanguage = function(tabIdOrCallback, opt_callback) {};
2407 * @see https://developer.chrome.com/extensions/tabs#method-executeScript
2408 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2409 * Either the id of the tab in which to run the script, or an object
2410 * containing the details of the script to run, in which case the script
2411 * will be executed in the active tab of the current window.
2412 * @param {(!chrome.tabs.InjectDetails|function(!Array.<*>):void)=}
2413 * opt_detailsOrCallback Either an object containing the details of the
2414 * script to run, if the tab id was speficied as first argument, or a
2415 * callback that will be invoked with the result of the execution of the
2416 * script in every injected frame.
2417 * @param {function(!Array.<*>):void=} opt_callback A callback that will be
2418 * invoked with the result of the execution of the script in every
2421 chrome.tabs.executeScript = function(tabIdOrDetails, opt_detailsOrCallback,
2426 * @param {number} tabId Tab id.
2427 * @param {function(!Tab): void} callback Callback.
2429 chrome.tabs.get = function(tabId, callback) {};
2433 * Note (2014-05-21): Because this function is deprecated, the types of it's
2434 * parameters were not upgraded to make the first parameter optional and to mark
2435 * the Array and Tab in the callback as non-null.
2437 * @param {number?} windowId Window id.
2438 * @param {function(Array.<Tab>): void} callback Callback.
2439 * @deprecated Please use tabs.query {windowId: windowId}.
2441 chrome.tabs.getAllInWindow = function(windowId, callback) {};
2445 * @param {function(!Tab=): void} callback Callback.
2447 chrome.tabs.getCurrent = function(callback) {};
2451 * Note (2014-05-21): Because this function is deprecated, the types of it's
2452 * parameters were not upgraded to make the first parameter optional and to mark
2453 * the Array and Tab in the callback as non-null.
2455 * @param {number?} windowId Window id.
2456 * @param {function(Tab): void} callback Callback.
2457 * @deprecated Please use tabs.query({active: true}).
2459 chrome.tabs.getSelected = function(windowId, callback) {};
2464 * windowId: (number|undefined),
2465 * tabs: (number|!Array.<number>)
2468 chrome.tabs.HighlightInfo;
2472 * @param {!chrome.tabs.HighlightInfo} highlightInfo
2473 * @param {function(!Window): void} callback Callback function invoked
2474 * with each appropriate Window.
2476 chrome.tabs.highlight = function(highlightInfo, callback) {};
2480 * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
2481 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
2482 * Either the id of the tab in which to run the script, or an object
2483 * containing the details of the CSS to insert, in which case the script
2484 * will be executed in the active tab of the current window.
2485 * @param {(!chrome.tabs.InjectDetails|function():void)=}
2486 * opt_detailsOrCallback Either an object containing the details of the
2487 * CSS to insert, if the tab id was speficied as first argument, or a
2488 * callback that will be invoked after the CSS has been injected.
2489 * @param {function():void=} opt_callback A callback that will be invoked after
2490 * the CSS has been injected.
2492 chrome.tabs.insertCSS = function(tabIdOrDetails, opt_detailsOrCallback,
2498 * windowId: (number|undefined),
2502 chrome.tabs.MoveProperties;
2506 * @param {number|!Array.<number>} tabId Tab id or array of tab ids.
2507 * @param {!chrome.tabs.MoveProperties} moveProperties
2508 * @param {function((!Tab|!Array.<!Tab>)): void=} opt_callback Callback.
2510 chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
2515 * active: (boolean|undefined),
2516 * pinned: (boolean|undefined),
2517 * highlighted: (boolean|undefined),
2518 * currentWindow: (boolean|undefined),
2519 * lastFocusedWindow: (boolean|undefined),
2520 * status: (string|undefined),
2521 * title: (string|undefined),
2522 * url: (string|undefined),
2523 * windowId: (number|undefined),
2524 * windowType: (string|undefined),
2525 * index: (number|undefined)
2528 chrome.tabs.QueryInfo;
2532 * @param {!chrome.tabs.QueryInfo} queryInfo
2533 * @param {function(!Array.<!Tab>): void} callback Callback.
2535 chrome.tabs.query = function(queryInfo, callback) {};
2539 * @see https://developer.chrome.com/extensions/tabs#method-query
2540 * @param {number} tabId The ID of the tab which is to be duplicated.
2541 * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
2542 * details about the duplicated tab.
2544 chrome.tabs.duplicate = function(tabId, opt_callback) {};
2549 * bypassCache: (boolean|undefined)
2552 chrome.tabs.ReloadProperties;
2556 * @see https://developer.chrome.com/extensions/tabs#method-reload
2557 * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
2558 * opt_tabIdOrReloadPropertiesOrCallback One of:
2559 * The ID of the tab to reload; defaults to the selected tab of the current
2561 * An object specifying boolean flags to customize the reload operation.
2562 * A callback to be invoked when the reload is complete.
2563 * @param {(!chrome.tabs.ReloadProperties|function():void)=}
2564 * opt_reloadPropertiesOrCallback Either an object specifying boolean flags
2565 * to customize the reload operation, or a callback to be invoked when the
2566 * reload is complete, if no object needs to be specified.
2567 * @param {function():void=} opt_callback A callback to be invoked when the
2568 * reload is complete.
2570 chrome.tabs.reload = function(opt_tabIdOrReloadPropertiesOrCallback,
2571 opt_reloadPropertiesOrCallback, opt_callback) {};
2575 * @param {number|!Array.<number>} tabIds A tab ID or an array of tab IDs.
2576 * @param {function(): void=} opt_callback Callback.
2578 chrome.tabs.remove = function(tabIds, opt_callback) {};
2582 * @param {number} tabId Tab id.
2583 * @param {*} request The request value of any type.
2584 * @param {function(*): void=} opt_callback The callback function which
2585 * takes a JSON response object sent by the handler of the request.
2587 chrome.tabs.sendMessage = function(tabId, request, opt_callback) {};
2591 * @param {number} tabId Tab id.
2592 * @param {*} request The request value of any type.
2593 * @param {function(*): void=} opt_callback The callback function which
2594 * takes a JSON response object sent by the handler of the request.
2595 * @deprecated Please use runtime.sendMessage.
2597 chrome.tabs.sendRequest = function(tabId, request, opt_callback) {};
2602 * url: (string|undefined),
2603 * active: (boolean|undefined),
2604 * highlighted: (boolean|undefined),
2605 * pinned: (boolean|undefined),
2606 * openerTabId: (number|undefined)
2609 chrome.tabs.UpdateProperties;
2613 * @see https://developer.chrome.com/extensions/tabs#method-update
2614 * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
2615 * Either the id of the tab to update, or an object with new property
2616 * values, in which case the selected tab of the current window will be
2618 * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
2619 * opt_updatePropertiesOrCallback Either an object with new property values,
2620 * if the tabId was specified as first parameter, or an optional callback
2621 * that will be invoked with information about the tab being updated.
2622 * @param {function(!Tab=): void=} opt_callback An optional callback that will
2623 * be invoked with information about the tab being updated.
2625 chrome.tabs.update = function(tabIdOrUpdateProperties,
2626 opt_updatePropertiesOrCallback, opt_callback) {};
2630 * @type {!ChromeEvent}
2631 * @deprecated Please use tabs.onActivated.
2633 chrome.tabs.onActiveChanged;
2636 /** @type {!ChromeEvent} */
2637 chrome.tabs.onActivated;
2640 /** @type {!ChromeEvent} */
2641 chrome.tabs.onAttached;
2644 /** @type {!ChromeEvent} */
2645 chrome.tabs.onCreated;
2648 /** @type {!ChromeEvent} */
2649 chrome.tabs.onDetached;
2653 * @type {!ChromeEvent}
2654 * @deprecated Please use tabs.onHighlighted.
2656 chrome.tabs.onHighlightChanged;
2660 * @type {!ChromeEvent}
2662 chrome.tabs.onHighlighted;
2665 /** @type {!ChromeEvent} */
2666 chrome.tabs.onMoved;
2669 /** @type {!ChromeEvent} */
2670 chrome.tabs.onRemoved;
2673 /** @type {!ChromeEvent} */
2674 chrome.tabs.onUpdated;
2677 /** @type {!ChromeEvent} */
2678 chrome.tabs.onReplaced;
2681 // TODO(user): Remove once all usage has been confirmed to have ended.
2685 * @type {!ChromeEvent}
2686 * @deprecated Please use tabs.onActivated.
2688 chrome.tabs.onSelectionChanged;
2692 * @see https://developer.chrome.com/extensions/topSites
2695 chrome.topSites = {};
2701 * @see https://developer.chrome.com/extensions/topSites#type-MostVisitedURL
2703 chrome.topSites.MostVisitedURL = function() {};
2706 /** @type {string} */
2707 chrome.topSites.MostVisitedURL.prototype.url;
2710 /** @type {string} */
2711 chrome.topSites.MostVisitedURL.prototype.title;
2715 * Gets a list of top sites.
2716 * @param {function(!Array<!chrome.topSites.MostVisitedURL>)} callback Invoked
2717 * with a list of most visited URLs.
2718 * @see https://developer.chrome.com/extensions/topSites#method-get
2720 chrome.topSites.get = function(callback) {};
2725 * @see https://developer.chrome.com/extensions/windows.html
2727 chrome.windows = {};
2731 * @param {Object=} opt_createData May have many keys to specify parameters.
2733 * @param {function(ChromeWindow): void=} opt_callback Callback.
2735 chrome.windows.create = function(opt_createData, opt_callback) {};
2739 * @param {number} id Window id.
2740 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2741 * @param {function(!ChromeWindow): void=} opt_callback Callback when
2742 * opt_getInfo is an object.
2744 chrome.windows.get = function(id, opt_getInfo, opt_callback) {};
2748 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2749 * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
2751 chrome.windows.getAll = function(opt_getInfo, opt_callback) {};
2755 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2756 * @param {function(ChromeWindow): void=} opt_callback Callback.
2758 chrome.windows.getCurrent = function(opt_getInfo, opt_callback) { };
2762 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2763 * @param {function(ChromeWindow): void=} opt_callback Callback.
2765 chrome.windows.getLastFocused = function(opt_getInfo, opt_callback) { };
2769 * @param {number} tabId Tab Id.
2770 * @param {function(): void=} opt_callback Callback.
2772 chrome.windows.remove = function(tabId, opt_callback) {};
2776 * @param {number} tabId Tab Id.
2777 * @param {Object} updateProperties An object which may have many keys for
2779 * @param {function(): void=} opt_callback Callback.
2781 chrome.windows.update = function(tabId, updateProperties, opt_callback) {};
2784 /** @type {!ChromeEvent} */
2785 chrome.windows.onCreated;
2788 /** @type {!ChromeEvent} */
2789 chrome.windows.onFocusChanged;
2792 /** @type {!ChromeEvent} */
2793 chrome.windows.onRemoved;
2797 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2800 chrome.windows.WINDOW_ID_NONE;
2804 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2807 chrome.windows.WINDOW_ID_CURRENT;
2812 * @see https://developer.chrome.com/extensions/i18n.html
2818 * @param {function(Array.<string>): void} callback The callback function which
2819 * accepts an array of the accept languages of the browser, such as
2820 * 'en-US','en','zh-CN'.
2822 chrome.i18n.getAcceptLanguages = function(callback) {};
2826 * @param {string} messageName
2827 * @param {(string|Array.<string>)=} opt_args
2830 chrome.i18n.getMessage = function(messageName, opt_args) {};
2836 chrome.i18n.getUILanguage = function() {};
2841 * @see https://developer.chrome.com/extensions/pageAction.html
2843 chrome.pageAction = {};
2847 * @param {number} tabId Tab Id.
2849 chrome.pageAction.hide = function(tabId) {};
2853 * @param {Object} details An object which has 'tabId' and either
2854 * 'imageData' or 'path'.
2856 chrome.pageAction.setIcon = function(details) {};
2860 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2862 chrome.pageAction.setPopup = function(details) {};
2866 * @param {Object} details An object which has 'tabId' and 'title'.
2868 chrome.pageAction.setTitle = function(details) {};
2872 * @param {number} tabId Tab Id.
2874 chrome.pageAction.show = function(tabId) {};
2877 /** @type {!ChromeEvent} */
2878 chrome.pageAction.onClicked;
2883 * @see https://developer.chrome.com/apps/browser
2885 chrome.browser = {};
2889 * @param {{url: string}} details An object with a single 'url' key.
2890 * @param {(function(): void)=} opt_callback The callback function. If an error
2891 * occurs opening the URL, chrome.runtime.lastError will be set to the error
2894 chrome.browser.openTab = function(details, opt_callback) {};
2899 * @see https://developer.chrome.com/extensions/browserAction.html
2901 chrome.browserAction = {};
2906 * tabId: (number|undefined)
2909 chrome.browserAction.Tab;
2913 * @typedef {Array<number>}
2914 * @see https://developer.chrome.com/extensions/browserAction#type-ColorArray
2916 chrome.browserAction.ColorArray;
2921 * imageData: (!ImageData|!Object.<number, !ImageData>|undefined),
2922 * path: (string|!Object.<number, string>|undefined),
2923 * tabId: (number|undefined)
2926 chrome.browserAction.SetIconImageData;
2932 * tabId: (number|undefined)
2934 * @see https://developer.chrome.com/extensions/browserAction#method-setTitle
2936 chrome.browserAction.setTitle = function(details) {};
2940 * @param {!chrome.browserAction.Tab} details
2941 * @param {function(string): void} callback
2942 * @see https://developer.chrome.com/extensions/browserAction#method-getTitle
2944 chrome.browserAction.getTitle = function(details, callback) {};
2948 * @param {!chrome.browserAction.SetIconImageData} details
2949 * @param {function(): void=} opt_callback
2950 * @see https://developer.chrome.com/extensions/browserAction#method-setIcon
2952 chrome.browserAction.setIcon = function(details, opt_callback) {};
2957 * tabId: (number|undefined),
2960 * @see https://developer.chrome.com/extensions/browserAction#method-setPopup
2962 chrome.browserAction.setPopup = function(details) {};
2966 * @param {!chrome.browserAction.Tab} details
2967 * @param {function(string): void} callback
2968 * @see https://developer.chrome.com/extensions/browserAction#method-getPopup
2970 chrome.browserAction.getPopup = function(details, callback) {};
2976 * tabId: (number|undefined)
2978 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeText
2980 chrome.browserAction.setBadgeText = function(details) {};
2984 * @param {!chrome.browserAction.Tab} details
2985 * @param {function(string): void} callback
2986 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeText
2988 chrome.browserAction.getBadgeText = function(details, callback) {};
2993 * color: (string|chrome.browserAction.ColorArray),
2994 * tabId: (number|undefined)
2996 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeBackgroundColor
2998 chrome.browserAction.setBadgeBackgroundColor = function(details) {};
3002 * @param {!chrome.browserAction.Tab} details
3003 * @param {function(chrome.browserAction.ColorArray): void} callback
3004 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeBackgroundColor
3006 chrome.browserAction.getBadgeBackgroundColor = function(details, callback) {};
3010 * @param {number=} opt_tabId
3011 * @see https://developer.chrome.com/extensions/browserAction#method-enable
3013 chrome.browserAction.enable = function(opt_tabId) {};
3017 * @param {number=} opt_tabId
3018 * @see https://developer.chrome.com/extensions/browserAction#method-disable
3020 chrome.browserAction.disable = function(opt_tabId) {};
3026 chrome.browserAction.BrowserActionTabEvent = function() {};
3030 * @param {function(!Tab): void} callback
3032 chrome.browserAction.BrowserActionTabEvent.prototype.addListener =
3033 function(callback) {};
3037 * @param {function(!Tab): void} callback
3039 chrome.browserAction.BrowserActionTabEvent.prototype.removeListener =
3040 function(callback) {};
3044 * @param {function(!Tab): void} callback
3047 chrome.browserAction.BrowserActionTabEvent.prototype.hasListener =
3048 function(callback) {};
3051 /** @return {boolean} */
3052 chrome.browserAction.BrowserActionTabEvent.prototype.hasListeners =
3057 * @type {!chrome.browserAction.BrowserActionTabEvent}
3058 * @see https://developer.chrome.com/extensions/browserAction#event-onClicked
3060 chrome.browserAction.onClicked;
3065 * @see https://developer.chrome.com/extensions/bookmarks.html
3067 chrome.bookmarks = {};
3072 * parentId: (string|undefined),
3073 * index: (number|undefined),
3074 * url: (string|undefined),
3075 * title: (string|undefined)
3077 * @see https://developer.chrome.com/extensions/bookmarks#method-create
3079 chrome.bookmarks.CreateDetails;
3084 * query: (string|undefined),
3085 * url: (string|undefined),
3086 * title: (string|undefined)
3088 * @see https://developer.chrome.com/extensions/bookmarks#method-search
3090 chrome.bookmarks.SearchDetails;
3094 * @param {(string|Array.<string>)} idOrIdList
3095 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3096 * callback function which accepts an array of BookmarkTreeNode.
3097 * @return {Array.<BookmarkTreeNode>}
3099 chrome.bookmarks.get = function(idOrIdList, callback) {};
3103 * @param {string} id
3104 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3105 * callback function which accepts an array of BookmarkTreeNode.
3106 * @return {Array.<BookmarkTreeNode>}
3108 chrome.bookmarks.getChildren = function(id, callback) {};
3112 * @param {number} numberOfItems The number of items to return.
3113 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3114 * callback function which accepts an array of BookmarkTreeNode.
3115 * @return {Array.<BookmarkTreeNode>}
3117 chrome.bookmarks.getRecent = function(numberOfItems, callback) {};
3121 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3122 * callback function which accepts an array of BookmarkTreeNode.
3123 * @return {Array.<BookmarkTreeNode>}
3125 chrome.bookmarks.getTree = function(callback) {};
3129 * @param {string} id The ID of the root of the subtree to retrieve.
3130 * @param {function(Array.<BookmarkTreeNode>): void} callback The
3131 * callback function which accepts an array of BookmarkTreeNode.
3132 * @return {Array.<BookmarkTreeNode>}
3134 chrome.bookmarks.getSubTree = function(id, callback) {};
3138 * @param {string|!chrome.bookmarks.SearchDetails} query
3139 * @param {function(Array.<BookmarkTreeNode>): void} callback
3140 * @return {Array.<BookmarkTreeNode>}
3142 chrome.bookmarks.search = function(query, callback) {};
3146 * @param {chrome.bookmarks.CreateDetails} bookmark
3147 * @param {function(BookmarkTreeNode): void=} opt_callback The
3148 * callback function which accepts a BookmarkTreeNode object.
3150 chrome.bookmarks.create = function(bookmark, opt_callback) {};
3154 * @param {string} id
3155 * @param {Object} destination An object which has optional 'parentId' and
3157 * @param {function(BookmarkTreeNode): void=} opt_callback
3158 * The callback function which accepts a BookmarkTreeNode object.
3160 chrome.bookmarks.move = function(id, destination, opt_callback) {};
3164 * @param {string} id
3165 * @param {Object} changes An object which may have 'title' as a key.
3166 * @param {function(BookmarkTreeNode): void=} opt_callback The
3167 * callback function which accepts a BookmarkTreeNode object.
3169 chrome.bookmarks.update = function(id, changes, opt_callback) {};
3173 * @param {string} id
3174 * @param {function(): void=} opt_callback
3176 chrome.bookmarks.remove = function(id, opt_callback) {};
3180 * @param {string} id
3181 * @param {function(): void=} opt_callback
3183 chrome.bookmarks.removeTree = function(id, opt_callback) {};
3187 * @param {function(): void=} opt_callback
3189 chrome.bookmarks.import = function(opt_callback) {};
3193 * @param {function(): void=} opt_callback
3195 chrome.bookmarks.export = function(opt_callback) {};
3198 /** @type {!ChromeEvent} */
3199 chrome.bookmarks.onChanged;
3202 /** @type {!ChromeEvent} */
3203 chrome.bookmarks.onChildrenReordered;
3206 /** @type {!ChromeEvent} */
3207 chrome.bookmarks.onCreated;
3210 /** @type {!ChromeEvent} */
3211 chrome.bookmarks.onImportBegan;
3214 /** @type {!ChromeEvent} */
3215 chrome.bookmarks.onImportEnded;
3218 /** @type {!ChromeEvent} */
3219 chrome.bookmarks.onMoved;
3222 /** @type {!ChromeEvent} */
3223 chrome.bookmarks.onRemoved;
3229 * description: string
3237 * @see https://developer.chrome.com/extensions/omnibox.html
3239 chrome.omnibox = {};
3244 chrome.omnibox.InputChangedEvent = function() {};
3248 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3250 chrome.omnibox.InputChangedEvent.prototype.addListener = function(callback) {};
3254 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3256 chrome.omnibox.InputChangedEvent.prototype.removeListener =
3257 function(callback) {};
3261 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
3264 chrome.omnibox.InputChangedEvent.prototype.hasListener = function(callback) {};
3267 /** @return {boolean} */
3268 chrome.omnibox.InputChangedEvent.prototype.hasListeners = function() {};
3273 chrome.omnibox.InputEnteredEvent = function() {};
3276 /** @param {function(string, string): void} callback */
3277 chrome.omnibox.InputEnteredEvent.prototype.addListener = function(callback) {};
3280 /** @param {function(string, string): void} callback */
3281 chrome.omnibox.InputEnteredEvent.prototype.removeListener =
3282 function(callback) {};
3286 * @param {function(string, string): void} callback
3289 chrome.omnibox.InputEnteredEvent.prototype.hasListener = function(callback) {};
3292 /** @return {boolean} */
3293 chrome.omnibox.InputEnteredEvent.prototype.hasListeners = function() {};
3297 * @param {{description: string}} suggestion A partial SuggestResult object.
3299 chrome.omnibox.setDefaultSuggestion = function(suggestion) {};
3302 /** @type {!ChromeEvent} */
3303 chrome.omnibox.onInputCancelled;
3306 /** @type {!chrome.omnibox.InputChangedEvent} */
3307 chrome.omnibox.onInputChanged;
3310 /** @type {!chrome.omnibox.InputEnteredEvent} */
3311 chrome.omnibox.onInputEntered;
3314 /** @type {!ChromeEvent} */
3315 chrome.omnibox.onInputStarted;
3320 * @see https://developer.chrome.com/extensions/dev/contextMenus.html
3322 chrome.contextMenus = {};
3327 * type: (string|undefined),
3328 * id: (string|undefined),
3329 * title: (string|undefined),
3330 * checked: (boolean|undefined),
3331 * contexts: (!Array.<string>|undefined),
3332 * onclick: (function(!Object, !Tab)|undefined),
3333 * parentId: (number|string|undefined),
3334 * documentUrlPatterns: (!Array.<string>|undefined),
3335 * targetUrlPatterns: (!Array.<string>|undefined),
3336 * enabled: (boolean|undefined)
3338 * @see https://developer.chrome.com/extensions/contextMenus#method-create
3340 chrome.contextMenus.CreateProperties;
3345 * type: (string|undefined),
3346 * title: (string|undefined),
3347 * checked: (boolean|undefined),
3348 * contexts: (!Array.<string>|undefined),
3349 * onclick: (function(!Object, !Tab)|undefined),
3350 * parentId: (number|string|undefined),
3351 * documentUrlPatterns: (!Array.<string>|undefined),
3352 * targetUrlPatterns: (!Array.<string>|undefined),
3353 * enabled: (boolean|undefined)
3355 * @see https://developer.chrome.com/extensions/contextMenus#method-update
3357 chrome.contextMenus.UpdateProperties;
3361 * @param {!chrome.contextMenus.CreateProperties} createProperties
3362 * @param {function()=} opt_callback
3363 * @return {(number|string)} The id of the newly created window.
3364 * @see https://developer.chrome.com/extensions/contextMenus#method-create
3366 chrome.contextMenus.create = function(createProperties, opt_callback) {};
3370 * @param {(number|string)} id
3371 * @param {!chrome.contextMenus.UpdateProperties} updateProperties
3372 * @param {function()=} opt_callback
3373 * @see https://developer.chrome.com/extensions/contextMenus#method-update
3375 chrome.contextMenus.update = function(id, updateProperties, opt_callback) {};
3379 * @param {(number|string)} menuItemId
3380 * @param {function()=} opt_callback
3381 * @see https://developer.chrome.com/extensions/contextMenus#method-remove
3383 chrome.contextMenus.remove = function(menuItemId, opt_callback) {};
3387 * @param {function()=} opt_callback
3388 * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
3390 chrome.contextMenus.removeAll = function(opt_callback) {};
3395 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3397 chrome.contextMenus.ClickedEvent = function() {};
3401 * @param {function(!Object, !Tab=)} callback
3403 chrome.contextMenus.ClickedEvent.prototype.addListener = function(callback) {};
3407 * @param {function(!Object, !Tab=)} callback
3409 chrome.contextMenus.ClickedEvent.prototype.removeListener =
3410 function(callback) {};
3414 * @param {function(!Object, !Tab=)} callback
3417 chrome.contextMenus.ClickedEvent.prototype.hasListener = function(callback) {};
3423 chrome.contextMenus.ClickedEvent.prototype.hasListeners = function() {};
3427 * @type {!chrome.contextMenus.ClickedEvent}
3428 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
3430 chrome.contextMenus.onClicked;
3435 * @see https://developer.chrome.com/extensions/dev/cookies.html
3437 chrome.cookies = {};
3441 * This typedef is used for the parameters to chrome.cookies.get,
3442 * chrome.cookies.remove, and for the parameter to remove's callback. These uses
3443 * all identify a single cookie uniquely without specifying its content, and the
3444 * objects are identical except for the the storeId being optional vs required.
3445 * If greater divergence occurs, then going to two typedefs is recommended.
3450 * storeId: (string|undefined)
3453 chrome.cookies.CookieIdentifier;
3457 * @param {!chrome.cookies.CookieIdentifier} details
3458 * @param {function(Cookie=): void} callback
3460 chrome.cookies.get = function(details, callback) {};
3464 * @param {Object} details
3465 * @param {function(Array.<Cookie>): void} callback
3467 chrome.cookies.getAll = function(details, callback) {};
3471 * @param {function(Array.<CookieStore>): void} callback
3473 chrome.cookies.getAllCookieStores = function(callback) {};
3477 * @param {!chrome.cookies.CookieIdentifier} details
3478 * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
3479 * removal failed for any reason, the parameter will be "null", and
3480 * "chrome.runtime.lastError" will be set.
3482 chrome.cookies.remove = function(details, opt_callback) {};
3488 * name: (string|undefined),
3489 * value: (string|undefined),
3490 * domain: (string|undefined),
3491 * path: (string|undefined),
3492 * secure: (boolean|undefined),
3493 * httpOnly: (boolean|undefined),
3494 * expirationDate: (number|undefined),
3495 * storeId: (string|undefined)
3498 chrome.cookies.CookieSetDetails;
3502 * @param {!chrome.cookies.CookieSetDetails} details
3503 * @param {function(Cookie): void=} opt_callback If setting failed for any
3504 * reason, the parameter will be "null", and "chrome.runtime.lastError" will
3507 chrome.cookies.set = function(details, opt_callback) {};
3511 * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
3512 * @type {!ChromeEvent}
3514 chrome.cookies.onChanged;
3519 function CookieChangeInfo() {}
3522 /** @type {boolean} */
3523 CookieChangeInfo.prototype.removed;
3526 /** @type {Cookie} */
3527 CookieChangeInfo.prototype.cookie;
3530 /** @type {string} */
3531 CookieChangeInfo.prototype.cause;
3535 chrome.management = {};
3540 * showConfirmDialog: (boolean|undefined)
3543 chrome.management.InstallOptions;
3547 * @param {string} id
3548 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3551 chrome.management.get = function(id, opt_callback) {};
3555 * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
3556 * callback function.
3557 * @return {!Array.<!ExtensionInfo>}
3559 chrome.management.getAll = function(opt_callback) {};
3563 * @param {string} id The id of an already installed extension.
3564 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3566 chrome.management.getPermissionWarningsById = function(id, opt_callback) {};
3570 * @param {string} manifestStr Extension's manifest JSON string.
3571 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
3573 chrome.management.getPermissionWarningsByManifest =
3574 function(manifestStr, opt_callback) {};
3578 * @param {string} id The id of an already installed extension.
3579 * @param {function(): void=} opt_callback Optional callback function.
3581 chrome.management.launchApp = function(id, opt_callback) {};
3585 * @param {string} id The id of an already installed extension.
3586 * @param {boolean} enabled Whether this item should be enabled.
3587 * @param {function(): void=} opt_callback Optional callback function.
3589 chrome.management.setEnabled = function(id, enabled, opt_callback) {};
3593 * @param {string} id The id of an already installed extension.
3594 * @param {(!chrome.management.InstallOptions|function(): void)=}
3595 * opt_optionsOrCallback An optional uninstall options object or an optional
3596 * callback function.
3597 * @param {function(): void=} opt_callback Optional callback function.
3599 chrome.management.uninstall =
3600 function(id, opt_optionsOrCallback, opt_callback) {};
3604 * @param {(!chrome.management.InstallOptions|function(): void)=}
3605 * opt_optionsOrCallback An optional uninstall options object or an optional
3606 * callback function.
3607 * @param {function(): void=} opt_callback An optional callback function.
3609 chrome.management.uninstallSelf =
3610 function(opt_optionsOrCallback, opt_callback) {};
3614 * @param {string} id The id of an already installed extension.
3615 * @param {function(): void=} opt_callback Optional callback function.
3617 chrome.management.createAppShortcut = function(id, opt_callback) {};
3621 * @param {string} id The id of an already installed extension.
3622 * @param {string} launchType The LaunchType enum value to set. Make sure this
3623 * value is in ExtensionInfo.availableLaunchTypes because the available
3624 * launch types vary on different platforms and configurations.
3625 * @param {function(): void=} opt_callback Optional callback function.
3627 chrome.management.setLaunchType = function(id, launchType, opt_callback) {};
3631 * @param {string} url The URL of a web page. The scheme of the URL can only be
3632 * "http" or "https".
3633 * @param {string} title The title of the generated app.
3634 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3637 chrome.management.generateAppForLink = function(url, title, opt_callback) {};
3640 /** @type {!ChromeExtensionInfoEvent} */
3641 chrome.management.onDisabled;
3644 /** @type {!ChromeExtensionInfoEvent} */
3645 chrome.management.onEnabled;
3648 /** @type {!ChromeExtensionInfoEvent} */
3649 chrome.management.onInstalled;
3652 /** @type {!ChromeStringEvent} */
3653 chrome.management.onUninstalled;
3658 * @see https://developer.chrome.com/extensions/idle.html
3664 * @param {number} thresholdSeconds Threshold in seconds, used to determine
3665 * when a machine is in the idle state.
3666 * @param {function(string): void} callback Callback to handle the state.
3668 chrome.idle.queryState = function(thresholdSeconds, callback) {};
3672 * @param {number} intervalInSeconds Threshold, in seconds, used to determine
3673 * when the system is in an idle state.
3675 chrome.idle.setDetectionInterval = function(intervalInSeconds) {};
3678 /** @type {!ChromeEvent} */
3679 chrome.idle.onStateChanged;
3683 * Chrome Text-to-Speech API.
3685 * @see https://developer.chrome.com/extensions/tts.html
3692 * An event from the TTS engine to communicate the status of an utterance.
3695 function TtsEvent() {}
3698 /** @type {string} */
3699 TtsEvent.prototype.type;
3702 /** @type {number} */
3703 TtsEvent.prototype.charIndex;
3706 /** @type {string} */
3707 TtsEvent.prototype.errorMessage;
3712 * A description of a voice available for speech synthesis.
3715 function TtsVoice() {}
3718 /** @type {string} */
3719 TtsVoice.prototype.voiceName;
3722 /** @type {string} */
3723 TtsVoice.prototype.lang;
3726 /** @type {string} */
3727 TtsVoice.prototype.gender;
3730 /** @type {string} */
3731 TtsVoice.prototype.extensionId;
3734 /** @type {Array.<string>} */
3735 TtsVoice.prototype.eventTypes;
3739 * Gets an array of all available voices.
3740 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
3743 chrome.tts.getVoices = function(opt_callback) {};
3747 * Checks if the engine is currently speaking.
3748 * @param {function(boolean)=} opt_callback The callback function.
3750 chrome.tts.isSpeaking = function(opt_callback) {};
3754 * Speaks text using a text-to-speech engine.
3755 * @param {string} utterance The text to speak, either plain text or a complete,
3756 * well-formed SSML document. Speech engines that do not support SSML will
3757 * strip away the tags and speak the text. The maximum length of the text is
3758 * 32,768 characters.
3759 * @param {Object=} opt_options The speech options.
3760 * @param {function()=} opt_callback Called right away, before speech finishes.
3762 chrome.tts.speak = function(utterance, opt_options, opt_callback) {};
3766 * Stops any current speech.
3768 chrome.tts.stop = function() {};
3773 * @see https://developer.chrome.com/extensions/ttsEngine.html
3775 chrome.ttsEngine = {};
3778 /** @type {!ChromeEvent} */
3779 chrome.ttsEngine.onSpeak;
3782 /** @type {!ChromeEvent} */
3783 chrome.ttsEngine.onStop;
3788 * @see https://developer.chrome.com/extensions/contentSettings.html
3790 chrome.contentSettings = {};
3793 /** @type {!ContentSetting} */
3794 chrome.contentSettings.cookies;
3797 /** @type {!ContentSetting} */
3798 chrome.contentSettings.images;
3801 /** @type {!ContentSetting} */
3802 chrome.contentSettings.javascript;
3805 /** @type {!ContentSetting} */
3806 chrome.contentSettings.plugins;
3809 /** @type {!ContentSetting} */
3810 chrome.contentSettings.popups;
3813 /** @type {!ContentSetting} */
3814 chrome.contentSettings.notifications;
3819 * @see https://developer.chrome.com/extensions/fileBrowserHandler
3821 chrome.fileBrowserHandler = {};
3826 * suggestedName: string,
3827 * allowedFileExtensions: (!Array.<string>|undefined)
3830 chrome.fileBrowserHandler.SelectFileSelectionParams;
3834 * Prompts user to select file path under which file should be saved.
3835 * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3836 * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3837 * Parameters that will be used while selecting the file.
3838 * @param {function(!Object)} callback Function called upon completion.
3840 chrome.fileBrowserHandler.selectFile = function(selectionParams, callback) {};
3845 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3847 chrome.fileBrowserHandler.ExecuteEvent = function() {};
3851 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3853 chrome.fileBrowserHandler.ExecuteEvent.prototype.addListener = function(
3858 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3860 chrome.fileBrowserHandler.ExecuteEvent.prototype.removeListener = function(
3865 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3868 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListener = function(
3875 chrome.fileBrowserHandler.ExecuteEvent.prototype.hasListeners = function() {};
3879 * Fired when file system action is executed from ChromeOS file browser.
3880 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3881 * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3883 chrome.fileBrowserHandler.onExecute;
3888 * @see https://developer.chrome.com/extensions/gcm
3894 * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3897 chrome.gcm.MAX_MESSAGE_SIZE;
3901 * Registers the application with GCM. The registration ID will be returned by
3902 * the callback. If register is called again with the same list of senderIds,
3903 * the same registration ID will be returned.
3904 * @see https://developer.chrome.com/extensions/gcm#method-register
3905 * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
3906 * send messages to the application.
3907 * @param {function(string): void} callback Function called when
3908 * registration completes with registration ID as argument.
3910 chrome.gcm.register = function(senderIds, callback) {};
3914 * Unregisters the application from GCM.
3915 * @see https://developer.chrome.com/extensions/gcm#method-unregister
3916 * @param {function(): void} callback Called when unregistration is done.
3918 chrome.gcm.unregister = function(callback) {};
3922 * Sends an upstream message using GCM.
3923 * @see https://developer.chrome.com/extensions/gcm#method-send
3924 * @param {!chrome.gcm.Message} message Message to be sent.
3925 * @param {function(string): void} callback Called with message ID.
3927 chrome.gcm.send = function(message, callback) {};
3933 * destinationId: string,
3934 * messageId: string,
3935 * timeToLive: (number|undefined),
3936 * data: !Object.<string, string>
3943 * An event, fired when a message is received through GCM.
3944 * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3945 * @type {!chrome.gcm.OnMessageEvent}
3947 chrome.gcm.onMessage;
3951 * An event, fired when GCM server had to delete messages to the application
3952 * from its queue in order to manage its size.
3953 * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3954 * @type {!ChromeEvent}
3956 chrome.gcm.onMessagesDeleted;
3960 * An event indicating problems with sending messages.
3961 * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3962 * @type {!chrome.gcm.OnSendErrorEvent}
3964 chrome.gcm.onSendError;
3971 chrome.gcm.OnMessageEvent = function() {};
3975 * @param {function(!Object): void} callback Callback.
3977 chrome.gcm.OnMessageEvent.prototype.addListener = function(callback) {};
3981 * @param {function(!Object): void} callback Callback.
3983 chrome.gcm.OnMessageEvent.prototype.removeListener = function(callback) {};
3987 * @param {function(!Object): void} callback Callback.
3990 chrome.gcm.OnMessageEvent.prototype.hasListener = function(callback) {};
3996 chrome.gcm.OnMessageEvent.prototype.hasListeners = function() {};
4003 chrome.gcm.OnSendErrorEvent = function() {};
4007 * @param {function(!Object): void} callback Callback.
4009 chrome.gcm.OnSendErrorEvent.prototype.addListener = function(callback) {};
4013 * @param {function(!Object): void} callback Callback.
4015 chrome.gcm.OnSendErrorEvent.prototype.removeListener = function(callback) {};
4019 * @param {function(!Object): void} callback Callback.
4022 chrome.gcm.OnSendErrorEvent.prototype.hasListener = function(callback) {};
4028 chrome.gcm.OnSendErrorEvent.prototype.hasListeners = function() {};
4033 * @see https://developer.chrome.com/extensions/history.html
4035 chrome.history = {};
4039 * @param {Object.<string, string>} details Object with a 'url' key.
4041 chrome.history.addUrl = function(details) {};
4045 * @param {function(): void} callback Callback function.
4047 chrome.history.deleteAll = function(callback) {};
4051 * @param {Object.<string, string>} range Object with 'startTime'
4052 * and 'endTime' keys.
4053 * @param {function(): void} callback Callback function.
4055 chrome.history.deleteRange = function(range, callback) {};
4059 * @param {Object.<string, string>} details Object with a 'url' key.
4061 chrome.history.deleteUrl = function(details) {};
4065 * @param {Object.<string, string>} details Object with a 'url' key.
4066 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
4067 * @return {!Array.<!VisitItem>}
4069 chrome.history.getVisits = function(details, callback) {};
4073 * @param {Object.<string, string>} query Object with a 'text' (string)
4074 * key and optional 'startTime' (number), 'endTime' (number) and
4075 * 'maxResults' keys.
4076 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
4077 * @return {!Array.<!HistoryItem>}
4079 chrome.history.search = function(query, callback) {};
4082 /** @type {!ChromeEvent} */
4083 chrome.history.onVisitRemoved;
4086 /** @type {!ChromeEvent} */
4087 chrome.history.onVisited;
4092 * @see http://developer.chrome.com/apps/identity.html
4094 chrome.identity = {};
4098 * @param {(chrome.identity.TokenDetails|function(string=): void)}
4099 * detailsOrCallback Token options or a callback function if no options are
4101 * @param {function(string=): void=} opt_callback A callback function if options
4104 chrome.identity.getAuthToken = function(detailsOrCallback, opt_callback) {};
4107 /** @typedef {{interactive: (boolean|undefined)}} */
4108 chrome.identity.TokenDetails;
4112 * @param {chrome.identity.InvalidTokenDetails} details
4113 * @param {function(): void} callback
4115 chrome.identity.removeCachedAuthToken = function(details, callback) {};
4118 /** @typedef {{token: string}} */
4119 chrome.identity.InvalidTokenDetails;
4123 * @param {chrome.identity.WebAuthFlowDetails} details
4124 * @param {function(string=): void} callback
4126 chrome.identity.launchWebAuthFlow = function(details, callback) {};
4129 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
4130 chrome.identity.WebAuthFlowDetails;
4133 /** @param {function(!Object):void} callback */
4134 chrome.identity.getProfileUserInfo = function(callback) {};
4137 /** @type {!ChromeEvent} */
4138 chrome.identity.onSignInChanged;
4143 * @see https://developer.chrome.com/extensions/input.ime.html
4149 chrome.input.ime = {};
4154 * The OnKeyEvent event takes an extra argument.
4157 function ChromeInputImeOnKeyEventEvent() {}
4161 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4163 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
4165 ChromeInputImeOnKeyEventEvent.prototype.addListener =
4166 function(callback, opt_extraInfoSpec) {};
4170 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4173 ChromeInputImeOnKeyEventEvent.prototype.removeListener = function(callback) {};
4177 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4180 ChromeInputImeOnKeyEventEvent.prototype.hasListener = function(callback) {};
4184 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
4187 ChromeInputImeOnKeyEventEvent.prototype.hasListeners = function(callback) {};
4191 * @param {!Object.<string,number>} parameters An object with a
4192 * 'contextID' (number) key.
4193 * @param {function(boolean): void} callback Callback function.
4195 chrome.input.ime.clearComposition = function(parameters, callback) {};
4199 * @param {!Object.<string,(string|number)>} parameters An object with
4200 * 'contextID' (number) and 'text' (string) keys.
4201 * @param {function(boolean): void=} opt_callback Callback function.
4203 chrome.input.ime.commitText = function(parameters, opt_callback) {};
4207 * @param {!Object.<string,(string|number)>} parameters An object with
4208 * 'contextID' (number) and 'text' (string) keys.
4209 * @param {function(boolean): void=} opt_callback Callback function.
4211 chrome.input.ime.deleteSurroundingText = function(parameters, opt_callback) {};
4215 * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
4216 * parameters An object with 'engineID' (string) and 'properties'
4218 * @param {function(boolean): void=} opt_callback Callback function.
4220 chrome.input.ime.setCandidateWindowProperties =
4221 function(parameters, opt_callback) {};
4225 * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
4226 * parameters An object with 'contextID' (number) and 'candidates'
4227 * (array of object) keys.
4228 * @param {function(boolean): void=} opt_callback Callback function.
4230 chrome.input.ime.setCandidates = function(parameters, opt_callback) {};
4234 * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
4235 * parameters An object with 'contextID' (number), 'text' (string),
4236 * 'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
4237 * and 'segments' (array of object) keys.
4238 * @param {function(boolean): void=} opt_callback Callback function.
4240 chrome.input.ime.setComposition = function(parameters, opt_callback) {};
4244 * @param {!Object.<string,number>} parameters An object with
4245 * 'contextID' (number) and 'candidateID' (number) keys.
4246 * @param {function(boolean): void=} opt_callback Callback function.
4248 chrome.input.ime.setCursorPosition = function(parameters, opt_callback) {};
4252 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4253 * parameters An object with 'engineID' (string) and 'items'
4254 * (array of object) keys.
4255 * @param {function(): void=} opt_callback Callback function.
4257 chrome.input.ime.setMenuItems = function(parameters, opt_callback) {};
4261 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
4262 * parameters An object with 'engineID' (string) and 'items'
4263 * (array of object) keys.
4264 * @param {function(): void=} opt_callback Callback function.
4266 chrome.input.ime.updateMenuItems = function(parameters, opt_callback) {};
4270 * @param {string} requestId Request id of the event that was handled. This
4271 * should come from keyEvent.requestId.
4272 * @param {boolean} response True if the keystroke was handled, false if not.
4274 chrome.input.ime.keyEventHandled = function(requestId, response) {};
4277 /** @type {!ChromeEvent} */
4278 chrome.input.ime.onActivate;
4281 /** @type {!ChromeEvent} */
4282 chrome.input.ime.onBlur;
4285 /** @type {!ChromeEvent} */
4286 chrome.input.ime.onCandidateClicked;
4289 /** @type {!ChromeEvent} */
4290 chrome.input.ime.onDeactivated;
4293 /** @type {!ChromeEvent} */
4294 chrome.input.ime.onFocus;
4297 /** @type {!ChromeEvent} */
4298 chrome.input.ime.onInputContextUpdate;
4301 /** @type {!ChromeInputImeOnKeyEventEvent} */
4302 chrome.input.ime.onKeyEvent;
4305 /** @type {!ChromeEvent} */
4306 chrome.input.ime.onMenuItemActivated;
4309 /** @type {!ChromeEvent} */
4310 chrome.input.ime.onReset;
4313 /** @type {!ChromeEvent} */
4314 chrome.input.ime.onSurroundingTextChanged;
4319 * @see http://developer.chrome.com/apps/mediaGalleries
4322 chrome.mediaGalleries = {};
4326 * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
4327 * detailsOrCallback A details object for whether the request should be
4328 * interactive if permissions haven't been granted yet or the callback.
4329 * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
4330 * no details were supplied as arg1.
4332 chrome.mediaGalleries.getMediaFileSystems = function(
4333 detailsOrCallback, opt_callback) {};
4337 * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
4339 chrome.mediaGalleries.addUserSelectedFolder = function(callback) {};
4343 * @param {string} galleryId ID of the media gallery.
4344 * @param {function()=} opt_callback Optional callback function.
4346 chrome.mediaGalleries.dropPermissionForMediaFileSystem =
4347 function(galleryId, opt_callback) {};
4350 chrome.mediaGalleries.startMediaScan = function() {};
4353 chrome.mediaGalleries.cancelMediaScan = function() {};
4357 * @param {function(!Array.<!FileSystem>)} callback Callback function.
4359 chrome.mediaGalleries.addScanResults = function(callback) {};
4365 * galleryId: string,
4366 * deviceId: (string|undefined),
4367 * isRemovable: boolean,
4368 * isMediaDevice: boolean,
4369 * isAvailable: boolean
4372 chrome.mediaGalleries.MediaFileSystemMetadata;
4376 * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
4377 * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
4379 chrome.mediaGalleries.getMediaFileSystemMetadata = function(mediaFileSystem) {};
4383 * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
4384 * callback Callback function.
4386 chrome.mediaGalleries.getAllMediaFileSystemMetadata = function(callback) {};
4392 * height: (number|undefined),
4393 * width: (number|undefined),
4394 * xResolution: (number|undefined),
4395 * yResolution: (number|undefined),
4396 * duration: (number|undefined),
4397 * rotation: (number|undefined),
4398 * cameraMake: (string|undefined),
4399 * cameraModel: (string|undefined),
4400 * exposureTimeSeconds: (number|undefined),
4401 * flashFired: (boolean|undefined),
4402 * fNumber: (number|undefined),
4403 * focalLengthMm: (number|undefined),
4404 * isoEquivalent: (number|undefined),
4405 * album: (string|undefined),
4406 * artist: (string|undefined),
4407 * comment: (string|undefined),
4408 * copyright: (string|undefined),
4409 * disc: (number|undefined),
4410 * genre: (string|undefined),
4411 * language: (string|undefined),
4412 * title: (string|undefined),
4413 * track: (number|undefined),
4414 * rawTags: !Array.<!chrome.mediaGalleries.metadata.RawTag>,
4415 * attachedImages: !Array.<!Blob>
4418 chrome.mediaGalleries.MetaData;
4422 chrome.mediaGalleries.metadata = {};
4426 chrome.mediaGalleries.metadata.RawTag = function() {};
4429 /** @type {string} */
4430 chrome.mediaGalleries.metadata.RawTag.prototype.type;
4433 /** @type {!Object.<string, string>} */
4434 chrome.mediaGalleries.metadata.RawTag.prototype.tags;
4438 * @param {!Blob} mediaFile The media file for which to get metadata.
4439 * @param {{metadataType: (string|undefined)}|
4440 * function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
4441 * for the metadata to retrieve or the callback to invoke with the metadata.
4442 * The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
4443 * 'all' if the metadataType is omitted.
4444 * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
4445 * were passed as arg2, the callback to invoke with the metadata.
4447 chrome.mediaGalleries.getMetadata = function(
4448 mediaFile, optionsOrCallback, opt_callback) {};
4452 * @typedef {function({galleryId: string, success: boolean}): void}
4454 chrome.mediaGalleries.AddGalleryWatchCallback;
4458 * @param {string} galleryId The media gallery's ID.
4459 * @param {!chrome.mediaGalleries.AddGalleryWatchCallback} callback Fired with
4460 * success or failure result.
4462 chrome.mediaGalleries.addGalleryWatch = function(galleryId, callback) {};
4466 * @param {string} galleryId The media gallery's ID.
4468 chrome.mediaGalleries.removeGalleryWatch = function(galleryId) {};
4472 * @param {function(!Array.<string>): void} callback Callback function notifies
4473 * which galleries are being watched.
4475 chrome.mediaGalleries.getAllGalleryWatch = function(callback) {};
4478 chrome.mediaGalleries.removeAllGalleryWatch = function() {};
4485 chrome.mediaGalleries.GalleryChangeEvent = function() {};
4489 * @typedef {function({type: string, galleryId: string}): void}
4491 chrome.mediaGalleries.GalleryChangeCallback;
4495 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4497 chrome.mediaGalleries.GalleryChangeEvent.prototype.addListener =
4498 function(callback) {};
4502 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4504 chrome.mediaGalleries.GalleryChangeEvent.prototype.removeListener =
4505 function(callback) {};
4509 * @param {!chrome.mediaGalleries.GalleryChangeCallback} callback
4511 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListener =
4512 function(callback) {};
4518 chrome.mediaGalleries.GalleryChangeEvent.prototype.hasListeners = function() {};
4522 * @type {!chrome.mediaGalleries.GalleryChangeEvent}
4524 chrome.mediaGalleries.onGalleryChanged;
4530 * galleryCount: (number|undefined),
4531 * audioCount: (number|undefined),
4532 * imageCount: (number|undefined),
4533 * videoCount: (number|undefined)
4536 chrome.mediaGalleries.OnScanProgressDetails;
4541 * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
4545 chrome.mediaGalleries.ScanProgressEvent = function() {};
4548 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4549 chrome.mediaGalleries.ScanProgressEvent.prototype.addListener =
4550 function(callback) {};
4553 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
4554 chrome.mediaGalleries.ScanProgressEvent.prototype.removeListener =
4555 function(callback) {};
4559 * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
4562 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListener =
4563 function(callback) {};
4566 /** @return {boolean} */
4567 chrome.mediaGalleries.ScanProgressEvent.prototype.hasListeners = function() {};
4570 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
4571 chrome.mediaGalleries.onScanProgress;
4576 * @see https://developer.chrome.com/extensions/pageCapture.html
4578 chrome.pageCapture = {};
4582 * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
4583 * @param {function(Blob=): void} callback Callback function.
4585 chrome.pageCapture.saveAsMHTML = function(details, callback) {};
4590 * @see https://developer.chrome.com/extensions/permissions.html
4592 chrome.permissions = {};
4597 * permissions: (Array.<string>|undefined),
4598 * origins: (Array.<string>|undefined)
4600 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
4602 chrome.permissions.Permissions;
4606 * @param {!chrome.permissions.Permissions} permissions
4607 * @param {function(boolean): void} callback Callback function.
4609 chrome.permissions.contains = function(permissions, callback) {};
4613 * @param {function(!chrome.permissions.Permissions): void} callback
4614 * Callback function.
4616 chrome.permissions.getAll = function(callback) {};
4620 * @param {!chrome.permissions.Permissions} permissions
4621 * @param {function(boolean): void=} opt_callback Callback function.
4623 chrome.permissions.remove = function(permissions, opt_callback) {};
4627 * @param {!chrome.permissions.Permissions} permissions
4628 * @param {function(boolean): void=} opt_callback Callback function.
4630 chrome.permissions.request = function(permissions, opt_callback) {};
4633 /** @type {!ChromeEvent} */
4634 chrome.permissions.onAdded;
4637 /** @type {!ChromeEvent} */
4638 chrome.permissions.onRemoved;
4642 * @see http://developer.chrome.com/dev/extensions/power.html
4648 * @param {string} level A string describing the degree to which power
4649 * management should be disabled, should be either "system" or "display".
4651 chrome.power.requestKeepAwake = function(level) {};
4655 * Releases a request previously made via requestKeepAwake().
4657 chrome.power.releaseKeepAwake = function() {};
4662 * @see https://developer.chrome.com/extensions/privacy.html
4664 chrome.privacy = {};
4667 /** @type {!Object.<string,!ChromeSetting>} */
4668 chrome.privacy.network;
4671 /** @type {!Object.<string,!ChromeSetting>} */
4672 chrome.privacy.services;
4675 /** @type {!Object.<string,!ChromeSetting>} */
4676 chrome.privacy.websites;
4681 * @see https://developer.chrome.com/extensions/proxy.html
4686 /** @type {!Object.<string,!ChromeSetting>} */
4687 chrome.proxy.settings;
4690 /** @type {!ChromeEvent} */
4691 chrome.proxy.onProxyError;
4696 * @see http://developer.chrome.com/apps/socket.html
4705 chrome.socket.CreateInfo = function() {};
4708 /** @type {number} */
4709 chrome.socket.CreateInfo.prototype.socketId;
4716 chrome.socket.ReadInfo = function() {};
4719 /** @type {number} */
4720 chrome.socket.ReadInfo.prototype.resultCode;
4723 /** @type {!ArrayBuffer} */
4724 chrome.socket.ReadInfo.prototype.data;
4731 chrome.socket.WriteInfo = function() {};
4734 /** @type {number} */
4735 chrome.socket.WriteInfo.prototype.bytesWritten;
4742 chrome.socket.RecvFromInfo = function() {};
4745 /** @type {number} */
4746 chrome.socket.RecvFromInfo.prototype.resultCode;
4749 /** @type {!ArrayBuffer} */
4750 chrome.socket.RecvFromInfo.prototype.data;
4753 /** @type {string} */
4754 chrome.socket.RecvFromInfo.prototype.address;
4757 /** @type {number} */
4758 chrome.socket.RecvFromInfo.prototype.port;
4765 chrome.socket.AcceptInfo = function() {};
4768 /** @type {number} */
4769 chrome.socket.AcceptInfo.prototype.resultCode;
4772 /** @type {(number|undefined)} */
4773 chrome.socket.AcceptInfo.prototype.socketId;
4780 chrome.socket.SocketInfo = function() {};
4783 /** @type {string} */
4784 chrome.socket.SocketInfo.prototype.socketType;
4787 /** @type {boolean} */
4788 chrome.socket.SocketInfo.prototype.connected;
4791 /** @type {(string|undefined)} */
4792 chrome.socket.SocketInfo.prototype.peerAddress;
4795 /** @type {(number|undefined)} */
4796 chrome.socket.SocketInfo.prototype.peerPort;
4799 /** @type {(string|undefined)} */
4800 chrome.socket.SocketInfo.prototype.localAddress;
4803 /** @type {(number|undefined)} */
4804 chrome.socket.SocketInfo.prototype.localPort;
4811 chrome.socket.NetworkAdapterInfo = function() {};
4814 /** @type {string} */
4815 chrome.socket.NetworkAdapterInfo.prototype.name;
4818 /** @type {string} */
4819 chrome.socket.NetworkAdapterInfo.prototype.address;
4823 * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4824 * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4825 * socket options or callback.
4826 * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4827 * socket has been created.
4829 chrome.socket.create = function(type, optionsOrCallback, opt_callback) {};
4833 * @param {number} socketId The id of the socket to destroy.
4835 chrome.socket.destroy = function(socketId) {};
4839 * @param {number} socketId The id of the socket.
4840 * @param {string} hostname The hostname or IP address of the remote machine.
4841 * @param {number} port The port of the remote machine.
4842 * @param {function(number)} callback Called when the connection attempt is
4845 chrome.socket.connect = function(socketId, hostname, port, callback) {};
4849 * @param {number} socketId The id of the socket.
4850 * @param {string} address The address of the local machine.
4851 * @param {number} port The port of the local machine.
4852 * @param {function(number)} callback Called when the bind attempt is complete.
4854 chrome.socket.bind = function(socketId, address, port, callback) {};
4858 * @param {number} socketId The id of the socket to disconnect.
4860 chrome.socket.disconnect = function(socketId) {};
4864 * @param {number} socketId The id of the socket to read from.
4865 * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4866 * read buffer size or the callback.
4867 * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4868 * that was available to be read without blocking.
4870 chrome.socket.read = function(socketId, bufferSizeOrCallback, opt_callback) {};
4874 * @param {number} socketId The id of the socket to write to.
4875 * @param {!ArrayBuffer} data The data to write.
4876 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4877 * operation completes without blocking or an error occurs.
4879 chrome.socket.write = function(socketId, data, callback) {};
4883 * @param {number} socketId The id of the socket to read from.
4884 * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4885 * The read buffer size or the callback.
4886 * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4887 * that was available to be read without blocking.
4889 chrome.socket.recvFrom = function(socketId, bufferSizeOrCallback,
4894 * @param {number} socketId The id of the socket to write to.
4895 * @param {!ArrayBuffer} data The data to write.
4896 * @param {string} address The address of the remote machine.
4897 * @param {number} port The port of the remote machine.
4898 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4899 * operation completes without blocking or an error occurs.
4901 chrome.socket.sendTo = function(socketId, data, address, port, callback) {};
4905 * @param {number} socketId The id of the socket to listen on.
4906 * @param {string} address The address of the local machine to listen on. Use
4907 * '0' to listen on all addresses.
4908 * @param {number} port The port of the local machine.
4909 * @param {(number|function(number))} backlogOrCallback The length of the
4910 * socket's listen queue or the callback.
4911 * @param {function(number)=} opt_callback Called when the listen operation
4914 chrome.socket.listen =
4915 function(socketId, address, port, backlogOrCallback, opt_callback) {};
4919 * @param {number} socketId The id of the socket to accept a connection on.
4920 * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4921 * socket is accepted.
4923 chrome.socket.accept = function(socketId, callback) {};
4927 * @param {number} socketId The id of the socket to listen on.
4928 * @param {boolean} enable If true, enable keep-alive functionality.
4929 * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4930 * between the last packet received and the first keepalive probe (default
4931 * is 0) or the callback
4932 * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4935 chrome.socket.setKeepAlive = function(socketId, enable, delayOrCallback,
4940 * @param {number} socketId The id of the socket to listen on.
4941 * @param {boolean} noDelay If true, disables Nagle's algorithm.
4942 * @param {function(boolean)} callback Called when the setNoDelay attempt is
4945 chrome.socket.setNoDelay = function(socketId, noDelay, callback) {};
4949 * @param {number} socketId The id of the socket.
4950 * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4953 chrome.socket.getInfo = function(socketId, callback) {};
4957 * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
4958 * when local adapter information is available.
4960 chrome.socket.getNetworkList = function(callback) {};
4964 * @param {number} socketId The id of the socket.
4965 * @param {string} address The group address to join. Domain names are not
4967 * @param {function(number)} callback Called when the join operation is done.
4969 chrome.socket.joinGroup = function(socketId, address, callback) {};
4973 * @param {number} socketId The id of the socket.
4974 * @param {string} address The group address to leave. Domain names are not
4976 * @param {function(number)} callback Called when the leave operation is done.
4978 chrome.socket.leaveGroup = function(socketId, address, callback) {};
4982 * @param {number} socketId The id of the socket.
4983 * @param {number} ttl The time-to-live value.
4984 * @param {function(number)} callback Called when the configuration operation is
4987 chrome.socket.setMulticastTimeToLive = function(socketId, ttl, callback) {};
4991 * @param {number} socketId The id of the socket.
4992 * @param {boolean} enabled True to enable loopback mode.
4993 * @param {function(number)} callback Called when the configuration operation is
4996 chrome.socket.setMulticastLoopbackMode = function(socketId, enabled,
5001 * @param {number} socketId The id of the socket.
5002 * @param {function(!Array.<string>)} callback Called with an array of string
5005 chrome.socket.getJoinedGroups = function(socketId, callback) {};
5011 chrome.sockets = {};
5016 * @see https://developer.chrome.com/apps/sockets_tcp
5018 chrome.sockets.tcp = {};
5024 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketInfo
5026 chrome.sockets.tcp.SocketInfo = function() {};
5029 /** @type {number} */
5030 chrome.sockets.tcp.SocketInfo.prototype.socketId;
5033 /** @type {boolean} */
5034 chrome.sockets.tcp.SocketInfo.prototype.persistent;
5037 /** @type {string|undefined} */
5038 chrome.sockets.tcp.SocketInfo.prototype.name;
5041 /** @type {number|undefined} */
5042 chrome.sockets.tcp.SocketInfo.prototype.bufferSize;
5045 /** @type {boolean} */
5046 chrome.sockets.tcp.SocketInfo.prototype.paused;
5049 /** @type {boolean} */
5050 chrome.sockets.tcp.SocketInfo.prototype.connected;
5053 /** @type {string|undefined} */
5054 chrome.sockets.tcp.SocketInfo.prototype.localAddress;
5057 /** @type {number|undefined} */
5058 chrome.sockets.tcp.SocketInfo.prototype.localPort;
5061 /** @type {string|undefined} */
5062 chrome.sockets.tcp.SocketInfo.prototype.peerAddress;
5065 /** @type {number|undefined} */
5066 chrome.sockets.tcp.SocketInfo.prototype.peerPort;
5071 * persistent: (boolean|undefined),
5072 * name: (string|undefined),
5073 * bufferSize: (number|undefined)
5075 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketProperties
5077 chrome.sockets.tcp.SocketProperties;
5082 * min: (string|undefined),
5083 * max: (string|undefined)
5085 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5087 chrome.sockets.tcp.SecurePropertiesTlsVersion;
5092 * tlsVersion: (chrome.sockets.tcp.SecurePropertiesTlsVersion|undefined)
5094 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5096 chrome.sockets.tcp.SecureProperties;
5100 * @param {!chrome.sockets.tcp.SocketProperties|
5101 * function(!Object)} propertiesOrCallback
5102 * @param {function(!Object)=} opt_callback
5103 * @see https://developer.chrome.com/apps/sockets_tcp#method-create
5105 chrome.sockets.tcp.create = function(propertiesOrCallback, opt_callback) {};
5109 * @param {number} socketId
5110 * @param {!chrome.sockets.tcp.SocketProperties} properties
5111 * @param {function()=} opt_callback
5112 * @see https://developer.chrome.com/apps/sockets_tcp#method-update
5114 chrome.sockets.tcp.update = function(socketId, properties, opt_callback) {};
5118 * @param {number} socketId
5119 * @param {boolean} paused
5120 * @param {function()=} opt_callback
5121 * @see https://developer.chrome.com/apps/sockets_tcp#method-setPaused
5123 chrome.sockets.tcp.setPaused = function(socketId, paused, opt_callback) {};
5127 * @param {number} socketId
5128 * @param {boolean} enable
5129 * @param {(number|function(number))} delayOrCallback
5130 * @param {function(number)=} opt_callback
5131 * @see https://developer.chrome.com/apps/sockets_tcp#method-setKeepAlive
5133 chrome.sockets.tcp.setKeepAlive = function(socketId, enable, delayOrCallback,
5138 * @param {number} socketId
5139 * @param {boolean} noDelay
5140 * @param {function(number)} callback
5141 * @see https://developer.chrome.com/apps/sockets_tcp#method-setNoDelay
5143 chrome.sockets.tcp.setNoDelay = function(socketId, noDelay, callback) {};
5147 * @param {number} socketId
5148 * @param {string} peerAddress
5149 * @param {number} peerPort
5150 * @param {function(number)} callback
5151 * @see https://developer.chrome.com/apps/sockets_tcp#method-connect
5153 chrome.sockets.tcp.connect = function(socketId, peerAddress, peerPort,
5158 * @param {number} socketId The id of the socket to disconnect.
5159 * @param {function()=} opt_callback
5160 * @see https://developer.chrome.com/apps/sockets_tcp#method-disconnect
5162 chrome.sockets.tcp.disconnect = function(socketId, opt_callback) {};
5166 * @param {number} socketId
5167 * @param {!chrome.sockets.tcp.SecureProperties|function(number)}
5169 * @param {function(number)=} opt_callback
5170 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
5172 chrome.sockets.tcp.secure = function(socketId, optionsOrCallback,
5177 * @param {number} socketId
5178 * @param {!ArrayBuffer} data
5179 * @param {function(!Object)} callback
5180 * @see https://developer.chrome.com/apps/sockets_tcp#method-send
5182 chrome.sockets.tcp.send = function(socketId, data, callback) {};
5186 * @param {number} socketId
5187 * @param {function()=} opt_callback
5188 * @see https://developer.chrome.com/apps/sockets_tcp#method-close
5190 chrome.sockets.tcp.close = function(socketId, opt_callback) {};
5194 * @param {number} socketId
5195 * @param {function(!chrome.sockets.tcp.SocketInfo)} callback
5196 * @see https://developer.chrome.com/apps/sockets_tcp#method-getInfo
5198 chrome.sockets.tcp.getInfo = function(socketId, callback) {};
5202 * @param {function(!Array.<!chrome.sockets.tcp.SocketInfo>)} callback
5203 * @see https://developer.chrome.com/apps/sockets_tcp#method-getSockets
5205 chrome.sockets.tcp.getSockets = function(callback) {};
5211 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceive
5213 chrome.sockets.tcp.ReceiveEventData = function() {};
5216 /** @type {number} */
5217 chrome.sockets.tcp.ReceiveEventData.prototype.socketId;
5220 /** @type {!ArrayBuffer} */
5221 chrome.sockets.tcp.ReceiveEventData.prototype.data;
5226 * Event whose listeners take a ReceiveEventData parameter.
5229 chrome.sockets.tcp.ReceiveEvent = function() {};
5233 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5235 chrome.sockets.tcp.ReceiveEvent.prototype.addListener =
5236 function(callback) {};
5240 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5242 chrome.sockets.tcp.ReceiveEvent.prototype.removeListener =
5243 function(callback) {};
5247 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
5250 chrome.sockets.tcp.ReceiveEvent.prototype.hasListener =
5251 function(callback) {};
5254 /** @return {boolean} */
5255 chrome.sockets.tcp.ReceiveEvent.prototype.hasListeners = function() {};
5258 /** @type {!chrome.sockets.tcp.ReceiveEvent} */
5259 chrome.sockets.tcp.onReceive;
5265 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceiveError
5267 chrome.sockets.tcp.ReceiveErrorEventData = function() {};
5270 /** @type {number} */
5271 chrome.sockets.tcp.ReceiveErrorEventData.prototype.socketId;
5274 /** @type {number} */
5275 chrome.sockets.tcp.ReceiveErrorEventData.prototype.resultCode;
5280 * Event whose listeners take a ReceiveErrorEventData parameter.
5283 chrome.sockets.tcp.ReceiveErrorEvent = function() {};
5288 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5290 chrome.sockets.tcp.ReceiveErrorEvent.prototype.addListener =
5291 function(callback) {};
5296 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5298 chrome.sockets.tcp.ReceiveErrorEvent.prototype.removeListener =
5299 function(callback) {};
5304 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
5307 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListener =
5308 function(callback) {};
5311 /** @return {boolean} */
5312 chrome.sockets.tcp.ReceiveErrorEvent.prototype.hasListeners =
5316 /** @type {!chrome.sockets.tcp.ReceiveErrorEvent} */
5317 chrome.sockets.tcp.onReceiveError;
5322 * @see https://developer.chrome.com/extensions/storage.html
5324 chrome.storage = {};
5327 /** @type {!StorageArea} */
5328 chrome.storage.sync;
5331 /** @type {!StorageArea} */
5332 chrome.storage.local;
5335 /** @type {!StorageChangeEvent} */
5336 chrome.storage.onChanged;
5345 * @see https://developer.chrome.com/extensions/system_cpu.html
5347 chrome.system.cpu = {};
5351 * @param {function(!Object)} callback
5353 chrome.system.cpu.getInfo = function(callback) {};
5358 * @see http://developer.chrome.com/apps/system_display.html
5360 chrome.system.display = {};
5363 /** @type {!ChromeEvent} */
5364 chrome.system.display.onDisplayChanged;
5371 chrome.system.display.Bounds = function() {};
5374 /** @type {number} */
5375 chrome.system.display.Bounds.prototype.left;
5378 /** @type {number} */
5379 chrome.system.display.Bounds.prototype.top;
5382 /** @type {number} */
5383 chrome.system.display.Bounds.prototype.width;
5386 /** @type {number} */
5387 chrome.system.display.Bounds.prototype.height;
5392 * left: (number|undefined),
5393 * top: (number|undefined),
5394 * right: (number|undefined),
5395 * bottom: (number|undefined)
5398 chrome.system.display.Insets;
5405 chrome.system.display.DisplayInfo = function() {};
5408 /** @type {string} */
5409 chrome.system.display.DisplayInfo.prototype.id;
5412 /** @type {string} */
5413 chrome.system.display.DisplayInfo.prototype.name;
5416 /** @type {string} */
5417 chrome.system.display.DisplayInfo.prototype.mirroringSourceId;
5420 /** @type {boolean} */
5421 chrome.system.display.DisplayInfo.prototype.isPrimary;
5424 /** @type {boolean} */
5425 chrome.system.display.DisplayInfo.prototype.isInternal;
5428 /** @type {boolean} */
5429 chrome.system.display.DisplayInfo.prototype.isEnabled;
5432 /** @type {number} */
5433 chrome.system.display.DisplayInfo.prototype.dpiX;
5436 /** @type {number} */
5437 chrome.system.display.DisplayInfo.prototype.dpiY;
5440 /** @type {number} */
5441 chrome.system.display.DisplayInfo.prototype.rotation;
5444 /** @type {!chrome.system.display.Bounds} */
5445 chrome.system.display.DisplayInfo.prototype.bounds;
5448 /** @type {!chrome.system.display.Insets} */
5449 chrome.system.display.DisplayInfo.prototype.overscan;
5452 /** @type {!chrome.system.display.Bounds} */
5453 chrome.system.display.DisplayInfo.prototype.workArea;
5458 * mirroringSourceId: (string|undefined),
5459 * isPrimary: (boolean|undefined),
5460 * overscan: (!chrome.system.display.Insets|undefined),
5461 * rotation: (number|undefined),
5462 * boundsOriginX: (number|undefined),
5463 * boundsOriginY: (number|undefined)
5466 chrome.system.display.SettableDisplayInfo;
5474 * format: (string|undefined),
5475 * quality: (number|undefined)
5478 chrome.types.ImageDetails;
5482 * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
5483 * callback Called with an array of objects representing display info.
5485 chrome.system.display.getInfo = function(callback) {};
5489 * @param {string} id The display's unique identifier.
5490 * @param {!chrome.system.display.SettableDisplayInfo} info The information
5491 * about display properties that should be changed.
5492 * @param {function()=} opt_callback The callback to execute when the display
5493 * info has been changed.
5495 chrome.system.display.setDisplayProperties =
5496 function(id, info, opt_callback) {};
5501 * @see https://developer.chrome.com/extensions/types.html
5503 chrome.chromeSetting = {};
5506 /** @type {!ChromeEvent} */
5507 chrome.chromeSetting.onChange;
5512 * @see https://developer.chrome.com/extensions/webNavigation.html
5514 chrome.webNavigation = {};
5518 * @param {Object} details Object with a 'tabId' (number) key.
5519 * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
5520 * Callback function.
5522 chrome.webNavigation.getAllFrames = function(details, callback) {};
5526 * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
5528 * @param {function(Object.<string, (boolean|string)>)} callback
5529 * Callback function.
5531 chrome.webNavigation.getFrame = function(details, callback) {};
5534 /** @type {!ChromeEvent} */
5535 chrome.webNavigation.onBeforeNavigate;
5538 /** @type {!ChromeEvent} */
5539 chrome.webNavigation.onCommitted;
5542 /** @type {!ChromeEvent} */
5543 chrome.webNavigation.onDOMContentLoaded;
5546 /** @type {!ChromeEvent} */
5547 chrome.webNavigation.onCompleted;
5550 /** @type {!ChromeEvent} */
5551 chrome.webNavigation.onErrorOccurred;
5554 /** @type {!ChromeEvent} */
5555 chrome.webNavigation.onCreatedNavigationTarget;
5558 /** @type {!ChromeEvent} */
5559 chrome.webNavigation.onReferenceFragmentUpdated;
5562 /** @type {!ChromeEvent} */
5563 chrome.webNavigation.onTabReplaced;
5566 /** @type {!ChromeEvent} */
5567 chrome.webNavigation.onHistoryStateUpdated;
5572 * Most event listeners for WebRequest take extra arguments.
5573 * @see https://developer.chrome.com/extensions/webRequest.html.
5576 function WebRequestEvent() {}
5580 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5582 * @param {!RequestFilter} filter A set of filters that restrict
5583 * the events that will be sent to this listener.
5584 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
5585 * that should be passed to the listener function.
5587 WebRequestEvent.prototype.addListener =
5588 function(listener, filter, opt_extraInfoSpec) {};
5592 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5595 WebRequestEvent.prototype.removeListener = function(listener) {};
5599 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5602 WebRequestEvent.prototype.hasListener = function(listener) {};
5606 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
5609 WebRequestEvent.prototype.hasListeners = function(listener) {};
5614 * The onErrorOccurred event takes one less parameter than the others.
5615 * @see https://developer.chrome.com/extensions/webRequest.html.
5618 function WebRequestOnErrorOccurredEvent() {}
5622 * @param {function(!Object): void} listener Listener function.
5623 * @param {!RequestFilter} filter A set of filters that restrict
5624 * the events that will be sent to this listener.
5626 WebRequestOnErrorOccurredEvent.prototype.addListener =
5627 function(listener, filter) {};
5631 * @param {function(!Object): void} listener Listener function.
5633 WebRequestOnErrorOccurredEvent.prototype.removeListener = function(listener) {};
5637 * @param {function(!Object): void} listener Listener function.
5639 WebRequestOnErrorOccurredEvent.prototype.hasListener = function(listener) {};
5643 * @param {function(!Object): void} listener Listener function.
5645 WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
5650 * @see https://developer.chrome.com/extensions/webRequest.html
5652 chrome.webRequest = {};
5656 * @param {function(): void=} opt_callback Callback function.
5658 chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
5661 /** @type {!WebRequestEvent} */
5662 chrome.webRequest.onAuthRequired;
5665 /** @type {!WebRequestEvent} */
5666 chrome.webRequest.onBeforeRedirect;
5669 /** @type {!WebRequestEvent} */
5670 chrome.webRequest.onBeforeRequest;
5673 /** @type {!WebRequestEvent} */
5674 chrome.webRequest.onBeforeSendHeaders;
5677 /** @type {!WebRequestEvent} */
5678 chrome.webRequest.onCompleted;
5681 /** @type {!WebRequestOnErrorOccurredEvent} */
5682 chrome.webRequest.onErrorOccurred;
5685 /** @type {!WebRequestEvent} */
5686 chrome.webRequest.onHeadersReceived;
5689 /** @type {!WebRequestEvent} */
5690 chrome.webRequest.onResponseStarted;
5693 /** @type {!WebRequestEvent} */
5694 chrome.webRequest.onSendHeaders;
5702 * @see https://developer.chrome.com/extensions/management.html
5705 function ExtensionInfo() {}
5708 /** @type {string} */
5709 ExtensionInfo.prototype.id;
5712 /** @type {string} */
5713 ExtensionInfo.prototype.name;
5716 /** @type {string} */
5717 ExtensionInfo.prototype.shortName;
5720 /** @type {string} */
5721 ExtensionInfo.prototype.description;
5724 /** @type {string} */
5725 ExtensionInfo.prototype.version;
5728 /** @type {boolean} */
5729 ExtensionInfo.prototype.mayDisable;
5732 /** @type {boolean} */
5733 ExtensionInfo.prototype.enabled;
5736 /** @type {string|undefined} */
5737 ExtensionInfo.prototype.disabledReason;
5740 /** @type {boolean} */
5741 ExtensionInfo.prototype.isApp;
5744 /** @type {string} */
5745 ExtensionInfo.prototype.type;
5748 /** @type {string|undefined} */
5749 ExtensionInfo.prototype.appLaunchUrl;
5752 /** @type {string|undefined} */
5753 ExtensionInfo.prototype.homepageUrl;
5756 /** @type {string|undefined} */
5757 ExtensionInfo.prototype.updateUrl;
5760 /** @type {boolean} */
5761 ExtensionInfo.prototype.offlineEnabled;
5764 /** @type {string} */
5765 ExtensionInfo.prototype.optionsUrl;
5768 /** @type {!Array.<!IconInfo>|undefined} */
5769 ExtensionInfo.prototype.icons;
5772 /** @type {!Array.<string>} */
5773 ExtensionInfo.prototype.permissions;
5776 /** @type {!Array.<string>} */
5777 ExtensionInfo.prototype.hostPermissions;
5780 /** @type {string} */
5781 ExtensionInfo.prototype.installType;
5784 /** @type {string|undefined} */
5785 ExtensionInfo.prototype.launchType;
5788 /** @type {!Array.<string>|undefined} */
5789 ExtensionInfo.prototype.availableLaunchTypes;
5794 * @see https://developer.chrome.com/extensions/management.html
5797 function IconInfo() {}
5800 /** @type {number} */
5801 IconInfo.prototype.size;
5804 /** @type {string} */
5805 IconInfo.prototype.url;
5812 * @see https://developer.chrome.com/extensions/windows.html
5815 function ChromeWindow() {}
5818 /** @type {number} */
5819 ChromeWindow.prototype.id;
5822 /** @type {boolean} */
5823 ChromeWindow.prototype.focused;
5826 /** @type {number} */
5827 ChromeWindow.prototype.top;
5830 /** @type {number} */
5831 ChromeWindow.prototype.left;
5834 /** @type {number} */
5835 ChromeWindow.prototype.width;
5838 /** @type {number} */
5839 ChromeWindow.prototype.height;
5842 /** @type {Array.<Tab>} */
5843 ChromeWindow.prototype.tabs;
5846 /** @type {boolean} */
5847 ChromeWindow.prototype.incognito;
5850 /** @type {string} */
5851 ChromeWindow.prototype.type;
5854 /** @type {string} */
5855 ChromeWindow.prototype.state;
5858 /** @type {boolean} */
5859 ChromeWindow.prototype.alwaysOnTop;
5864 * Event whose listeners take an ExtensionInfo parameter.
5867 function ChromeExtensionInfoEvent() {}
5870 /** @param {function(!ExtensionInfo): void} callback */
5871 ChromeExtensionInfoEvent.prototype.addListener = function(callback) {};
5874 /** @param {function(!ExtensionInfo): void} callback */
5875 ChromeExtensionInfoEvent.prototype.removeListener = function(callback) {};
5879 * @param {function(!ExtensionInfo): void} callback
5882 ChromeExtensionInfoEvent.prototype.hasListener = function(callback) {};
5885 /** @return {boolean} */
5886 ChromeExtensionInfoEvent.prototype.hasListeners = function() {};
5891 * @see http://developer.chrome.com/extensions/pushMessaging.html
5894 chrome.pushMessaging = {};
5898 * @type {!chrome.pushMessaging.PushMessageEvent}
5900 chrome.pushMessaging.onMessage;
5904 * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
5905 * interactiveOrCallback Either a flag(optional), if set to true, user will
5906 * be asked to log in if they are not already logged in, or, when he flag is
5907 * not given, the callback.
5908 * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
5911 chrome.pushMessaging.getChannelId =
5912 function(interactiveOrCallback, opt_callback) {};
5917 * Event whose listeners take a chrome.pushMessaging.Message parameter.
5920 chrome.pushMessaging.PushMessageEvent = function() {};
5924 * @param {function(!chrome.pushMessaging.Message): void} callback
5926 chrome.pushMessaging.PushMessageEvent.prototype.addListener =
5927 function(callback) {};
5931 * @param {function(!chrome.pushMessaging.Message): void} callback
5933 chrome.pushMessaging.PushMessageEvent.prototype.removeListener =
5934 function(callback) {};
5938 * @param {function(!chrome.pushMessaging.Message): void} callback
5941 chrome.pushMessaging.PushMessageEvent.prototype.hasListener =
5942 function(callback) {};
5948 chrome.pushMessaging.PushMessageEvent.prototype.hasListeners = function() {};
5954 * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
5957 function BookmarkTreeNode() {}
5960 /** @type {string} */
5961 BookmarkTreeNode.prototype.id;
5964 /** @type {string|undefined} */
5965 BookmarkTreeNode.prototype.parentId;
5968 /** @type {number|undefined} */
5969 BookmarkTreeNode.prototype.index;
5972 /** @type {string|undefined} */
5973 BookmarkTreeNode.prototype.url;
5976 /** @type {string} */
5977 BookmarkTreeNode.prototype.title;
5980 /** @type {number|undefined} */
5981 BookmarkTreeNode.prototype.dateAdded;
5984 /** @type {number|undefined} */
5985 BookmarkTreeNode.prototype.dateGroupModified;
5988 /** @type {string|undefined} */
5989 BookmarkTreeNode.prototype.unmodifiable;
5992 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
5993 BookmarkTreeNode.prototype.children;
5998 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
6001 function Cookie() {}
6004 /** @type {string} */
6005 Cookie.prototype.name;
6008 /** @type {string} */
6009 Cookie.prototype.value;
6012 /** @type {string} */
6013 Cookie.prototype.domain;
6016 /** @type {boolean} */
6017 Cookie.prototype.hostOnly;
6020 /** @type {string} */
6021 Cookie.prototype.path;
6024 /** @type {boolean} */
6025 Cookie.prototype.secure;
6028 /** @type {boolean} */
6029 Cookie.prototype.httpOnly;
6032 /** @type {boolean} */
6033 Cookie.prototype.session;
6036 /** @type {number} */
6037 Cookie.prototype.expirationDate;
6040 /** @type {string} */
6041 Cookie.prototype.storeId;
6046 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
6049 function CookieStore() {}
6052 /** @type {string} */
6053 CookieStore.prototype.id;
6056 /** @type {Array.<number>} */
6057 CookieStore.prototype.tabIds;
6062 * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
6065 function OnClickData() {}
6068 /** @type {number} */
6069 OnClickData.prototype.menuItemId;
6072 /** @type {number} */
6073 OnClickData.prototype.parentMenuItemId;
6076 /** @type {string} */
6077 OnClickData.prototype.mediaType;
6080 /** @type {string} */
6081 OnClickData.prototype.linkUrl;
6084 /** @type {string} */
6085 OnClickData.prototype.srcUrl;
6088 /** @type {string} */
6089 OnClickData.prototype.pageUrl;
6092 /** @type {string} */
6093 OnClickData.prototype.frameUrl;
6096 /** @type {string} */
6097 OnClickData.prototype.selectionText;
6100 /** @type {string} */
6101 OnClickData.prototype.editable;
6106 * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
6109 function Debuggee() {}
6112 /** @type {number} */
6113 Debuggee.prototype.tabId;
6118 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
6121 function ResourceIdentifier() {}
6124 /** @type {string} */
6125 ResourceIdentifier.prototype.id;
6128 /** @type {string} */
6129 ResourceIdentifier.prototype.description;
6134 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
6137 function ContentSetting() {}
6141 * @param {!Object.<string,string>} details Settings details.
6142 * @param {function(): void=} opt_callback Callback function.
6144 ContentSetting.prototype.clear = function(details, opt_callback) {};
6148 * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
6150 * @param {function(): void} callback Callback function.
6152 ContentSetting.prototype.get = function(details, callback) {};
6156 * @param {function(): void} callback Callback function.
6158 ContentSetting.prototype.getResourceIdentifiers = function(callback) {};
6162 * @param {!Object.<string,(string|ResourceIdentifier)>} details
6164 * @param {function(): void=} opt_callback Callback function.
6166 ContentSetting.prototype.set = function(details, opt_callback) {};
6171 * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
6174 function HistoryItem() {}
6177 /** @type {string} */
6178 HistoryItem.prototype.id;
6181 /** @type {string} */
6182 HistoryItem.prototype.url;
6185 /** @type {string} */
6186 HistoryItem.prototype.title;
6189 /** @type {number} */
6190 HistoryItem.prototype.lastVisitTime;
6193 /** @type {number} */
6194 HistoryItem.prototype.visitCount;
6197 /** @type {number} */
6198 HistoryItem.prototype.typedCount;
6203 * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
6206 function VisitItem() {}
6209 /** @type {string} */
6210 VisitItem.prototype.id;
6213 /** @type {string} */
6214 VisitItem.prototype.visitId;
6217 /** @type {number} */
6218 VisitItem.prototype.visitTime;
6221 /** @type {string} */
6222 VisitItem.prototype.referringVisitId;
6225 /** @type {string} */
6226 VisitItem.prototype.transition;
6231 * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
6234 function FileHandlerExecuteEventDetails() {}
6237 /** @type {!Array.<!FileEntry>} */
6238 FileHandlerExecuteEventDetails.prototype.entries;
6241 /** @type {number|undefined} */
6242 FileHandlerExecuteEventDetails.prototype.tab_id;
6247 * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
6250 function ChromeKeyboardEvent() {}
6253 /** @type {string} */
6254 ChromeKeyboardEvent.prototype.type;
6257 /** @type {string} */
6258 ChromeKeyboardEvent.prototype.requestId;
6261 /** @type {string|undefined} */
6262 ChromeKeyboardEvent.prototype.extensionId;
6265 /** @type {string} */
6266 ChromeKeyboardEvent.prototype.key;
6269 /** @type {string} */
6270 ChromeKeyboardEvent.prototype.code;
6273 /** @type {number|undefined} */
6274 ChromeKeyboardEvent.prototype.keyCode;
6277 /** @type {boolean|undefined} */
6278 ChromeKeyboardEvent.prototype.altKey;
6281 /** @type {boolean|undefined} */
6282 ChromeKeyboardEvent.prototype.ctrlKey;
6285 /** @type {boolean|undefined} */
6286 ChromeKeyboardEvent.prototype.shiftKey;
6289 /** @type {boolean|undefined} */
6290 ChromeKeyboardEvent.prototype.capsLock;
6295 * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
6298 function InputContext() {}
6301 /** @type {number} */
6302 InputContext.prototype.contextID;
6305 /** @type {string} */
6306 InputContext.prototype.type;
6311 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
6314 function ProxyServer() {}
6317 /** @type {string} */
6318 ProxyServer.prototype.scheme;
6321 /** @type {string} */
6322 ProxyServer.prototype.host;
6325 /** @type {number} */
6326 ProxyServer.prototype.port;
6331 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
6334 function ProxyRules() {}
6337 /** @type {ProxyServer} */
6338 ProxyRules.prototype.singleProxy;
6341 /** @type {ProxyServer} */
6342 ProxyRules.prototype.proxyForHttp;
6345 /** @type {ProxyServer} */
6346 ProxyRules.prototype.proxyForHttps;
6349 /** @type {ProxyServer} */
6350 ProxyRules.prototype.proxyForFtp;
6353 /** @type {ProxyServer} */
6354 ProxyRules.prototype.fallbackProxy;
6357 /** @type {!Array.<string>} */
6358 ProxyRules.prototype.bypassList;
6363 * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
6366 function PacScript() {}
6369 /** @type {string} */
6370 PacScript.prototype.url;
6373 /** @type {string} */
6374 PacScript.prototype.data;
6377 /** @type {boolean} */
6378 PacScript.prototype.mandatory;
6383 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
6386 function ProxyConfig() {}
6389 /** @type {ProxyRules} */
6390 ProxyConfig.prototype.rules;
6393 /** @type {PacScript} */
6394 ProxyConfig.prototype.pacScript;
6397 /** @type {string} */
6398 ProxyConfig.prototype.mode;
6403 * The event listener for Storage receives an Object mapping each
6404 * key that changed to its corresponding StorageChange for that item.
6406 * @see https://developer.chrome.com/extensions/storage.html
6409 function StorageChangeEvent() {}
6413 * @param {function(!Object.<string, !StorageChange>, string)} callback
6414 * Listener will receive an object that maps each key to its StorageChange,
6415 * and the namespace ("sync" or "local") of the storage area the changes
6418 StorageChangeEvent.prototype.addListener = function(callback) {};
6421 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6422 StorageChangeEvent.prototype.removeListener = function(callback) {};
6425 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6426 StorageChangeEvent.prototype.hasListener = function(callback) {};
6429 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6430 StorageChangeEvent.prototype.hasListeners = function(callback) {};
6435 * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
6438 function StorageChange() {}
6442 StorageChange.prototype.oldValue;
6446 StorageChange.prototype.newValue;
6451 * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
6454 function StorageArea() {}
6458 * Removes all items from storage.
6459 * @param {function(): void=} opt_callback Callback function.
6461 StorageArea.prototype.clear = function(opt_callback) {};
6465 * @param {(string|!Array.<string>|!Object|null)=} opt_keys
6466 * A single key to get, list of keys to get, or a dictionary
6467 * specifying default values (see description of the
6468 * object). An empty list or object will return an empty
6469 * result object. Pass in null to get the entire contents of storage.
6470 * @param {function(Object)=} opt_callback Callback with storage items, or null
6473 StorageArea.prototype.get = function(opt_keys, opt_callback) {};
6477 * @param {(string|!Array.<string>)} keys
6478 * A single key or a list of keys for items to remove.
6479 * @param {function()=} opt_callback Callback.
6481 StorageArea.prototype.remove = function(keys, opt_callback) {};
6485 * @param {!Object.<string>} keys
6486 * Object specifying items to augment storage
6487 * with. Values that cannot be serialized (functions, etc) will be ignored.
6488 * @param {function()=} opt_callback Callback.
6490 StorageArea.prototype.set = function(keys, opt_callback) { };
6494 * @param {(string|!Array.<string>|null)=} opt_keys
6495 * A single key or list of keys to get the total usage for. An empty list
6496 * will return 0. Pass in null to get the total usage of all of storage.
6497 * @param {function(number)=} opt_callback
6498 * Callback with the amount of space being used by storage.
6500 StorageArea.prototype.getBytesInUse = function(opt_keys, opt_callback) { };
6505 * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
6508 function ChromeSetting() {}
6512 * @param {Object} details Object with a 'scope' (string) key.
6513 * @param {function(): void=} opt_callback Callback function.
6515 ChromeSetting.prototype.clear = function(details, opt_callback) {};
6519 * @param {Object} details Object with an 'incognito' (boolean) key.
6520 * @param {function(Object.<string, *>): void} callback Callback function.
6522 ChromeSetting.prototype.get = function(details, callback) {};
6526 * @param {Object} details Object with a 'value' (*) key and an optional
6527 * 'scope' (string) key.
6528 * @param {function(): void=} opt_callback Callback function.
6530 ChromeSetting.prototype.set = function(details, opt_callback) {};
6533 /** @type {!ChromeObjectEvent} */
6534 ChromeSetting.prototype.onChange;
6539 * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
6542 function RequestFilter() {}
6545 /** @type {!Array.<string>} */
6546 RequestFilter.prototype.urls;
6549 /** @type {!Array.<string>} */
6550 RequestFilter.prototype.types;
6553 /** @type {number} */
6554 RequestFilter.prototype.tabId;
6557 /** @type {number} */
6558 RequestFilter.prototype.windowId;
6563 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6566 function HttpHeader() {}
6569 /** @type {string} */
6570 HttpHeader.prototype.name;
6573 /** @type {string} */
6574 HttpHeader.prototype.value;
6577 /** @type {!Array.<number>} */
6578 HttpHeader.prototype.binaryValue;
6582 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6583 * @typedef {Array.<!HttpHeader>}
6591 * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
6594 function BlockingResponse() {}
6597 /** @type {boolean} */
6598 BlockingResponse.prototype.cancel;
6601 /** @type {string} */
6602 BlockingResponse.prototype.redirectUrl;
6605 /** @type {!HttpHeaders_} */
6606 BlockingResponse.prototype.requestHeaders;
6609 /** @type {!HttpHeaders_} */
6610 BlockingResponse.prototype.responseHeaders;
6613 /** @type {Object.<string,string>} */
6614 BlockingResponse.prototype.authCredentials;
6619 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
6622 chrome.pushMessaging.Message = function() {};
6628 chrome.pushMessaging.Message.prototype.subchannelId;
6634 chrome.pushMessaging.Message.prototype.payload;
6639 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
6642 chrome.pushMessaging.ChannelIdResult = function() {};
6648 chrome.pushMessaging.ChannelIdResult.prototype.channelId;
6652 * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
6653 * defined in {@code javascript/externs/fileapi.js}.
6655 * @see http://developer.chrome.com/apps/fileSystem.html
6657 chrome.fileSystem = {};
6661 * @param {!Entry} entry The entry to get the display path for. The entry can
6662 * originally be obtained through
6663 * {@code chrome.fileSystem.chooseEntry} or
6664 * {@code chrome.fileSystem.restoreEntry}.
6665 * @param {function(string)} callback A success callback.
6666 * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
6668 chrome.fileSystem.getDisplayPath = function(entry, callback) {};
6672 * @param {!Entry} entry The entry to get a writable entry for.
6673 * @param {function(!Entry)} callback A success callback.
6674 * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
6676 chrome.fileSystem.getWritableEntry = function(entry, callback) {};
6680 * @param {!Entry} entry The entry to query writability.
6681 * @param {function(boolean)} callback A success callback.
6682 * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
6684 chrome.fileSystem.isWritableEntry = function(entry, callback) {};
6689 * description: (string|undefined),
6690 * mimeTypes: (!Array.<string>|undefined),
6691 * extensions: (!Array.<string>|undefined)
6693 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6695 chrome.fileSystem.AcceptsOption;
6700 * type: (string|undefined),
6701 * suggestedName: (string|undefined),
6702 * accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
6703 * acceptsAllTypes: (boolean|undefined),
6704 * acceptsMultiple: (boolean|undefined)
6706 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6708 chrome.fileSystem.ChooseEntryOptions;
6714 * writable: (boolean|undefined)
6716 * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6718 chrome.fileSystem.RequestFileSystemOptions;
6722 * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6725 chrome.fileSystem.Volume = function() {};
6728 /** @type {string} */
6729 chrome.fileSystem.Volume.prototype.volumeId;
6732 /** @type {boolean} */
6733 chrome.fileSystem.Volume.prototype.writable;
6737 * @param {!chrome.fileSystem.ChooseEntryOptions|
6738 * function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
6739 * options for the file prompt or the callback.
6740 * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
6741 * callback, if arg1 is options.
6742 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6744 chrome.fileSystem.chooseEntry = function(optionsOrCallback, opt_callback) {};
6748 * @param {string} id The ID of the file entry to restore.
6749 * @param {function(!Entry)} callback A success callback.
6750 * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
6752 chrome.fileSystem.restoreEntry = function(id, callback) {};
6756 * @param {string} id The ID of the file entry to query restorability.
6757 * @param {function(boolean)} callback A success callback.
6758 * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
6760 chrome.fileSystem.isRestorable = function(id, callback) {};
6764 * @param {!Entry} entry The entry to regain access to.
6765 * @return {string} The ID that can be passed to restoreEntry to regain access
6766 * to the given file entry.
6767 * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
6769 chrome.fileSystem.retainEntry = function(entry) {};
6773 * @param {!chrome.fileSystem.RequestFileSystemOptions} options Options for the
6775 * @param {function(!FileSystem=)} callback A completion callback with the file
6776 * system in case of a success. Otherwise the error is passed as
6777 * chrome.runtime.lastError.
6778 * @see http://developer.chrome.com/apps/fileSystem.html#method-requestFileSystem
6780 chrome.fileSystem.requestFileSystem = function(options, callback) {};
6784 * @param {function(!Array<!chrome.fileSystem.Volume>=)} callback A completion
6785 * callback with the file system list in case of a success. Otherwise the
6786 * error is passed as chrome.runtime.lastError.
6787 * @see http://developer.chrome.com/apps/fileSystem.html#method-getVolumeList
6789 chrome.fileSystem.getVolumeList = function(callback) {};
6794 * @see https://developer.chrome.com/apps/syncFileSystem
6796 chrome.syncFileSystem = {};
6800 * Returns a syncable filesystem backed by Google Drive. The returned
6801 * DOMFileSystem instance can be operated on in the same way as
6802 * the Temporary and Persistant file systems (see
6803 * http://www.w3.org/TR/file-system-api/), except that the filesystem
6804 * object returned for Sync FileSystem does NOT support directory
6805 * operations (yet). You can get a list of file entries by reading
6806 * the root directory (by creating a new DirectoryReader),
6807 * but cannot create a new directory in it.
6809 * <p>Calling this multiple times from the same app will return the same
6810 * handle to the same file system.
6812 * <p>Note this call can fail. For example, if the user is not signed in
6813 * to Chrome or if there is no network operation. To handle these errors
6814 * it is important chrome.runtime.lastError is checked in the callback.
6816 * @param {function(!FileSystem)} callback A callback type for
6817 * requestFileSystem.
6818 * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
6820 chrome.syncFileSystem.requestFileSystem = function(callback) {};
6824 * Sets the default conflict resolution policy for the 'syncable' file
6825 * storage for the app. By default it is set to 'last_write_win'.
6826 * When conflict resolution policy is set to 'last_write_win' conflicts
6827 * for existing files are automatically resolved next time the file is updated.
6828 * {@code callback} can be optionally given to know if the request has
6831 * @param {string} policy Any of 'last_write_win' or 'manual'
6832 * @param {function()=} opt_callback
6834 * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
6836 chrome.syncFileSystem.setConflictResolutionPolicy =
6837 function(policy, opt_callback) {};
6841 * Gets the current conflict resolution policy.
6843 * @param {function(string)} callback Accepting any of 'last_write_win'
6845 * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
6847 chrome.syncFileSystem.getConflictResolutionPolicy = function(callback) {};
6851 * Returns the current usage and quota in bytes for the 'syncable' file
6852 * storage for the app.
6854 * @param {!FileSystem} fileSystem
6855 * @param {function(!Object)} callback Taking an object substantially similar
6856 * to {@code {'usageBytes': number, quotaBytes: number}}.
6857 * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
6859 chrome.syncFileSystem.getUsageAndQuota = function(fileSystem, callback) {};
6863 * Returns the FileStatus for the given fileEntry. The status value can be
6864 * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
6865 * happens when the service's conflict resolution policy is set to 'manual'.
6867 * @param {!Entry} fileEntry
6868 * @param {function(string)} callback Called with any of 'synced', 'pending'
6871 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
6873 chrome.syncFileSystem.getFileStatus = function(fileEntry, callback) {};
6877 * Returns each FileStatus for the given fileEntry array. Typically called
6878 * with the result from dirReader.readEntries().
6880 * @param {!Array.<!FileEntry>} fileEntries
6881 * @param {function(!Array.<!Object>)} callback Each object will look like:
6882 * {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
6884 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
6886 chrome.syncFileSystem.getFileStatuses = function(fileEntries, callback) {};
6892 * <p>Returns the current sync backend status.
6894 * @param {function(string)} callback Arg is any of 'initializing', 'running',
6895 * 'authentication_required', 'temporary_unavailable', or 'disabled'.
6897 * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
6899 chrome.syncFileSystem.getServiceStatus = function(callback) {};
6903 * Fired when an error or other status change has happened in the sync
6904 * backend (for example, when the sync is temporarily disabled due
6905 * to network or authentication error).
6907 * @type {!ChromeObjectEvent}
6909 * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
6911 chrome.syncFileSystem.onServiceStatusChanged;
6915 * Fired when a file has been updated by the background sync service.
6917 * @type {!ChromeObjectEvent}
6919 * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
6921 chrome.syncFileSystem.onFileStatusChanged;
6926 * @see http://developer.chrome.com/extensions/alarms.html
6932 * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
6933 * is fired. If there is another alarm with the same name (or no name if none is
6934 * specified), it will be cancelled and replaced by this alarm.
6935 * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
6936 * the name to identify this alarm or the info used to create the alarm. If
6937 * no name is passed, the empty string is used to identify the alarm.
6938 * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
6939 * as arg1, the info used to create the alarm.
6940 * @see http://developer.chrome.com/extensions/alarms.html#method-create
6942 chrome.alarms.create = function(nameOrAlarmCreateInfo, opt_alarmInfo) {};
6946 * Retrieves details about the specified alarm.
6947 * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
6948 * of the alarm to get or the callback to invoke with the alarm. If no name
6949 * is passed, the empty string is used to get the alarm.
6950 * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
6951 * as arg1, the callback to invoke with the alarm.
6952 * @see http://developer.chrome.com/extensions/alarms.html#method-get
6954 chrome.alarms.get = function(nameOrCallback, opt_callback) {};
6958 * Gets an array of all the alarms.
6959 * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
6960 * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
6962 chrome.alarms.getAll = function(callback) {};
6966 * Clears the alarm with the given name.
6967 * @param {string=} opt_name
6968 * @param {function(boolean)=} opt_callback A callback that will be called with
6969 * a boolean for whether the alarm was cleared.
6970 * @see http://developer.chrome.com/extensions/alarms.html#method-clear
6972 chrome.alarms.clear = function(opt_name, opt_callback) {};
6976 * Clears all alarms.
6977 * @param {function(boolean)=} opt_callback A callback that will be called with
6978 * a boolean for whether the alarms were cleared.
6979 * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
6981 chrome.alarms.clearAll = function(opt_callback) {};
6985 * Fired when an alarm has elapsed. Useful for event pages.
6986 * @type {!chrome.alarms.AlarmEvent}
6987 * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
6989 chrome.alarms.onAlarm;
6996 chrome.alarms.AlarmEvent = function() {};
7000 * @param {function(!chrome.alarms.Alarm): void} callback
7002 chrome.alarms.AlarmEvent.prototype.addListener = function(callback) {};
7006 * @param {function(!chrome.alarms.Alarm): void} callback
7008 chrome.alarms.AlarmEvent.prototype.removeListener = function(callback) {};
7012 * @param {function(!chrome.alarms.Alarm): void} callback
7015 chrome.alarms.AlarmEvent.prototype.hasListener = function(callback) {};
7021 chrome.alarms.AlarmEvent.prototype.hasListeners = function() {};
7027 * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
7029 chrome.alarms.Alarm = function() {};
7033 * Name of this alarm.
7036 chrome.alarms.Alarm.prototype.name;
7040 * Time at which this alarm was scheduled to fire, in milliseconds past the
7041 * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
7042 * delayed an arbitrary amount beyond this.
7045 chrome.alarms.Alarm.prototype.scheduledTime;
7049 * If not null, the alarm is a repeating alarm and will fire again in
7050 * periodInMinutes minutes.
7053 chrome.alarms.Alarm.prototype.periodInMinutes;
7058 * when: (number|undefined),
7059 * delayInMinutes: (number|undefined),
7060 * periodInMinutes: (number|undefined)
7062 * @see http://developer.chrome.com/extensions/alarms.html#method-create
7064 chrome.alarms.AlarmCreateInfo;
7068 * @see https://developer.chrome.com/apps/hid
7079 * @see https://developer.chrome.com/apps/hid#method-getDevices
7081 chrome.hid.HidGetDevicesOptions;
7086 * usagePage: number,
7088 * reportIds: !Array.<number>
7090 * @see https://developer.chrome.com/apps/hid#method-getDevices
7092 chrome.hid.HidDeviceUsage;
7099 * productId: number,
7100 * collections: !Array.<!chrome.hid.HidDeviceUsage>,
7101 * maxInputReportSize: number,
7102 * maxOutputReportSize: number,
7103 * maxFeatureReportSize: number
7105 * @see https://developer.chrome.com/apps/hid#method-getDevices
7107 chrome.hid.HidDeviceInfo;
7112 * connectionId: number
7114 * @see https://developer.chrome.com/apps/hid#method-connect
7116 chrome.hid.HidConnectInfo;
7120 * @see https://developer.chrome.com/apps/hid#method-getDevices
7121 * Enumerates all the connected HID devices specified by the
7122 * vendorId/productId/interfaceId tuple.
7123 * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
7124 * for on target devices.
7125 * @param {function(!Array.<!Object>)} callback Invoked with a list of
7126 * |HidDeviceInfo|s on complete.
7128 chrome.hid.getDevices = function(options, callback) {};
7132 * @see https://developer.chrome.com/apps/hid#method-connect
7133 * Opens a connection to a HID device for communication.
7134 * @param {number} deviceId The ID of the device to open.
7135 * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
7136 * connection succeeds, or undefined if it fails.
7138 chrome.hid.connect = function(deviceId, callback) {};
7142 * @see https://developer.chrome.com/apps/hid#method-disconnect
7143 * Disconnects from a device.
7144 * @param {number} connectionId The connection to close.
7145 * @param {function()=} opt_callback The callback to invoke once the connection
7148 chrome.hid.disconnect = function(connectionId, opt_callback) {};
7152 * @see https://developer.chrome.com/apps/hid#method-receive
7153 * Receives an input report from an HID device.
7154 * @param {number} connectionId The connection from which to receive the report.
7155 * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
7156 * the received report.
7158 chrome.hid.receive = function(connectionId, callback) {};
7162 * @see https://developer.chrome.com/apps/hid#method-send
7163 * Sends an output report to an HID device.
7164 * @param {number} connectionId The connection to which to send the report.
7165 * @param {number} reportId The report ID to use, or 0 if none.
7166 * @param {!ArrayBuffer} data The report data.
7167 * @param {function()} callback The callback to invoke once the write is
7170 chrome.hid.send = function(connectionId, reportId, data, callback) {};
7174 * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
7175 * Receives a feature report from the device.
7176 * @param {number} connectionId The connection from which to read the feature
7178 * @param {number} reportId The report ID to use, or 0 if none.
7179 * @param {number} size The size of the feature report to receive.
7180 * @param {function(!ArrayBuffer)} callback The callback to invoke with the
7183 chrome.hid.receiveFeatureReport =
7184 function(connectionId, reportId, size, callback) {};
7188 * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
7189 * Sends a feature report to the device.
7190 * @param {number} connectionId The connection to which to send the feature
7192 * @param {number} reportId The report ID to use, or 0 if none.
7193 * @param {!ArrayBuffer} data The report data.
7194 * @param {function()} callback The callback to invoke once the write is
7197 chrome.hid.sendFeatureReport =
7198 function(connectionId, reportId, data, callback) {};
7202 * @see http://developer.chrome.com/extensions/notifications.html
7205 chrome.notifications = {};
7211 * iconUrl: (string|undefined)
7213 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7215 chrome.notifications.NotificationButton;
7223 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7225 chrome.notifications.NotificationItem;
7230 * type: (string|undefined),
7231 * iconUrl: (string|undefined),
7232 * title: (string|undefined),
7233 * message: (string|undefined),
7234 * contextMessage: (string|undefined),
7235 * priority: (number|undefined),
7236 * eventTime: (number|undefined),
7237 * buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
7238 * imageUrl: (string|undefined),
7239 * items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
7240 * progress: (number|undefined),
7241 * isClickable: (boolean|undefined)
7243 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
7245 chrome.notifications.NotificationOptions;
7249 * @typedef {function(boolean): void}
7250 * @see http://developer.chrome.com/extensions/notifications.html#method-update
7251 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7253 chrome.notifications.BooleanCallback;
7257 * @typedef {function(!Object): void}
7258 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7260 chrome.notifications.ObjectCallback;
7264 * @typedef {function(string, boolean): void}
7265 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7267 chrome.notifications.ClosedCallback;
7271 * @typedef {function(string, number): void}
7272 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7274 chrome.notifications.ButtonCallback;
7278 * @param {string|!chrome.notifications.NotificationOptions}
7279 * notificationIdOrOptions
7280 * @param {(!chrome.notifications.NotificationOptions|function(string): void)=}
7281 * opt_optionsOrCallback
7282 * @param {(function(string): void)=} opt_callback
7283 * @see http://developer.chrome.com/extensions/notifications.html#method-create
7285 chrome.notifications.create = function(notificationIdOrOptions,
7286 opt_optionsOrCallback, opt_callback) {};
7290 * @param {string} notificationId
7291 * @param {!chrome.notifications.NotificationOptions} options
7292 * @param {chrome.notifications.BooleanCallback=} opt_callback
7293 * @see http://developer.chrome.com/extensions/notifications.html#method-update
7295 chrome.notifications.update =
7296 function(notificationId, options, opt_callback) {};
7300 * @param {string} notificationId
7301 * @param {!chrome.notifications.BooleanCallback=} opt_callback
7302 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
7304 chrome.notifications.clear = function(notificationId, opt_callback) {};
7308 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
7309 * @param {!chrome.notifications.ObjectCallback} callback
7311 chrome.notifications.getAll = function(callback) {};
7315 * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
7316 * @param {function(string): void} callback takes 'granted' or 'denied'
7318 chrome.notifications.getPermissionLevel = function(callback) {};
7322 * @type {!chrome.notifications.ClosedEvent}
7323 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7325 chrome.notifications.onClosed;
7329 * The user clicked a non-button area of the notification. Callback receives a
7331 * @type {!ChromeStringEvent}
7332 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
7334 chrome.notifications.onClicked;
7338 * @type {!chrome.notifications.ButtonClickedEvent}
7339 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7341 chrome.notifications.onButtonClicked;
7345 * Indicates permission level change. Callback should expect 'granted' or
7347 * @type {!ChromeStringEvent}
7348 * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
7350 chrome.notifications.onPermissionLevelChanged;
7354 * @type {!ChromeEvent}
7355 * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
7357 chrome.notifications.onShowSettings;
7363 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
7365 chrome.notifications.ClosedEvent = function() {};
7369 * @param {!chrome.notifications.ClosedCallback} callback
7371 chrome.notifications.ClosedEvent.prototype.addListener = function(callback) {};
7375 * @param {!chrome.notifications.ClosedCallback} callback
7377 chrome.notifications.ClosedEvent.prototype.removeListener =
7378 function(callback) {};
7382 * @param {!chrome.notifications.ClosedCallback} callback
7385 chrome.notifications.ClosedEvent.prototype.hasListener = function(callback) {};
7391 chrome.notifications.ClosedEvent.prototype.hasListeners = function() {};
7397 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
7399 chrome.notifications.ButtonClickedEvent = function() {};
7403 * @param {!chrome.notifications.ButtonCallback} callback
7405 chrome.notifications.ButtonClickedEvent.prototype.addListener =
7406 function(callback) {};
7410 * @param {!chrome.notifications.ButtonCallback} callback
7412 chrome.notifications.ButtonClickedEvent.prototype.removeListener =
7413 function(callback) {};
7417 * @param {!chrome.notifications.ButtonCallback} callback
7420 chrome.notifications.ButtonClickedEvent.prototype.hasListener =
7421 function(callback) {};
7427 chrome.notifications.ButtonClickedEvent.prototype.hasListeners = function() {};
7432 * @see http://developer.chrome.com/apps/system_storage.html
7434 chrome.system.storage = {};
7439 chrome.system.storage.StorageUnitInfo = function() {};
7442 /** @type {string} */
7443 chrome.system.storage.StorageUnitInfo.id;
7446 /** @type {string} */
7447 chrome.system.storage.StorageUnitInfo.name;
7450 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
7451 chrome.system.storage.StorageUnitInfo.type;
7454 /** @type {number} */
7455 chrome.system.storage.StorageUnitInfo.capacity;
7460 * Event whose listeners take a StorageUnitInfoEvent parameter.
7463 chrome.system.storage.StorageUnitInfoEvent = function() {};
7466 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7467 chrome.system.storage.StorageUnitInfoEvent.prototype.addListener =
7468 function(callback) {};
7471 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7472 chrome.system.storage.StorageUnitInfoEvent.prototype.removeListener =
7473 function(callback) {};
7477 * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
7480 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListener =
7481 function(callback) {};
7484 /** @return {boolean} */
7485 chrome.system.storage.StorageUnitInfoEvent.prototype.hasListeners =
7489 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
7490 chrome.system.storage.onAttached;
7493 /** @type {!ChromeStringEvent} */
7494 chrome.system.storage.onDetached;
7498 * Gets the storage information from the system.
7499 * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
7501 chrome.system.storage.getInfo = function(callback) {};
7505 * Ejects a removable storage device.
7506 * @param {string} id The transient device ID from StorageUnitInfo.
7507 * @param {function(string)} callback Callback function where the value
7508 * is any of: "success", "in_use", "no_such_device", "failure"
7510 chrome.system.storage.ejectDevice = function(id, callback) {};
7514 * Gets the available capacity of a specified storage device.
7515 * @param {string} id The transient device ID from StorageUnitInfo.
7516 * @param {function(Object.<string, number>)} callback A callback function that
7517 * accepts an object with {@code id} and {@code availableCapacity} fields.
7519 chrome.system.storage.getAvailableCapacity = function(id, callback) {};
7523 * @see http://developer.chrome.com/apps/usb.html
7531 chrome.usb.Device = function Device() {};
7534 /** @type {number} */
7535 chrome.usb.Device.prototype.device;
7538 /** @type {number} */
7539 chrome.usb.Device.prototype.vendorId;
7542 /** @type {number} */
7543 chrome.usb.Device.prototype.productId;
7548 chrome.usb.ConnectionHandle = function ConnectionHandle() {};
7551 /** @type {number} */
7552 chrome.usb.ConnectionHandle.prototype.handle;
7555 /** @type {number} */
7556 chrome.usb.ConnectionHandle.prototype.vendorId;
7559 /** @type {number} */
7560 chrome.usb.ConnectionHandle.prototype.productId;
7565 * direction: string,
7567 * length: (number|undefined),
7568 * data: (!ArrayBuffer|undefined)
7571 chrome.usb.GenericTransferInfo;
7576 * direction: string,
7577 * recipient: string,
7578 * requestType: string,
7582 * length: (number|undefined),
7583 * data: (!ArrayBuffer|undefined)
7586 chrome.usb.ControlTransferInfo;
7591 chrome.usb.TransferResultInfo = function() {};
7594 /** @type {number|undefined} */
7595 chrome.usb.TransferResultInfo.prototype.resultCode;
7598 /** @type {!ArrayBuffer|undefined} */
7599 chrome.usb.TransferResultInfo.prototype.data;
7605 * productId: number,
7606 * interfaceId: (number|undefined)
7609 chrome.usb.FindDevicesOptions;
7613 * @see http://developer.chrome.com/apps/usb.html#method-getDevices
7614 * @param {!Object} options The properties to search for on target devices.
7615 * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
7616 * of |Device|s on complete.
7618 chrome.usb.getDevices = function(options, callback) {};
7622 * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
7623 * @param {!chrome.usb.Device} device The device to request access to.
7624 * @param {number} interfaceId
7625 * @param {function(boolean)} callback
7627 chrome.usb.requestAccess = function(device, interfaceId, callback) {};
7631 * @see http://developer.chrome.com/apps/usb.html#method-openDevice
7632 * @param {!chrome.usb.Device} device The device to open.
7633 * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
7634 * created ConnectionHandle on complete.
7636 chrome.usb.openDevice = function(device, callback) {};
7640 * @see http://developer.chrome.com/apps/usb.html#method-findDevices
7641 * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
7642 * on target devices.
7643 * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
7644 * with the opened ConnectionHandle on complete.
7646 chrome.usb.findDevices = function(options, callback) {};
7650 * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
7651 * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
7652 * @param {function()=} opt_callback The callback to invoke once the device is
7655 chrome.usb.closeDevice = function(handle, opt_callback) {};
7659 * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
7660 * @param {!chrome.usb.ConnectionHandle} handle The device from which the
7661 * interfaces should be listed.
7662 * @param {function(!Array.<!Object>)} callback
7663 * The callback to invoke when the interfaces are enumerated.
7665 chrome.usb.listInterfaces = function(handle, callback) {};
7669 * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
7670 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7671 * interface is to be claimed.
7672 * @param {number} interfaceNumber
7673 * @param {function()} callback The callback to invoke once the interface is
7676 chrome.usb.claimInterface = function(handle, interfaceNumber, callback) {};
7680 * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
7681 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7682 * interface is to be released.
7683 * @param {number} interfaceNumber
7684 * @param {function()} callback The callback to invoke once the interface is
7687 chrome.usb.releaseInterface = function(handle, interfaceNumber, callback) {};
7691 * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
7692 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7693 * interface settings are to be set.
7694 * @param {number} interfaceNumber
7695 * @param {number} alternateSetting The alternate setting to set.
7696 * @param {function()} callback The callback to invoke once the interface
7699 chrome.usb.setInterfaceAlternateSetting = function(
7700 handle, interfaceNumber, alternateSetting, callback) {};
7704 * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
7705 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7707 * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
7709 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7710 * transfer has completed.
7712 chrome.usb.controlTransfer = function(handle, transferInfo, callback) {};
7716 * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
7717 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
7719 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7720 * transfer. See GenericTransferInfo.
7721 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7722 * transfer has completed.
7724 chrome.usb.bulkTransfer = function(handle, transferInfo, callback) {};
7728 * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
7729 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7731 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7732 * transfer. See GenericTransferInfo.
7733 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7734 * transfer has completed.
7736 chrome.usb.interruptTransfer = function(handle, transferInfo, callback) {};
7740 * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
7741 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7743 * @param {!Object} transferInfo The parameters to the transfer. See
7744 * IsochronousTransferInfo.
7745 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7746 * transfer has been completed.
7748 chrome.usb.isochronousTransfer = function(handle, transferInfo, callback) {};
7752 * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
7753 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
7754 * @param {function(boolean)} callback Invoked once the device is reset with a
7755 * boolean indicating whether the reset completed successfully.
7757 chrome.usb.resetDevice = function(handle, callback) {};
7761 * @see https://developer.chrome.com/apps/serial
7770 * persistent: (boolean|undefined),
7771 * name: (string|undefined),
7772 * bufferSize: (number|undefined),
7773 * bitRate: (number|undefined),
7774 * dataBits: (string|undefined),
7775 * parityBits: (string|undefined),
7776 * stopBits: (string|undefined),
7777 * ctsFlowControl: (boolean|undefined),
7778 * receiveTimeout: (number|undefined),
7779 * sendTimeout: (number|undefined)
7781 * @see https://developer.chrome.com/apps/serial#type-ConnectionOptions
7783 chrome.serial.ConnectionOptions;
7788 * connectionId: number,
7790 * persistent: boolean,
7792 * bufferSize: number,
7793 * receiveTimeout: number,
7794 * sendTimeout: number,
7795 * bitRate: (number|undefined),
7796 * dataBits: (string|undefined),
7797 * parityBits: (string|undefined),
7798 * stopBits: (string|undefined),
7799 * ctsFlowControl: (boolean|undefined)
7801 * @see https://developer.chrome.com/apps/serial#type-ConnectionInfo
7803 chrome.serial.ConnectionInfo;
7807 * Returns information about available serial devices on the system. The
7808 * list is regenerated each time this method is called.
7809 * @param {function(!Array<!Object>)} callback Invoked with a
7810 * list of ports on complete.
7811 * @see https://developer.chrome.com/apps/serial#method-getDevices
7813 chrome.serial.getDevices = function(callback) {};
7817 * Connects to a given serial port.
7818 * @param {string} path The system path of the serial port to open.
7819 * @param {!chrome.serial.ConnectionOptions|
7820 * function(!chrome.serial.ConnectionInfo)} optionsOrCallback
7821 * Port configuration options, or the callback invoked with the created
7822 * ConnectionInfo on complete.
7823 * @param {function(!chrome.serial.ConnectionInfo)=} opt_callback Invoked with
7824 * the created ConnectionInfo on complete.
7825 * @see https://developer.chrome.com/apps/serial#method-connect
7827 chrome.serial.connect = function(path, optionsOrCallback, opt_callback) {};
7831 * Update the option settings on an open serial port connection.
7832 * @param {number} connectionId The id of the opened connection.
7833 * @param {!chrome.serial.ConnectionOptions} options Port configuration
7835 * @param {function(boolean)} callback Called when the configuration has
7837 * @see https://developer.chrome.com/apps/serial#method-update
7839 chrome.serial.update = function(connectionId, options, callback) {};
7843 * Disconnects from a serial port.
7844 * @param {number} connectionId The id of the opened connection.
7845 * @param {function(boolean)} callback Called when the connection
7847 * @see https://developer.chrome.com/apps/serial#method-disconnect
7849 chrome.serial.disconnect = function(connectionId, callback) {};
7853 * Pauses or unpauses an open connection.
7854 * @param {number} connectionId The id of the opened connection.
7855 * @param {boolean} paused Flag to indicate whether to pause or unpause.
7856 * @param {function()} callback Called when the configuration has completed.
7857 * @see https://developer.chrome.com/apps/serial#method-setPaused
7859 chrome.serial.setPaused = function(connectionId, paused, callback) {};
7863 * Retrieves the state of a given connection.
7864 * @param {number} connectionId The id of the opened connection.
7865 * @param {function(!chrome.serial.ConnectionInfo)} callback
7866 * Called with connection state information when available.
7867 * @see https://developer.chrome.com/apps/serial#method-getInfo
7869 chrome.serial.getInfo = function(connectionId, callback) {};
7873 * Retrieves the list of currently opened serial port connections owned by
7875 * @param {function(!Array.<!chrome.serial.ConnectionInfo>)} callback
7876 * Called with the list of |ConnectionInfo|s when available.
7877 * @see https://developer.chrome.com/apps/serial#method-getConnections
7879 chrome.serial.getConnections = function(callback) {};
7883 * Writes data to the given connection.
7884 * @param {number} connectionId The id of the opened connection.
7885 * @param {!ArrayBuffer} data The data to send.
7886 * @param {function(!Object)} callback Called when the operation has
7888 * @see https://developer.chrome.com/apps/serial#method-send
7890 chrome.serial.send = function(connectionId, data, callback) {};
7894 * Flushes all bytes in the given connection's input and output buffers.
7895 * @param {number} connectionId The id of the opened connection.
7896 * @param {function(boolean)} callback
7897 * @see https://developer.chrome.com/apps/serial#method-flush
7899 chrome.serial.flush = function(connectionId, callback) {};
7905 * Retrieves the state of control signals on a given connection.
7906 * @param {number} connectionId The id of the opened connection.
7907 * @param {function(!Object)} callback
7908 * @see https://developer.chrome.com/apps/serial#method-getControlSignals
7910 chrome.serial.getControlSignals = function(connectionId, callback) {};
7915 * dtr: (boolean|undefined),
7916 * rts: (boolean|undefined)
7919 chrome.serial.ControlSignals;
7923 * Sets the state of control signals on a given connection.
7924 * @param {number} connectionId The id of the opened connection.
7925 * @param {!chrome.serial.ControlSignals} signals
7926 * The set of signal changes to send to the device.
7927 * @param {function(boolean)} callback Called once the control signals
7929 * @see https://developer.chrome.com/apps/serial#method-setControlSignals
7931 chrome.serial.setControlSignals = function(connectionId, signals, callback) {};
7935 * Event raised when data has been read from the connection.
7936 * @type {!ChromeObjectEvent}
7937 * @see https://developer.chrome.com/apps/serial#event-onReceive
7939 chrome.serial.onReceive;
7943 * Event raised when an error occurred while the runtime was waiting for
7944 * data on the serial port. Once this event is raised, the connection may
7945 * be set to paused. A "timeout" error does not pause the connection.
7946 * @type {!ChromeObjectEvent}
7947 * @see https://developer.chrome.com/apps/serial#event-onReceiveError
7949 chrome.serial.onReceiveError;
7953 ////////////////////////////////////////////////////////////////////////////////
7954 /////////////////////////// Chrome Private APIs ////////////////////////////////
7955 ////////////////////////////////////////////////////////////////////////////////
7959 chrome.screenlockPrivate = {};
7963 * @param {string} message Displayed on the unlock screen.
7965 chrome.screenlockPrivate.showMessage = function(message) {};
7969 * @param {function(boolean)} callback
7971 chrome.screenlockPrivate.getLocked = function(callback) {};
7975 * @param {boolean} locked If true and the screen is unlocked, locks the screen.
7976 * If false and the screen is locked, unlocks the screen.
7978 chrome.screenlockPrivate.setLocked = function(locked) {};
7981 /** @type {!ChromeBooleanEvent} */
7982 chrome.screenlockPrivate.onChanged;
7988 chrome.musicManagerPrivate = {};
7992 * @param {function(string): void} callback
7994 chrome.musicManagerPrivate.getDeviceId = function(callback) {};
8000 chrome.mediaGalleriesPrivate = {};
8004 * @typedef {function({deviceId: string, deviceName: string}): void}
8006 chrome.mediaGalleriesPrivate.DeviceCallback;
8010 * @typedef {function({galleryId: string}): void}
8012 chrome.mediaGalleriesPrivate.GalleryChangeCallback;
8016 * @typedef {function({galleryId: string, success: boolean}): void}
8018 chrome.mediaGalleriesPrivate.AddGalleryWatchCallback;
8022 * @param {string} galleryId
8023 * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
8025 chrome.mediaGalleriesPrivate.addGalleryWatch = function(galleryId, callback) {};
8029 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8030 * @deprecated Use {chrome.system.storage.onAttach}.
8032 chrome.mediaGalleriesPrivate.onDeviceAttached;
8036 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
8037 * @deprecated Use {chrome.system.storage.onDetach}.
8039 chrome.mediaGalleriesPrivate.onDeviceDetached;
8043 * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
8045 chrome.mediaGalleriesPrivate.onGalleryChanged;
8051 * @deprecated Use {chrome.system.storage.DeviceEvent}.
8053 chrome.mediaGalleriesPrivate.DeviceEvent = function() {};
8057 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8058 * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
8060 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.addListener =
8061 function(callback) {};
8065 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8066 * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
8068 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.removeListener =
8069 function(callback) {};
8073 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
8074 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
8076 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListener =
8077 function(callback) {};
8082 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
8084 chrome.mediaGalleriesPrivate.DeviceEvent.prototype.hasListeners =
8085 function(callback) {};
8092 chrome.mediaGalleriesPrivate.GalleryChangeEvent = function() {};
8096 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8098 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.addListener =
8099 function(callback) {};
8103 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8105 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.removeListener =
8106 function(callback) {};
8110 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
8112 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListener =
8113 function(callback) {};
8119 chrome.mediaGalleriesPrivate.GalleryChangeEvent.prototype.hasListeners =
8124 * Externs for networking_private.idl:
8125 * https://code.google.com/p/chromium/codesearch#chromium/src/extensions/common/api/networking_private.idl
8126 * WARNING(2015/04/09): This API is still under active development and has a few
8127 * issues with typing:
8129 * 1. This API uses the ONC specification:
8130 * http://www.chromium.org/chromium-os/chromiumos-design-docs/open-network-configuration
8131 * 2. The types for getProperties and getManagedProperties are not currently
8132 * defined. They correspond to ONC Property dictionaries. They are treated as
8133 * Objects rather than types.
8134 * 3. NetworkStateProperties defines a subset of NetworkProperties used by
8135 * getState and getNetworks. Since these match ONC property names they
8136 * use ONC PascalCase naming conventions instead of traditional JS
8138 * 4. The types for setProperties and createNetwork are not currently defined.
8139 * These use a subset of ONC properties and the complete set (and their
8140 * relationship to the type for getProperties) is still being determined.
8142 * Because of the above issues, this API should not be used as an example for
8143 * other APIs. Please contact stevenjb@ for questions on and maintenance.
8145 * @see https://developer.chrome.com/extensions/networkingPrivate
8147 chrome.networkingPrivate = {};
8153 * @see https://developer.chrome.com/extensions/networkingPrivate#type-CellularStateProperties
8155 chrome.networkingPrivate.CellularStateProperties = function() {};
8159 * @type {string|undefined}
8161 chrome.networkingPrivate.CellularStateProperties.prototype.ActivationState;
8165 * @type {string|undefined}
8167 chrome.networkingPrivate.CellularStateProperties.prototype.NetworkTechnology;
8171 * @type {string|undefined}
8173 chrome.networkingPrivate.CellularStateProperties.prototype.RoamingState;
8177 * @type {number|undefined}
8179 chrome.networkingPrivate.CellularStateProperties.prototype.SignalStrength;
8185 * @see https://developer.chrome.com/extensions/networkingPrivate#type-DeviceStateProperties
8187 chrome.networkingPrivate.DeviceStateProperties = function() {};
8191 * @type {boolean|undefined}
8193 chrome.networkingPrivate.DeviceStateProperties.prototype.Scanning;
8199 chrome.networkingPrivate.DeviceStateProperties.prototype.State;
8205 chrome.networkingPrivate.DeviceStateProperties.prototype.Type;
8211 * @see https://developer.chrome.com/extensions/networkingPrivate#type-EthernetStateProperties
8213 chrome.networkingPrivate.EthernetStateProperties = function() {};
8219 chrome.networkingPrivate.EthernetStateProperties.prototype.Authentication;
8225 * @see https://developer.chrome.com/extensions/networkingPrivate#type-IPSecProperties
8227 chrome.networkingPrivate.IPSecProperties = function() {};
8233 chrome.networkingPrivate.IPSecProperties.prototype.AuthenticationType;
8239 * @see https://developer.chrome.com/extensions/networkingPrivate#type-ThirdPartyVPNProperties
8241 chrome.networkingPrivate.ThirdPartyVPNProperties = function() {};
8247 chrome.networkingPrivate.ThirdPartyVPNProperties.prototype.ExtensionID;
8253 * @see https://developer.chrome.com/extensions/networkingPrivate#type-VPNStateProperties
8255 chrome.networkingPrivate.VPNStateProperties = function() {};
8259 * @type {!chrome.networkingPrivate.IPSecProperties|undefined}
8261 chrome.networkingPrivate.VPNStateProperties.prototype.IPSec;
8265 * @type {!chrome.networkingPrivate.ThirdPartyVPNProperties|undefined}
8267 chrome.networkingPrivate.VPNStateProperties.prototype.ThirdPartyVPN;
8273 chrome.networkingPrivate.VPNStateProperties.prototype.Type;
8279 * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8281 chrome.networkingPrivate.WiFiStateProperties = function() {};
8287 chrome.networkingPrivate.WiFiStateProperties.prototype.Security;
8291 * @type {number|undefined}
8293 chrome.networkingPrivate.WiFiStateProperties.prototype.SignalStrength;
8299 * @see https://developer.chrome.com/extensions/networkingPrivate#type-WiFiStateProperties
8301 chrome.networkingPrivate.WiMAXStateProperties = function() {};
8305 * @type {number|undefined}
8307 chrome.networkingPrivate.WiMAXStateProperties.prototype.SignalStrength;
8312 * Cellular: (!chrome.networkingPrivate.CellularStateProperties|undefined),
8313 * Connectable: (boolean|undefined),
8314 * ConnectionState: (string|undefined),
8315 * ErrorState: (string|undefined),
8316 * Ethernet: (!chrome.networkingPrivate.EthernetStateProperties|undefined),
8318 * Name: (string|undefined),
8319 * Priority: (number|undefined),
8320 * Source: (string|undefined),
8322 * VPN: (!chrome.networkingPrivate.VPNStateProperties|undefined),
8323 * WiFi: (!chrome.networkingPrivate.WiFiStateProperties|undefined),
8324 * WiMAX: (!chrome.networkingPrivate.WiMAXStateProperties|undefined)
8327 chrome.networkingPrivate.NetworkStateProperties;
8332 * certificate: string,
8333 * intermediateCertificates: (!Array<string>|undefined),
8334 * publicKey: string,
8336 * signedData: string,
8337 * deviceSerial: string,
8338 * deviceSsid: string,
8339 * deviceBssid: string
8342 chrome.networkingPrivate.VerificationProperties;
8347 * networkType: string,
8348 * visible: (boolean|undefined),
8349 * configured: (boolean|undefined),
8350 * limit: (number|undefined)
8353 chrome.networkingPrivate.NetworkFilter;
8357 * @param {string} guid
8358 * @param {function(!Object)} callback
8360 chrome.networkingPrivate.getProperties = function(guid, callback) {};
8364 * @param {string} guid
8365 * @param {function(!Object)} callback
8367 chrome.networkingPrivate.getManagedProperties = function(guid, callback) {};
8371 * @param {string} guid
8372 * @param {function(!chrome.networkingPrivate.NetworkStateProperties)} callback
8374 chrome.networkingPrivate.getState = function(guid, callback) {};
8378 * TODO: Use NetworkConfigProperties for |properties| once fully
8380 * @param {string} guid
8381 * @param {!Object} properties
8382 * @param {function()=} opt_callback
8384 chrome.networkingPrivate.setProperties =
8385 function(guid, properties, opt_callback) {};
8389 * TODO: Use NetworkConfigProperties for |properties| once fully
8391 * @param {boolean} shared
8392 * @param {!Object} properties
8393 * @param {function(string)=} opt_callback Returns guid of the configured
8396 chrome.networkingPrivate.createNetwork =
8397 function(shared, properties, opt_callback) {};
8401 * @param {string} guid
8402 * @param {function()=} opt_callback Called when the operation has completed.
8404 chrome.networkingPrivate.forgetNetwork = function(guid, opt_callback) {};
8408 * @param {!chrome.networkingPrivate.NetworkFilter} filter
8409 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8412 chrome.networkingPrivate.getNetworks = function(filter, callback) {};
8416 * @param {string} type
8417 * @param {function(!Array.<!chrome.networkingPrivate.NetworkStateProperties>)}
8419 * @deprecated Use chrome.networkingPrivate.getNetworks with filter.visible=true
8421 chrome.networkingPrivate.getVisibleNetworks = function(type, callback) {};
8425 * @param {function(!Array.<string>)} callback
8426 * @deprecated Use chrome.networkingPrivate.getDeviceStates.
8428 chrome.networkingPrivate.getEnabledNetworkTypes = function(callback) {};
8432 * @param {function(!Array.<!chrome.networkingPrivate.DeviceStateProperties>)}
8435 chrome.networkingPrivate.getDeviceStates = function(callback) {};
8438 /** @param {string} networkType */
8439 chrome.networkingPrivate.enableNetworkType = function(networkType) {};
8442 /** @param {string} networkType */
8443 chrome.networkingPrivate.disableNetworkType = function(networkType) {};
8447 * Requests that the networking subsystem scan for new networks and update the
8448 * list returned by getVisibleNetworks.
8450 chrome.networkingPrivate.requestNetworkScan = function() {};
8454 * @param {string} guid
8455 * @param {function()=} opt_callback
8457 chrome.networkingPrivate.startConnect = function(guid, opt_callback) {};
8461 * @param {string} guid
8462 * @param {function()=} opt_callback
8464 chrome.networkingPrivate.startDisconnect = function(guid, opt_callback) {};
8468 * @param {string} guid
8469 * @param {(string|function())=} opt_carrierOrCallback
8470 * @param {function()=} opt_callback
8472 chrome.networkingPrivate.startActivate =
8473 function(guid, opt_carrierOrCallback, opt_callback) {};
8477 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8478 * @param {function(boolean)} callback
8480 chrome.networkingPrivate.verifyDestination =
8481 function(verificationInfo, callback) {};
8485 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8486 * @param {string} guid
8487 * @param {function(string)} callback
8489 chrome.networkingPrivate.verifyAndEncryptCredentials =
8490 function(verificationInfo, guid, callback) {};
8494 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
8495 * @param {string} data
8496 * @param {function(string)} callback
8498 chrome.networkingPrivate.verifyAndEncryptData =
8499 function(verificationInfo, data, callback) {};
8503 * @param {string} ipOrMacAddress
8504 * @param {boolean} enabled
8505 * @param {function(string)=} opt_callback
8507 chrome.networkingPrivate.setWifiTDLSEnabledState =
8508 function(ipOrMacAddress, enabled, opt_callback) {};
8512 * @param {string} ipOrMacAddress
8513 * @param {function(string)} callback
8515 chrome.networkingPrivate.getWifiTDLSStatus =
8516 function(ipOrMacAddress, callback) {};
8520 * @param {string} guid
8521 * @param {function(string)} callback
8523 chrome.networkingPrivate.getCaptivePortalStatus = function(guid, callback) {};
8526 /** @type {!ChromeStringArrayEvent} */
8527 chrome.networkingPrivate.onNetworksChanged;
8530 /** @type {!ChromeStringArrayEvent} */
8531 chrome.networkingPrivate.onNetworkListChanged;
8534 /** @type {!ChromeEvent} */
8535 chrome.networkingPrivate.onDeviceStateListChanged;
8538 /** @type {!ChromeStringStringEvent} */
8539 chrome.networkingPrivate.onPortalDetectionCompleted;
8543 * WARNING(2014/08/14): This API is still under active initial development and
8544 * unstable. The types are not well defined or documented, and this API
8545 * definition here should not be used as an example for other APIs added to this
8546 * file. Please contact mednik@ for questions on and maintenance for this API.
8548 * @see http://goo.gl/afV8wB
8554 * Data type sent to the event handler of chrome.mdns.onServiceList.
8557 chrome.mdns.MdnsService = function() {};
8560 /** @type {string} */
8561 chrome.mdns.MdnsService.prototype.serviceName;
8564 /** @type {string} */
8565 chrome.mdns.MdnsService.prototype.serviceHostPort;
8568 /** @type {string} */
8569 chrome.mdns.MdnsService.prototype.ipAddress;
8572 /** @type {!Array.<string>} */
8573 chrome.mdns.MdnsService.prototype.serviceData;
8577 * Event whose listeners take an array of MdnsService parameter.
8580 chrome.mdns.ServiceListEvent = function() {};
8584 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8585 * @param {!Object=} opt_filter
8587 chrome.mdns.ServiceListEvent.prototype.addListener =
8588 function(callback, opt_filter) {};
8591 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
8592 chrome.mdns.ServiceListEvent.prototype.removeListener = function(callback) {};
8596 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
8599 chrome.mdns.ServiceListEvent.prototype.hasListener = function(callback) {};
8602 /** @return {boolean} */
8603 chrome.mdns.ServiceListEvent.prototype.hasListeners = function() {};
8606 /** @type {!chrome.mdns.ServiceListEvent} */
8607 chrome.mdns.onServiceList;
8612 * @see http://goo.gl/79p5h5
8614 chrome.gcdPrivate = {};
8618 * Represents a GCD device discovered locally or registered to a given user.
8619 * deviceId: Opaque device identifier to be passed to API.
8620 * setupType: How this device was discovered.
8621 * cloudId: Cloud identifier string.
8622 * deviceName: Device human readable name.
8623 * deviceType: Device type (camera, printer, etc).
8624 * deviceDescription: Device human readable description.
8627 * setupType: string,
8628 * cloudId: (string|undefined),
8629 * deviceType: string,
8630 * deviceName: string,
8631 * deviceDescription: string
8634 chrome.gcdPrivate.Device;
8638 * Returns the list of cloud devices visible locally or available in the
8639 * cloud for user account.
8640 * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
8642 chrome.gcdPrivate.getCloudDeviceList = function(callback) {};
8646 * Queries network for local devices. Triggers onDeviceStateChanged and
8647 * onDeviceRemoved events. Call this function *only* after registering for
8648 * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
8650 chrome.gcdPrivate.queryForNewLocalDevices = function() {};
8654 * Cache the WiFi password in the browser process for use during
8655 * provisioning. This is done to allow the gathering of the wifi password to
8656 * not be done while connected to the device's network. Callback is called
8657 * with true if wifi password was cached and false if it was unavailable.
8658 * @param {string} ssid
8659 * @param {function(boolean): void} callback
8661 chrome.gcdPrivate.prefetchWifiPassword = function(ssid, callback) {};
8665 * Returns local device information.
8666 * @param {string} serviceName The mDNS service name of the device.
8667 * @param {function(string, !Object): void}
8668 * callback Called when when the device info is available or on error.
8669 * |status|: The status of the operation (success or type of error).
8670 * |deviceInfo|: Content of /privet/info response.
8671 * https://developers.google.com/cloud-devices/v1/reference/local-api/info
8673 chrome.gcdPrivate.getDeviceInfo = function(serviceName, callback) {};
8677 * Create new pairing session.
8678 * @param {string} serviceName The mDNS service name of the device.
8679 * @param {function(number, string, !Array.<string>): void}
8680 * callback Called when the session is established or on error. 1st param,
8681 * |sessionId|, is the session ID (identifies the session for future calls).
8682 * 2nd param, |status|, is the status (success or type of error). 3rd param,
8683 * |pairingTypes|, is a list of pairing types supported by this device.
8685 chrome.gcdPrivate.createSession = function(serviceName, callback) {};
8689 * Start pairing with the selected method.
8690 * @param {number} sessionId
8691 * @param {string} pairingType
8692 * @param {function(string): void} callback
8694 chrome.gcdPrivate.startPairing = function(sessionId, pairingType, callback) {};
8698 * Confirm pairing code.
8699 * @param {number} sessionId
8700 * @param {string} code
8701 * @param {function(string): void} callback
8703 chrome.gcdPrivate.confirmCode = function(sessionId, code, callback) {};
8707 * Send an encrypted message to the device. If the message is a setup message
8708 * with a wifi ssid specified but no password, the password cached from
8709 * prefetchWifiPassword() will be used and the call will fail if it's not
8710 * available. For open networks use an empty string as the password.
8711 * @param {number} sessionId
8712 * @param {string} api The API path.
8713 * @param {!Object} input The input message to be sent over the encrypted
8715 * @param {function(string, ?Object): void} callback
8717 chrome.gcdPrivate.sendMessage = function(sessionId, api, input, callback) {};
8721 * Terminate the session with the device.
8722 * @param {number} sessionId
8724 chrome.gcdPrivate.terminateSession = function(sessionId) {};
8728 * Returns command definitions.
8729 * @param {string} deviceId The device to get command definitions for.
8730 * @param {function(!Object): void} callback The result callback.
8732 chrome.gcdPrivate.getCommandDefinitions = function(deviceId, callback) {};
8736 * Creates and sends a new command.
8737 * @param {string} deviceId The device to send the command to.
8738 * @param {number} expireInMs The number of milliseconds since now before the
8739 * command expires. An expired command should not be executed by the device.
8740 * Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
8741 * inclusive. All values outside that range will be replaced by 30 days.
8742 * @param {!Object} command Described at
8743 * https://developers.google.com/cloud-devices/v1/reference/commands.
8744 * @param {function(!Object): void} callback The result callback.
8746 chrome.gcdPrivate.insertCommand = function(
8747 deviceId, expireInMs, command, callback) {};
8751 * Returns a particular command.
8752 * @param {string} commandId Unique command ID.
8753 * @param {function(!Object): void} callback The result callback.
8755 chrome.gcdPrivate.getCommand = function(commandId, callback) {};
8759 * Cancels a command.
8760 * @param {string} commandId Unique command ID.
8761 * @param {function(!Object): void} callback The result callback.
8763 chrome.gcdPrivate.cancelCommand = function(commandId, callback) {};
8767 * Lists all commands in order of creation.
8768 * @param {string} deviceId The device to send the command to.
8769 * @param {string} byUser List all the commands issued by the user. Special
8770 * value 'me' can be used to list by the current user.
8771 * @param {string} state Command state.
8772 * @param {function(!Array.<!Object>): void} callback The result callback.
8774 chrome.gcdPrivate.getCommandsList = function(
8775 deviceId, byUser, state, callback) {};
8780 * Event whose listeners take a chrome.gcdPrivate.Device.
8783 chrome.gcdPrivate.DeviceEvent = function() {};
8786 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8787 chrome.gcdPrivate.DeviceEvent.prototype.addListener = function(callback) {};
8790 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
8791 chrome.gcdPrivate.DeviceEvent.prototype.removeListener = function(callback) {};
8795 * @param {function(!chrome.gcdPrivate.Device): void} callback
8798 chrome.gcdPrivate.DeviceEvent.prototype.hasListener = function(callback) {};
8801 /** @return {boolean} */
8802 chrome.gcdPrivate.DeviceEvent.prototype.hasListeners = function() {};
8806 * Fires when a device's state changes. When a listener is first added, this
8807 * event fires for all known devices on the network. Afterwards, it will fire
8808 * with device status updates.
8809 * @type {!chrome.gcdPrivate.DeviceEvent}
8811 chrome.gcdPrivate.onDeviceStateChanged;
8815 * Fires when a given device disappears.
8816 * |deviceId| The device that has disappeared.
8817 * @type {!ChromeStringEvent}
8819 chrome.gcdPrivate.onDeviceRemoved;
8824 * @see http://goo.gl/bKHibo
8826 chrome.bluetoothPrivate = {};
8831 chrome.bluetoothPrivate.PairingEvent = function() {};
8834 /** @type {string} */
8835 chrome.bluetoothPrivate.PairingEvent.prototype.pairing;
8838 /** @type {!chrome.bluetooth.Device} */
8839 chrome.bluetoothPrivate.PairingEvent.prototype.device;
8842 /** @type {string|undefined} */
8843 chrome.bluetoothPrivate.PairingEvent.prototype.pincode;
8846 /** @type {number|undefined} */
8847 chrome.bluetoothPrivate.PairingEvent.prototype.passkey;
8850 /** @type {number|undefined} */
8851 chrome.bluetoothPrivate.PairingEvent.prototype.enteredKey;
8856 * name: (string|undefined),
8857 * powered: (boolean|undefined),
8858 * discoverable: (boolean|undefined)
8861 chrome.bluetoothPrivate.NewAdapterState;
8866 * device: !chrome.bluetooth.Device,
8867 * response: (string|undefined),
8868 * pincode: (string|undefined),
8869 * passkey: (number|undefined),
8870 * enteredKey: (number|undefined)
8873 chrome.bluetoothPrivate.SetPairingResponseOptions;
8877 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
8878 * @param {function()} callback
8880 chrome.bluetoothPrivate.setAdapterState = function(adapterState, callback) {};
8884 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
8885 * @param {function()} callback
8887 chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
8892 * Event whose listeners take a PairingEvent parameter.
8895 chrome.bluetoothPrivate.PairingEventEvent = function() {};
8898 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8899 chrome.bluetoothPrivate.PairingEventEvent.prototype.addListener =
8900 function(callback) {};
8903 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8904 chrome.bluetoothPrivate.PairingEventEvent.prototype.removeListener =
8905 function(callback) {};
8909 * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
8912 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListener =
8913 function(callback) {};
8916 /** @return {boolean} */
8917 chrome.bluetoothPrivate.PairingEventEvent.prototype.hasListeners =
8921 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
8922 chrome.bluetoothPrivate.onPairing;
8928 * @see http://goo.gl/XmVdHm
8930 chrome.inlineInstallPrivate = {};
8934 * Installs the given app ID.
8935 * @param {string} id
8936 * @param {function(string, string): void=} opt_callback Response callback that
8937 * returns two string: (1) an error string (or empty string on success) and
8938 * (2) an error code in case of error
8940 chrome.inlineInstallPrivate.install = function(id, opt_callback) {};