2 * Copyright 2009 The Closure Compiler Authors
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @fileoverview Definitions for the Chromium extensions API.
20 * This is the externs file for the Chrome Extensions API.
21 * See http://developer.chrome.com/extensions/
23 * There are several problematic issues regarding Chrome extension APIs and
24 * this externs files, including:
25 * A. When to add packages to this file
26 * B. Optional parameters
32 * The best practices for each are described in more detail below. It
33 * should be noted that, due to historical reasons, and the evolutionary
34 * nature of this file, much this file currently violates the best practices
35 * described below. As changed are made, the changes should adhere to the
38 * A. When to Add Packages to this File?
39 * Packages in chrome.experimental.* should *not* be added to this file. The
40 * experimental APIs change very quickly, so rather than add them here, make a
41 * separate externs file for your project, then move the API here when it moves
42 * out of experimental.
44 * Some non-experimental APIs are still evolving or are not full documented. It
45 * is still advantageous to include these in this file as doing so avoids a
46 * proliferation of project-private externs files containing duplicated info. In
47 * these cases, use comments to describe the situation.
49 * B. Optional Parameters
50 * The Chrome extension APIs make extensive use of optional parameters that
51 * are not at the end of the parameter list, "interior optional parameters",
52 * while the JS Compiler's type system requires optional parameters to be
53 * at the end. This creates a bit of tension:
55 * 1. If a method has N required params, then the parameter declarations
56 * should have N required params.
57 * 2. If, due to interior optional params, a parameter can be of more than
58 * one type, its at-param should:
59 * a. be named to indicate both possibilities, eg, extensionIdOrRequest,
60 * or getInfoOrCallback.
61 * b. the type should include both types, in the same order as the parts
62 * of the name, even when one type subsumes the other, eg, {string|*}
63 * or {Object|function(string)}.
64 * See chrome.runtime.sendMessage for a complex example as sendMessage
65 * takes three params with the first and third being optional.
68 * The Chrome APIs define many types are that actually pseudo-types, that
69 * is, they can't be instantiated by name. The extension APIs also pass
70 * untyped objects (a bag of properties) to callbacks.
72 * The Chrome extension APIs include at least three different situations:
74 * 1. an object that must be created by an extension developer and passed
75 * into a Chrome extension API and for which there is no constructor.
76 * 2. an instance of a type that is created inside the extension libraries
77 * and passed out to a callback/listener or returned by an extension API
78 * (the constructor implicity lives within the library).
79 * 3. like #2, but a bag-of-properties object that is passed out to a
80 * callback/listener or returned by an extension API so there is no
83 * For #1, use a typedef so object literals and objects created via goog.object
84 * are acceptable, for example, the Permissions type defined at
85 * http://developer.chrome.com/extensions/permissions.html#type-Permissions
90 * * permissions: (!Array.<string>|undefined),
91 * * origins: (!Array.<string>|undefined)
94 * chrome.permissions.Permissions;
96 * Using typedefs provides type-safety for the fields that are defined in
97 * the object literal and also defined in the typedef. Note that typedefs define
98 * a minimal interface and will not complain about extraneous (often
101 * Also, typedefs of record types are non-nullable by default. The "{?{"
102 * creates a nullable record-type typedef so ! has the same meaning in usages
103 * as it does for real types.
105 * For #2, use a standard constructor, even though no constructor is provided
106 * and extension writers will never instantiate an instance, as using a first
107 * class type provides the strongest type checking. For example, see the Port
108 * type defined at http://developer.chrome.com/apps/runtime.html#type-Port.
109 * Always qualify the type name to reduce top-level pollution in this file:
112 * chrome.extension.Port = function() {}
116 * Note that, unfortunately, the actual Port class definition in this file
117 * does not follow this recommendation.
119 * For #3, use {!Object}, that is, a bag of properites. This is a sad reality
120 * given that the Chrome extensions do not document a real type. It is tempting
121 * to define a real-type within this file and treat this situation as identical
122 * to #2, but that means a new type is being defined in this file and developers
123 * do not expect to find required new types in extension files.
125 * If a real type is declared here, then developers will need to incorporate
126 * that type into the signature of their callback method and there will be
127 * no indication from the docs that they need to do so.
130 * Most packages define a set of events with the standard set of methods:
131 * addListener, removeListener, hasListener and hasListeners. ChromeEvent
132 * is the appropriate type when an event's listeners do not take any
133 * parameters, however, many events take parameters specific to that event:
135 * 1. Create a pseudo-type for the event, for example,
136 * chrome.runtime.PortEvent and define the four methods on it.
137 * 2. Fully describe the listener/callback's signature, for example,
139 * * at-param {function(!chrome.runtime.Port): void} callback Callback.
140 * chrome.runtime.PortEvent.prototype.addListener =
141 * function(callback) {};
144 * * at-param {function(*, !chrome.runtime.MessageSender,
145 * * function(*): void): (boolean|undefined)} callback Callback.
146 * chrome.runtime.MessageSenderEvent.prototype.addListener =
147 * function(callback) {};
150 * We treat the Chrome Extension API pages as "the truth". Not-null types
151 * should be used in the following situations:
153 * 1. Parameters and return values that are not explicitly declared to handle
155 * 2. Static event instances, for example, chrome.runtime.onConnect's type
156 * should be: !chrome.runtime.PortEvent.
157 * 3. Optional params as there is little value to passing null when the
158 * parameter can be omitted, of course, if null is explicitly declared
159 * to be meaningful, then a nullable type should be used.
162 * Private Chrome APIs (such as those that end in "Private") should go at the
163 * bottom of this file.
171 * TODO(tbreisacher): Move all chrome.app.* externs into their own file.
179 * @see http://developer.chrome.com/apps/app.runtime.html
181 chrome
.app
.runtime
= {};
186 * @see http://developer.chrome.com/apps/app_runtime.html
188 chrome
.app
.runtime
.LaunchItem = function() {};
191 /** @type {!FileEntry} */
192 chrome
.app
.runtime
.LaunchItem
.prototype.entry
;
195 /** @type {string} */
196 chrome
.app
.runtime
.LaunchItem
.prototype.type
;
201 * @see http://developer.chrome.com/apps/app_runtime.html
203 chrome
.app
.runtime
.LaunchData = function() {};
206 /** @type {string|undefined} */
207 chrome
.app
.runtime
.LaunchData
.prototype.id
;
210 /** @type {!Array.<!chrome.app.runtime.LaunchItem>|undefined} */
211 chrome
.app
.runtime
.LaunchData
.prototype.items
;
214 /** @type {string|undefined} */
215 chrome
.app
.runtime
.LaunchData
.prototype.url
;
218 /** @type {string|undefined} */
219 chrome
.app
.runtime
.LaunchData
.prototype.referrerUrl
;
222 /** @type {boolean|undefined} */
223 chrome
.app
.runtime
.LaunchData
.prototype.isKioskSession
;
227 * The type of chrome.app.runtime.onLaunched.
230 chrome
.app
.runtime
.LaunchEvent = function() {};
234 * @param {function(!chrome.app.runtime.LaunchData)} callback
235 * @see http://developer.chrome.com/apps/app.runtime.html#event-onLaunched
237 chrome
.app
.runtime
.LaunchEvent
.prototype.addListener = function(callback
) {};
241 * @param {function(!chrome.app.runtime.LaunchData)} callback
243 chrome
.app
.runtime
.LaunchEvent
.prototype.removeListener = function(callback
) {};
247 * @param {function(!chrome.app.runtime.LaunchData)} callback
250 chrome
.app
.runtime
.LaunchEvent
.prototype.hasListener = function(callback
) {};
256 chrome
.app
.runtime
.LaunchEvent
.prototype.hasListeners = function() {};
259 /** @type {!chrome.app.runtime.LaunchEvent} */
260 chrome
.app
.runtime
.onLaunched
;
264 * @type {!ChromeEvent}
265 * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
267 chrome
.app
.runtime
.onRestarted
;
272 * @see http://developer.chrome.com/apps/app.window.html
274 chrome
.app
.window
= {};
278 * @see https://developer.chrome.com/apps/app_window#method-getAll
279 * @return {!Array.<!chrome.app.window.AppWindow>}
281 chrome
.app
.window
.getAll = function() {};
285 * @see https://developer.chrome.com/apps/app_window#method-get
287 * @return {chrome.app.window.AppWindow}
289 chrome
.app
.window
.get = function(id
) {};
294 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
296 chrome
.app
.window
.AppWindow = function() {};
300 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
302 chrome
.app
.window
.AppWindow
.prototype.focus = function() {};
306 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
308 chrome
.app
.window
.AppWindow
.prototype.fullscreen = function() {};
313 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
315 chrome
.app
.window
.AppWindow
.prototype.isFullscreen = function() {};
319 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
321 chrome
.app
.window
.AppWindow
.prototype.minimize = function() {};
326 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
328 chrome
.app
.window
.AppWindow
.prototype.isMinimized = function() {};
332 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
334 chrome
.app
.window
.AppWindow
.prototype.maximize = function() {};
339 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
341 chrome
.app
.window
.AppWindow
.prototype.isMaximized = function() {};
345 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
347 chrome
.app
.window
.AppWindow
.prototype.restore = function() {};
351 * @param {number} left The new left position, in pixels.
352 * @param {number} top The new top position, in pixels.
353 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
355 chrome
.app
.window
.AppWindow
.prototype.moveTo = function(left
, top
) {};
359 * @param {number} width The new width, in pixels.
360 * @param {number} height The new height, in pixels.
361 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
363 chrome
.app
.window
.AppWindow
.prototype.resizeTo = function(width
, height
) {};
367 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
369 chrome
.app
.window
.AppWindow
.prototype.drawAttention = function() {};
373 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
375 chrome
.app
.window
.AppWindow
.prototype.clearAttention = function() {};
379 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
381 chrome
.app
.window
.AppWindow
.prototype.close = function() {};
385 * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
386 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
388 chrome
.app
.window
.AppWindow
.prototype.show = function(opt_focus
) {};
392 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
394 chrome
.app
.window
.AppWindow
.prototype.hide = function() {};
398 * @return {!chrome.app.window.Bounds} The current window bounds.
399 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
401 chrome
.app
.window
.AppWindow
.prototype.getBounds = function() {};
405 * @param {!chrome.app.window.Bounds} bounds The new window bounds.
406 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
408 chrome
.app
.window
.AppWindow
.prototype.setBounds = function(bounds
) {};
413 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
415 chrome
.app
.window
.AppWindow
.prototype.isAlwaysOnTop = function() {};
419 * @param {boolean} alwaysOnTop Set whether the window should stay above most
421 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
423 chrome
.app
.window
.AppWindow
.prototype.setAlwaysOnTop = function(alwaysOnTop
) {};
426 /** @type {!ChromeEvent} */
427 chrome
.app
.window
.AppWindow
.prototype.onBoundsChanged
;
430 /** @type {!ChromeEvent} */
431 chrome
.app
.window
.AppWindow
.prototype.onClosed
;
434 /** @type {!ChromeEvent} */
435 chrome
.app
.window
.AppWindow
.prototype.onFullscreened
;
438 /** @type {!ChromeEvent} */
439 chrome
.app
.window
.AppWindow
.prototype.onMinimized
;
442 /** @type {!ChromeEvent} */
443 chrome
.app
.window
.AppWindow
.prototype.onMaximized
;
446 /** @type {!ChromeEvent} */
447 chrome
.app
.window
.AppWindow
.prototype.onRestored
;
450 /** @type {!Window} */
451 chrome
.app
.window
.AppWindow
.prototype.contentWindow
;
456 * left: (number|undefined),
457 * top: (number|undefined),
458 * width: (number|undefined),
459 * height: (number|undefined)
461 * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
463 chrome
.app
.window
.Bounds
;
468 * id: (string|undefined),
469 * minWidth: (number|undefined),
470 * minHeight: (number|undefined),
471 * maxWidth: (number|undefined),
472 * maxHeight: (number|undefined),
473 * frame: (string|undefined),
474 * bounds: (!chrome.app.window.Bounds|undefined),
475 * transparentBackground: (boolean|undefined),
476 * state: (string|undefined),
477 * hidden: (boolean|undefined),
478 * resizable: (boolean|undefined),
479 * alwaysOnTop: (boolean|undefined),
480 * focused: (boolean|undefined)
482 * @see http://developer.chrome.com/apps/app.window.html#method-create
484 chrome
.app
.window
.CreateWindowOptions
;
488 * @param {string} url URL to create.
489 * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
491 * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
492 * Callback to be run.
493 * @see http://developer.chrome.com/apps/app.window.html#method-create
495 chrome
.app
.window
.create = function(
496 url
, opt_options
, opt_createWindowCallback
) {};
500 * Returns an AppWindow object for the current script context (ie JavaScript
502 * @return {!chrome.app.window.AppWindow}
503 * @see http://developer.chrome.com/apps/app.window.html#method-current
505 chrome
.app
.window
.current = function() {};
509 * @type {!ChromeEvent}
510 * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
512 chrome
.app
.window
.onBoundsChanged
;
516 * @type {!ChromeEvent}
517 * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
519 chrome
.app
.window
.onClosed
;
523 * @type {!ChromeEvent}
524 * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
526 chrome
.app
.window
.onFullscreened
;
530 * @type {!ChromeEvent}
531 * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
533 chrome
.app
.window
.onMaximized
;
537 * @type {!ChromeEvent}
538 * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
540 chrome
.app
.window
.onMinimized
;
544 * @type {!ChromeEvent}
545 * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
547 chrome
.app
.window
.onRestored
;
552 * @see https://developer.chrome.com/apps/bluetooth
554 chrome
.bluetooth = function() {};
559 * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
561 chrome
.bluetooth
.AdapterState = function() {};
564 /** @type {string} */
565 chrome
.bluetooth
.AdapterState
.prototype.address
;
568 /** @type {string} */
569 chrome
.bluetooth
.AdapterState
.prototype.name
;
572 /** @type {boolean} */
573 chrome
.bluetooth
.AdapterState
.prototype.powered
;
576 /** @type {boolean} */
577 chrome
.bluetooth
.AdapterState
.prototype.available
;
580 /** @type {boolean} */
581 chrome
.bluetooth
.AdapterState
.prototype.discovering
;
586 * @see https://developer.chrome.com/apps/bluetooth#type-Device
588 chrome
.bluetooth
.Device = function() {};
591 /** @type {string} */
592 chrome
.bluetooth
.Device
.prototype.address
;
595 /** @type {string|undefined} */
596 chrome
.bluetooth
.Device
.prototype.name
;
599 /** @type {number|undefined} */
600 chrome
.bluetooth
.Device
.prototype.deviceClass
;
603 /** @type {string|undefined} */
604 chrome
.bluetooth
.Device
.prototype.vendorIdSource
;
607 /** @type {string|undefined} */
608 chrome
.bluetooth
.Device
.prototype.vendorId
;
611 /** @type {number|undefined} */
612 chrome
.bluetooth
.Device
.prototype.productId
;
615 /** @type {number|undefined} */
616 chrome
.bluetooth
.Device
.prototype.deviceId
;
619 /** @type {string|undefined} */
620 chrome
.bluetooth
.Device
.prototype.type
;
623 /** @type {boolean|undefined} */
624 chrome
.bluetooth
.Device
.prototype.paired
;
627 /** @type {boolean|undefined} */
628 chrome
.bluetooth
.Device
.prototype.connected
;
631 /** @type {!Array.<string>|undefined} */
632 chrome
.bluetooth
.Device
.prototype.uuids
;
636 * @param {function(!chrome.bluetooth.AdapterState)} callback
637 * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
639 chrome
.bluetooth
.getAdapterState = function(callback
) {};
643 * @param {string} deviceAddress
644 * @param {function(!chrome.bluetooth.Device)} callback
645 * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
647 chrome
.bluetooth
.getDevice = function(deviceAddress
, callback
) {};
651 * @param {function(!Array.<!chrome.bluetooth.Device>)} callback
652 * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
654 chrome
.bluetooth
.getDevices = function(callback
) {};
658 * @param {function()=} opt_callback
659 * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
661 chrome
.bluetooth
.startDiscovery = function(opt_callback
) {};
665 * @param {function()=} opt_callback
666 * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
668 chrome
.bluetooth
.stopDiscovery = function(opt_callback
) {};
672 * Event whose listeners take an AdapaterState parameter.
675 chrome
.bluetooth
.AdapterStateEvent = function() {};
678 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
679 chrome
.bluetooth
.AdapterStateEvent
.prototype.addListener
=
680 function(callback
) {};
683 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
684 chrome
.bluetooth
.AdapterStateEvent
.prototype.removeListener
=
685 function(callback
) {};
689 * @param {function(!chrome.bluetooth.AdapterState): void} callback
692 chrome
.bluetooth
.AdapterStateEvent
.prototype.hasListener
=
693 function(callback
) {};
696 /** @return {boolean} */
697 chrome
.bluetooth
.AdapterStateEvent
.prototype.hasListeners = function() {};
701 * @type {!chrome.bluetooth.AdapterStateEvent}
702 * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
704 chrome
.bluetooth
.onAdapterStateChanged
;
708 * Event whose listeners take an Device parameter.
711 chrome
.bluetooth
.DeviceEvent = function() {};
714 /** @param {function(!chrome.bluetooth.Device): void} callback */
715 chrome
.bluetooth
.DeviceEvent
.prototype.addListener = function(callback
) {};
718 /** @param {function(!chrome.bluetooth.Device): void} callback */
719 chrome
.bluetooth
.DeviceEvent
.prototype.removeListener = function(callback
) {};
723 * @param {function(!chrome.bluetooth.Device): void} callback
726 chrome
.bluetooth
.DeviceEvent
.prototype.hasListener = function(callback
) {};
729 /** @return {boolean} */
730 chrome
.bluetooth
.DeviceEvent
.prototype.hasListeners = function() {};
734 * @type {!chrome.bluetooth.DeviceEvent}
735 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
737 chrome
.bluetooth
.onDeviceAdded
;
741 * @type {!chrome.bluetooth.DeviceEvent}
742 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
744 chrome
.bluetooth
.onDeviceChanged
;
748 * @type {!chrome.bluetooth.DeviceEvent}
749 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
751 chrome
.bluetooth
.onDeviceRemoved
;
756 * @see https://developer.chrome.com/apps/bluetoothSocket
758 chrome
.bluetoothSocket
= {};
763 * persistent: (boolean|undefined),
764 * name: (string|undefined),
765 * bufferSize: (number|undefined)
767 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
769 chrome
.bluetoothSocket
.SocketProperties
;
774 * channel: (number|undefined),
775 * psm: (number|undefined),
776 * backlog: (number|undefined)
778 * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
780 chrome
.bluetoothSocket
.ListenOptions
;
785 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
787 chrome
.bluetoothSocket
.SocketInfo = function() {};
790 /** @type {number} */
791 chrome
.bluetoothSocket
.SocketInfo
.prototype.socketId
;
794 /** @type {boolean} */
795 chrome
.bluetoothSocket
.SocketInfo
.prototype.persistent
;
798 /** @type {string|undefined} */
799 chrome
.bluetoothSocket
.SocketInfo
.prototype.name
;
802 /** @type {number|undefined} */
803 chrome
.bluetoothSocket
.SocketInfo
.prototype.bufferSize
;
806 /** @type {boolean} */
807 chrome
.bluetoothSocket
.SocketInfo
.prototype.paused
;
810 /** @type {boolean} */
811 chrome
.bluetoothSocket
.SocketInfo
.prototype.connected
;
814 /** @type {string|undefined} */
815 chrome
.bluetoothSocket
.SocketInfo
.prototype.address
;
818 /** @type {string|undefined} */
819 chrome
.bluetoothSocket
.SocketInfo
.prototype.uuid
;
823 * @param {!chrome.bluetoothSocket.SocketProperties|
824 * function(!{socketId: number})} propertiesOrCallback
825 * @param {function(!{socketId: number})=} opt_callback
826 * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
828 chrome
.bluetoothSocket
.create = function(propertiesOrCallback
, opt_callback
) {};
832 * @param {number} socketId
833 * @param {!chrome.bluetoothSocket.SocketProperties} properties
834 * @param {function()=} opt_callback
835 * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
837 chrome
.bluetoothSocket
.update = function(socketId
, properties
, opt_callback
) {};
841 * @param {number} socketId
842 * @param {boolean} paused
843 * @param {function()=} opt_callback
844 * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
846 chrome
.bluetoothSocket
.setPaused = function(socketId
, paused
, opt_callback
) {};
850 * @param {number} socketId
851 * @param {string} uuid
852 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
853 * @param {function()=} opt_callback
854 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingRfcomm
856 chrome
.bluetoothSocket
.listenUsingRfcomm
=
857 function(socketId
, uuid
, optionsOrCallback
, opt_callback
) {};
861 * @param {number} socketId
862 * @param {string} uuid
863 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
864 * @param {function()=} opt_callback
865 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
867 chrome
.bluetoothSocket
.listenUsingL2cap
=
868 function(socketId
, uuid
, optionsOrCallback
, opt_callback
) {};
872 * @param {number} socketId
873 * @param {string} address
874 * @param {string} uuid
875 * @param {function()} callback
876 * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
878 chrome
.bluetoothSocket
.connect = function(socketId
, address
, uuid
, callback
) {};
882 * @param {number} socketId
883 * @param {function()=} opt_callback
884 * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
886 chrome
.bluetoothSocket
.disconnect = function(socketId
, opt_callback
) {};
890 * @param {number} socketId
891 * @param {function()=} opt_callback
892 * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
894 chrome
.bluetoothSocket
.close = function(socketId
, opt_callback
) {};
898 * @param {number} socketId
899 * @param {!ArrayBuffer} data
900 * @param {function(number)=} opt_callback
901 * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
903 chrome
.bluetoothSocket
.send = function(socketId
, data
, opt_callback
) {};
907 * @param {number} socketId
908 * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
909 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
911 chrome
.bluetoothSocket
.getInfo = function(socketId
, callback
) {};
915 * @param {function(!Array.<!chrome.bluetoothSocket.SocketInfo>)} callback
916 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
918 chrome
.bluetoothSocket
.getSockets = function(callback
) {};
923 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
925 chrome
.bluetoothSocket
.AcceptEventData = function() {};
928 /** @type {number} */
929 chrome
.bluetoothSocket
.AcceptEventData
.prototype.socketId
;
932 /** @type {number} */
933 chrome
.bluetoothSocket
.AcceptEventData
.prototype.clientSocketId
;
937 * Event whose listeners take a AcceptEventData parameter.
940 chrome
.bluetoothSocket
.AcceptEvent = function() {};
944 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
946 chrome
.bluetoothSocket
.AcceptEvent
.prototype.addListener
=
947 function(callback
) {};
951 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
953 chrome
.bluetoothSocket
.AcceptEvent
.prototype.removeListener
=
954 function(callback
) {};
958 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
961 chrome
.bluetoothSocket
.AcceptEvent
.prototype.hasListener
=
962 function(callback
) {};
965 /** @return {boolean} */
966 chrome
.bluetoothSocket
.AcceptEvent
.prototype.hasListeners = function() {};
969 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
970 chrome
.bluetoothSocket
.onAccept
;
975 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
977 chrome
.bluetoothSocket
.AcceptErrorEventData = function() {};
980 /** @type {number} */
981 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.socketId
;
984 /** @type {string} */
985 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.errorMessage
;
988 /** @type {string} */
989 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.error
;
993 * Event whose listeners take a AcceptErrorEventData parameter.
996 chrome
.bluetoothSocket
.AcceptErrorEvent = function() {};
1001 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1003 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.addListener
=
1004 function(callback
) {};
1009 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1011 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.removeListener
=
1012 function(callback
) {};
1017 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1020 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.hasListener
=
1021 function(callback
) {};
1024 /** @return {boolean} */
1025 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.hasListeners
=
1029 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1030 chrome
.bluetoothSocket
.onAcceptError
;
1035 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1037 chrome
.bluetoothSocket
.ReceiveEventData = function() {};
1040 /** @type {number} */
1041 chrome
.bluetoothSocket
.ReceiveEventData
.prototype.socketId
;
1044 /** @type {!ArrayBuffer} */
1045 chrome
.bluetoothSocket
.ReceiveEventData
.prototype.data
;
1049 * Event whose listeners take a ReceiveEventData parameter.
1052 chrome
.bluetoothSocket
.ReceiveEvent = function() {};
1056 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1058 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.addListener
=
1059 function(callback
) {};
1063 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1065 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.removeListener
=
1066 function(callback
) {};
1070 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1073 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.hasListener
=
1074 function(callback
) {};
1077 /** @return {boolean} */
1078 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.hasListeners = function() {};
1081 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1082 chrome
.bluetoothSocket
.onReceive
;
1087 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1089 chrome
.bluetoothSocket
.ReceiveErrorEventData = function() {};
1092 /** @type {number} */
1093 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.socketId
;
1096 /** @type {string} */
1097 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.errorMessage
;
1100 /** @type {string} */
1101 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.error
;
1105 * Event whose listeners take a ReceiveErrorEventData parameter.
1108 chrome
.bluetoothSocket
.ReceiveErrorEvent = function() {};
1113 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1115 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.addListener
=
1116 function(callback
) {};
1121 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1123 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.removeListener
=
1124 function(callback
) {};
1129 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1132 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.hasListener
=
1133 function(callback
) {};
1136 /** @return {boolean} */
1137 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.hasListeners
=
1141 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1142 chrome
.bluetoothSocket
.onReceiveError
;
1146 * @see http://developer.chrome.com/extensions/commands.html
1149 chrome
.commands
= {};
1153 * @param {function(Array.<string>): void} callback Callback function.
1155 chrome
.commands
.getAll = function(callback
) {};
1158 /** @type {!ChromeEvent} */
1159 chrome
.commands
.onCommand
;
1163 * @see https://developer.chrome.com/extensions/extension.html
1166 chrome
.extension
= {};
1169 /** @type {!Object|undefined} */
1170 chrome
.extension
.lastError
= {};
1174 * @type {string|undefined}
1176 chrome
.extension
.lastError
.message
;
1179 /** @type {boolean|undefined} */
1180 chrome
.extension
.inIncognitoContext
;
1183 // TODO: change Object to !Object when it's clear nobody is passing in null
1184 // TODO: change Port to !Port since it should never be null
1186 * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
1187 * extensionId to connect to, in which case connectInfo params can be
1188 * passed in the next optional argument, or the connectInfo params.
1189 * @param {Object.<string>=} opt_connectInfo The connectInfo object,
1190 * if arg1 was the extensionId to connect to.
1191 * @return {Port} New port.
1193 chrome
.extension
.connect = function(
1194 opt_extensionIdOrConnectInfo
, opt_connectInfo
) {};
1198 * @return {Window} The global JS object for the background page.
1200 chrome
.extension
.getBackgroundPage = function() {};
1204 * @param {string} path A path to a resource within an extension expressed
1205 * relative to it's install directory.
1206 * @return {string} The fully-qualified URL to the resource.
1208 chrome
.extension
.getURL = function(path
) {};
1212 * @param {Object=} opt_fetchProperties An object with optional 'type' and
1213 * optional 'windowId' keys.
1214 * @return {Array.<Window>} The global JS objects for each content view.
1216 chrome
.extension
.getViews = function(opt_fetchProperties
) {};
1220 * @param {function(boolean): void} callback Callback function.
1222 chrome
.extension
.isAllowedFileSchemeAccess = function(callback
) {};
1226 * @param {function(boolean): void} callback Callback function.
1228 chrome
.extension
.isAllowedIncognitoAccess = function(callback
) {};
1232 * @param {string|*} extensionIdOrRequest Either the extensionId to send the
1233 * request to, in which case the request is passed as the next arg, or the
1235 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1236 * @param {function(*): void=} opt_callback The callback function which
1237 * takes a JSON response object sent by the handler of the request.
1239 chrome
.extension
.sendMessage = function(
1240 extensionIdOrRequest
, opt_request
, opt_callback
) {};
1244 * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
1245 * in which case the request is passed as the next arg, or the request.
1246 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1247 * @param {function(*): void=} opt_callback The callback function which
1248 * takes a JSON response object sent by the handler of the request.
1250 chrome
.extension
.sendRequest = function(opt_arg1
, opt_request
, opt_callback
) {};
1254 * @param {string} data
1256 chrome
.extension
.setUpdateUrlData = function(data
) {};
1259 /** @type {!ChromeEvent} */
1260 chrome
.extension
.onConnect
;
1263 /** @type {!ChromeEvent} */
1264 chrome
.extension
.onConnectExternal
;
1267 /** @type {!ChromeEvent} */
1268 chrome
.extension
.onMessage
;
1271 /** @type {!ChromeEvent} */
1272 chrome
.extension
.onRequest
;
1275 /** @type {!ChromeEvent} */
1276 chrome
.extension
.onRequestExternal
;
1280 * @see https://developer.chrome.com/extensions/runtime.html
1283 chrome
.runtime
= {};
1286 /** @type {!Object|undefined} */
1287 chrome
.runtime
.lastError
= {};
1291 * @type {string|undefined}
1293 chrome
.runtime
.lastError
.message
;
1296 /** @type {string} */
1301 * @param {function(!Window=): void} callback Callback function.
1303 chrome
.runtime
.getBackgroundPage = function(callback
) {};
1308 * Manifest information returned from chrome.runtime.getManifest. See
1309 * http://developer.chrome.com/extensions/manifest.html. Note that there are
1310 * several other fields not included here. They should be added to these externs
1314 chrome
.runtime
.Manifest = function() {};
1317 /** @type {string} */
1318 chrome
.runtime
.Manifest
.prototype.name
;
1321 /** @type {string} */
1322 chrome
.runtime
.Manifest
.prototype.version
;
1325 /** @type {number|undefined} */
1326 chrome
.runtime
.Manifest
.prototype.manifest_version
;
1329 /** @type {string|undefined} */
1330 chrome
.runtime
.Manifest
.prototype.description
;
1333 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
1334 chrome
.runtime
.Manifest
.prototype.oauth2
;
1337 /** @type {!Array.<(string|!Object)>} */
1338 chrome
.runtime
.Manifest
.prototype.permissions
;
1343 * Oauth2 info in the manifest.
1344 * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
1347 chrome
.runtime
.Manifest
.Oauth2 = function() {};
1350 /** @type {string} */
1351 chrome
.runtime
.Manifest
.Oauth2
.prototype.client_id
;
1353 /**@type {!Array.<string>} */
1354 chrome
.runtime
.Manifest
.Oauth2
.prototype.scopes
;
1358 * http://developer.chrome.com/extensions/runtime.html#method-getManifest
1359 * @return {!chrome.runtime.Manifest} The full manifest file of the app or
1362 chrome
.runtime
.getManifest = function() {};
1366 * @param {string} path A path to a resource within an extension expressed
1367 * relative to it's install directory.
1368 * @return {string} The fully-qualified URL to the resource.
1370 chrome
.runtime
.getURL = function(path
) {};
1373 * @param {string} url This may be used to clean up server-side data, do
1374 * analytics, and implement surveys. Maximum 255 characters.
1376 chrome
.runtime
.setUninstallUrl = function(url
) {};
1379 * Reloads the app or extension.
1381 chrome
.runtime
.reload = function() {};
1385 * @param {function(string, !Object=): void} callback Called with "throttled",
1386 * "no_update", or "update_available". If an update is available, the object
1387 * contains more information about the available update.
1389 chrome
.runtime
.requestUpdateCheck = function(callback
) {};
1392 * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
1395 chrome
.runtime
.restart = function() {};
1399 * @param {string|!Object.<string>=} opt_extensionIdOrConnectInfo Either the
1400 * extensionId to connect to, in which case connectInfo params can be
1401 * passed in the next optional argument, or the connectInfo params.
1402 * @param {!Object.<string>=} opt_connectInfo The connectInfo object,
1403 * if arg1 was the extensionId to connect to.
1404 * @return {!Port} New port.
1406 chrome
.runtime
.connect = function(
1407 opt_extensionIdOrConnectInfo
, opt_connectInfo
) {};
1411 * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
1412 * @param {string} application Name of the registered native messaging host to
1413 * connect to, like 'com.google.your_product'.
1414 * @return {!Port} New port.
1416 chrome
.runtime
.connectNative = function(application
) {};
1420 * @param {string|*} extensionIdOrMessage Either the extensionId to send the
1421 * message to, in which case the message is passed as the next arg, or the
1423 * @param {(*|Object|function(*): void)=} opt_messageOrOptsOrCallback
1425 * The message, if arg1 was the extensionId.
1426 * The options for message sending, if arg1 was the message and this
1427 * argument is not a function.
1428 * The callback, if arg1 was the message and this argument is a function.
1429 * @param {(Object|function(*): void)=} opt_optsOrCallback
1430 * Either the options for message sending, if arg2 was the message,
1432 * @param {function(*): void=} opt_callback The callback function which
1433 * takes a JSON response object sent by the handler of the request.
1435 chrome
.runtime
.sendMessage = function(
1436 extensionIdOrMessage
, opt_messageOrOptsOrCallback
, opt_optsOrCallback
,
1441 * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
1442 * @param {string} application Name of the registered native messaging host to
1443 * connect to, like 'com.google.your_product'.
1444 * @param {Object} message The message that will be passed to the native
1446 * @param {function(*)=} opt_callback Called with the response message sent by
1447 * the native messaging host. If an error occurs while connecting to the
1448 * native messaging host, the callback will be called with no arguments and
1449 * chrome.runtime.lastError will be set to the error message.
1451 chrome
.runtime
.sendNativeMessage = function(
1452 application
, message
, opt_callback
) {};
1456 * @param {function(!Object)} callback
1458 chrome
.runtime
.getPlatformInfo = function(callback
) {};
1462 * @param {function(!DirectoryEntry)} callback
1464 chrome
.runtime
.getPackageDirectoryEntry = function(callback
) {};
1467 /** @type {!chrome.runtime.PortEvent} */
1468 chrome
.runtime
.onConnect
;
1471 /** @type {!chrome.runtime.PortEvent} */
1472 chrome
.runtime
.onConnectExternal
;
1475 /** @type {!ChromeObjectEvent} */
1476 chrome
.runtime
.onInstalled
;
1479 /** @type {!chrome.runtime.MessageSenderEvent} */
1480 chrome
.runtime
.onMessage
;
1483 /** @type {!chrome.runtime.MessageSenderEvent} */
1484 chrome
.runtime
.onMessageExternal
;
1487 /** @type {!ChromeEvent} */
1488 chrome
.runtime
.onStartup
;
1491 /** @type {!ChromeEvent} */
1492 chrome
.runtime
.onSuspend
;
1495 /** @type {!ChromeEvent} */
1496 chrome
.runtime
.onSuspendCanceled
;
1499 /** @type {!ChromeObjectEvent} */
1500 chrome
.runtime
.onUpdateAvailable
;
1503 /** @type {!ChromeStringEvent} */
1504 chrome
.runtime
.onRestartRequired
;
1508 * Event whose listeners take a Port parameter.
1511 chrome
.runtime
.PortEvent = function() {};
1515 * @param {function(!Port): void} callback Callback.
1517 chrome
.runtime
.PortEvent
.prototype.addListener = function(callback
) {};
1521 * @param {function(!Port): void} callback Callback.
1523 chrome
.runtime
.PortEvent
.prototype.removeListener = function(callback
) {};
1527 * @param {function(!Port): void} callback Callback.
1530 chrome
.runtime
.PortEvent
.prototype.hasListener = function(callback
) {};
1536 chrome
.runtime
.PortEvent
.prototype.hasListeners = function() {};
1541 * Event whose listeners take a MessageSender and additional parameters.
1542 * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
1545 chrome
.runtime
.MessageSenderEvent = function() {};
1549 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1550 * callback Callback.
1552 chrome
.runtime
.MessageSenderEvent
.prototype.addListener = function(callback
) {};
1556 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1557 * callback Callback.
1559 chrome
.runtime
.MessageSenderEvent
.prototype.removeListener = function(callback
)
1564 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1565 * callback Callback.
1568 chrome
.runtime
.MessageSenderEvent
.prototype.hasListener = function(callback
) {};
1574 chrome
.runtime
.MessageSenderEvent
.prototype.hasListeners = function() {};
1579 * @see https://developer.chrome.com/extensions/tabs.html
1586 * code: (string|undefined),
1587 * file: (string|undefined),
1588 * allFrames: (boolean|undefined),
1589 * matchAboutBlank: (boolean|undefined),
1590 * runAt: (string|undefined)
1593 chrome
.tabs
.InjectDetails
;
1597 * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
1598 * @param {number|!chrome.types.ImageDetails|function(string):void}
1599 * windowIdOrOptionsOrCallback One of:
1600 * The target window.
1601 * An object defining details about the format and quality of an image, in
1602 * which case the window defaults to the current window.
1603 * A callback function which accepts the data URL string of a JPEG encoding
1604 * of the visible area of the captured tab.
1605 * @param {(!chrome.types.ImageDetails|function(string):void)=}
1606 * opt_optionsOrCallback Either an object defining details about the
1607 * format and quality of an image, or a callback function which accepts the
1608 * data URL string of a JPEG encoding of the visible area of the captured
1610 * @param {function(string):void=} opt_callback A callback function which
1611 * accepts the data URL string of a JPEG encoding of the visible area of the
1614 chrome
.tabs
.captureVisibleTab = function(windowIdOrOptionsOrCallback
,
1615 opt_optionsOrCallback
, opt_callback
) {};
1619 * @param {number} tabId Tab Id.
1620 * @param {{name: (string|undefined)}=} connectInfo Info Object.
1622 chrome
.tabs
.connect = function(tabId
, connectInfo
) {};
1627 * windowId: (number|undefined),
1628 * index: (number|undefined),
1629 * url: (string|undefined),
1630 * active: (boolean|undefined),
1631 * pinned: (boolean|undefined),
1632 * openerTabId: (number|undefined)
1635 chrome
.tabs
.CreateProperties
;
1639 * @param {!chrome.tabs.CreateProperties} createProperties Info object.
1640 * @param {function(!Tab): void=} opt_callback The callback function.
1642 chrome
.tabs
.create = function(createProperties
, opt_callback
) {};
1646 * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
1647 * @param {number|function(string): void} tabIdOrCallback The tab id, or a
1648 * callback function that will be invoked with the language of the active
1649 * tab in the current window.
1650 * @param {function(string): void=} opt_callback An optional callback function
1651 * that will be invoked with the language of the tab specified as first
1654 chrome
.tabs
.detectLanguage = function(tabIdOrCallback
, opt_callback
) {};
1658 * @see https://developer.chrome.com/extensions/tabs#method-executeScript
1659 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
1660 * Either the id of the tab in which to run the script, or an object
1661 * containing the details of the script to run, in which case the script
1662 * will be executed in the active tab of the current window.
1663 * @param {(!chrome.tabs.InjectDetails|function(!Array.<*>):void)=}
1664 * opt_detailsOrCallback Either an object containing the details of the
1665 * script to run, if the tab id was speficied as first argument, or a
1666 * callback that will be invoked with the result of the execution of the
1667 * script in every injected frame.
1668 * @param {function(!Array.<*>):void=} opt_callback A callback that will be
1669 * invoked with the result of the execution of the script in every
1672 chrome
.tabs
.executeScript = function(tabIdOrDetails
, opt_detailsOrCallback
,
1677 * @param {number} tabId Tab id.
1678 * @param {function(!Tab): void} callback Callback.
1680 chrome
.tabs
.get = function(tabId
, callback
) {};
1684 * Note (2014-05-21): Because this function is deprecated, the types of it's
1685 * parameters were not upgraded to make the first parameter optional and to mark
1686 * the Array and Tab in the callback as non-null.
1688 * @param {number?} windowId Window id.
1689 * @param {function(Array.<Tab>): void} callback Callback.
1690 * @deprecated Please use tabs.query {windowId: windowId}.
1692 chrome
.tabs
.getAllInWindow = function(windowId
, callback
) {};
1696 * @param {function(!Tab=): void} callback Callback.
1698 chrome
.tabs
.getCurrent = function(callback
) {};
1702 * Note (2014-05-21): Because this function is deprecated, the types of it's
1703 * parameters were not upgraded to make the first parameter optional and to mark
1704 * the Array and Tab in the callback as non-null.
1706 * @param {number?} windowId Window id.
1707 * @param {function(Tab): void} callback Callback.
1708 * @deprecated Please use tabs.query({active: true}).
1710 chrome
.tabs
.getSelected = function(windowId
, callback
) {};
1715 * windowId: (number|undefined),
1716 * tabs: (number|!Array.<number>)
1719 chrome
.tabs
.HighlightInfo
;
1723 * @param {!chrome.tabs.HighlightInfo} highlightInfo
1724 * @param {function(!Window): void} callback Callback function invoked
1725 * with each appropriate Window.
1727 chrome
.tabs
.highlight = function(highlightInfo
, callback
) {};
1731 * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
1732 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
1733 * Either the id of the tab in which to run the script, or an object
1734 * containing the details of the CSS to insert, in which case the script
1735 * will be executed in the active tab of the current window.
1736 * @param {(!chrome.tabs.InjectDetails|function():void)=}
1737 * opt_detailsOrCallback Either an object containing the details of the
1738 * CSS to insert, if the tab id was speficied as first argument, or a
1739 * callback that will be invoked after the CSS has been injected.
1740 * @param {function():void=} opt_callback A callback that will be invoked after
1741 * the CSS has been injected.
1743 chrome
.tabs
.insertCSS = function(tabIdOrDetails
, opt_detailsOrCallback
,
1749 * windowId: (number|undefined),
1753 chrome
.tabs
.MoveProperties
;
1757 * @param {number|!Array.<number>} tabId Tab id or array of tab ids.
1758 * @param {!chrome.tabs.MoveProperties} moveProperties
1759 * @param {function((!Tab|!Array.<!Tab>)): void=} opt_callback Callback.
1761 chrome
.tabs
.move = function(tabId
, moveProperties
, opt_callback
) {};
1766 * active: (boolean|undefined),
1767 * pinned: (boolean|undefined),
1768 * highlighted: (boolean|undefined),
1769 * currentWindow: (boolean|undefined),
1770 * lastFocusedWindow: (boolean|undefined),
1771 * status: (string|undefined),
1772 * title: (string|undefined),
1773 * url: (string|undefined),
1774 * windowId: (number|undefined),
1775 * windowType: (string|undefined),
1776 * index: (number|undefined)
1779 chrome
.tabs
.QueryInfo
;
1783 * @param {!chrome.tabs.QueryInfo} queryInfo
1784 * @param {function(!Array.<!Tab>): void} callback Callback.
1786 chrome
.tabs
.query = function(queryInfo
, callback
) {};
1790 * @see https://developer.chrome.com/extensions/tabs#method-query
1791 * @param {number} tabId The ID of the tab which is to be duplicated.
1792 * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
1793 * details about the duplicated tab.
1795 chrome
.tabs
.duplicate = function(tabId
, opt_callback
) {};
1800 * bypassCache: (boolean|undefined)
1803 chrome
.tabs
.ReloadProperties
;
1807 * @see https://developer.chrome.com/extensions/tabs#method-reload
1808 * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
1809 * opt_tabIdOrReloadPropertiesOrCallback One of:
1810 * The ID of the tab to reload; defaults to the selected tab of the current
1812 * An object specifying boolean flags to customize the reload operation.
1813 * A callback to be invoked when the reload is complete.
1814 * @param {(!chrome.tabs.ReloadProperties|function():void)=}
1815 * opt_reloadPropertiesOrCallback Either an object specifying boolean flags
1816 * to customize the reload operation, or a callback to be invoked when the
1817 * reload is complete, if no object needs to be specified.
1818 * @param {function():void=} opt_callback A callback to be invoked when the
1819 * reload is complete.
1821 chrome
.tabs
.reload = function(opt_tabIdOrReloadPropertiesOrCallback
,
1822 opt_reloadPropertiesOrCallback
, opt_callback
) {};
1826 * @param {number|!Array.<number>} tabIds A tab ID or an array of tab IDs.
1827 * @param {function(): void=} opt_callback Callback.
1829 chrome
.tabs
.remove = function(tabIds
, opt_callback
) {};
1833 * @param {number} tabId Tab id.
1834 * @param {*} request The request value of any type.
1835 * @param {function(*): void=} opt_callback The callback function which
1836 * takes a JSON response object sent by the handler of the request.
1838 chrome
.tabs
.sendMessage = function(tabId
, request
, opt_callback
) {};
1842 * @param {number} tabId Tab id.
1843 * @param {*} request The request value of any type.
1844 * @param {function(*): void=} opt_callback The callback function which
1845 * takes a JSON response object sent by the handler of the request.
1846 * @deprecated Please use runtime.sendMessage.
1848 chrome
.tabs
.sendRequest = function(tabId
, request
, opt_callback
) {};
1853 * url: (string|undefined),
1854 * active: (boolean|undefined),
1855 * highlighted: (boolean|undefined),
1856 * pinned: (boolean|undefined),
1857 * openerTabId: (number|undefined)
1860 chrome
.tabs
.UpdateProperties
;
1864 * @see https://developer.chrome.com/extensions/tabs#method-update
1865 * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
1866 * Either the id of the tab to update, or an object with new property
1867 * values, in which case the selected tab of the current window will be
1869 * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
1870 * opt_updatePropertiesOrCallback Either an object with new property values,
1871 * if the tabId was specified as first parameter, or an optional callback
1872 * that will be invoked with information about the tab being updated.
1873 * @param {function(!Tab=): void=} opt_callback An optional callback that will
1874 * be invoked with information about the tab being updated.
1876 chrome
.tabs
.update = function(tabIdOrUpdateProperties
,
1877 opt_updatePropertiesOrCallback
, opt_callback
) {};
1881 * @type {!ChromeEvent}
1882 * @deprecated Please use tabs.onActivated.
1884 chrome
.tabs
.onActiveChanged
;
1887 /** @type {!ChromeEvent} */
1888 chrome
.tabs
.onActivated
;
1891 /** @type {!ChromeEvent} */
1892 chrome
.tabs
.onAttached
;
1895 /** @type {!ChromeEvent} */
1896 chrome
.tabs
.onCreated
;
1899 /** @type {!ChromeEvent} */
1900 chrome
.tabs
.onDetached
;
1904 * @type {!ChromeEvent}
1905 * @deprecated Please use tabs.onHighlighted.
1907 chrome
.tabs
.onHighlightChanged
;
1911 * @type {!ChromeEvent}
1913 chrome
.tabs
.onHighlighted
;
1916 /** @type {!ChromeEvent} */
1917 chrome
.tabs
.onMoved
;
1920 /** @type {!ChromeEvent} */
1921 chrome
.tabs
.onRemoved
;
1924 /** @type {!ChromeEvent} */
1925 chrome
.tabs
.onUpdated
;
1928 /** @type {!ChromeEvent} */
1929 chrome
.tabs
.onReplaced
;
1932 // TODO(user): Remove once all usage has been confirmed to have ended.
1936 * @type {!ChromeEvent}
1937 * @deprecated Please use tabs.onActivated.
1939 chrome
.tabs
.onSelectionChanged
;
1944 * @see https://developer.chrome.com/extensions/windows.html
1946 chrome
.windows
= {};
1950 * @param {Object=} opt_createData May have many keys to specify parameters.
1952 * @param {function(ChromeWindow): void=} opt_callback Callback.
1954 chrome
.windows
.create = function(opt_createData
, opt_callback
) {};
1958 * @param {number} id Window id.
1959 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
1960 * @param {function(!ChromeWindow): void=} opt_callback Callback when
1961 * opt_getInfo is an object.
1963 chrome
.windows
.get = function(id
, opt_getInfo
, opt_callback
) {};
1967 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
1968 * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
1970 chrome
.windows
.getAll = function(opt_getInfo
, opt_callback
) {};
1974 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
1975 * @param {function(ChromeWindow): void=} opt_callback Callback.
1977 chrome
.windows
.getCurrent = function(opt_getInfo
, opt_callback
) { };
1981 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
1982 * @param {function(ChromeWindow): void=} opt_callback Callback.
1984 chrome
.windows
.getLastFocused = function(opt_getInfo
, opt_callback
) { };
1988 * @param {number} tabId Tab Id.
1989 * @param {function(): void=} opt_callback Callback.
1991 chrome
.windows
.remove = function(tabId
, opt_callback
) {};
1995 * @param {number} tabId Tab Id.
1996 * @param {Object} updateProperties An object which may have many keys for
1998 * @param {function(): void=} opt_callback Callback.
2000 chrome
.windows
.update = function(tabId
, updateProperties
, opt_callback
) {};
2003 /** @type {!ChromeEvent} */
2004 chrome
.windows
.onCreated
;
2007 /** @type {!ChromeEvent} */
2008 chrome
.windows
.onFocusChanged
;
2011 /** @type {!ChromeEvent} */
2012 chrome
.windows
.onRemoved
;
2016 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2019 chrome
.windows
.WINDOW_ID_NONE
;
2023 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2026 chrome
.windows
.WINDOW_ID_CURRENT
;
2031 * @see https://developer.chrome.com/extensions/i18n.html
2037 * @param {function(Array.<string>): void} callback The callback function which
2038 * accepts an array of the accept languages of the browser, such as
2039 * 'en-US','en','zh-CN'.
2041 chrome
.i18n
.getAcceptLanguages = function(callback
) {};
2045 * @param {string} messageName
2046 * @param {(string|Array.<string>)=} opt_args
2049 chrome
.i18n
.getMessage = function(messageName
, opt_args
) {};
2054 chrome
.i18n
.getUILanguage = function() {};
2059 * @see https://developer.chrome.com/extensions/pageAction.html
2061 chrome
.pageAction
= {};
2065 * @param {number} tabId Tab Id.
2067 chrome
.pageAction
.hide = function(tabId
) {};
2071 * @param {Object} details An object which has 'tabId' and either
2072 * 'imageData' or 'path'.
2074 chrome
.pageAction
.setIcon = function(details
) {};
2078 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2080 chrome
.pageAction
.setPopup = function(details
) {};
2084 * @param {Object} details An object which has 'tabId' and 'title'.
2086 chrome
.pageAction
.setTitle = function(details
) {};
2090 * @param {number} tabId Tab Id.
2092 chrome
.pageAction
.show = function(tabId
) {};
2095 /** @type {!ChromeEvent} */
2096 chrome
.pageAction
.onClicked
;
2101 chrome
.browser
= {};
2105 * @param {{url: string}} details An object with a single 'url' key.
2106 * @param {function(): void} callback The callback function. If an error occurs
2107 * opening the URL, chrome.runtime.lastError will be set to the error message.
2109 chrome
.browser
.openTab = function(details
, callback
) {};
2114 * @see https://developer.chrome.com/extensions/browserAction.html
2116 chrome
.browserAction
= {};
2120 * @param {Object} details An object whose keys are 'color' and
2121 * optionally 'tabId'.
2123 chrome
.browserAction
.setBadgeBackgroundColor = function(details
) {};
2127 * @param {Object} details An object whose keys are 'text' and
2128 * optionally 'tabId'.
2130 chrome
.browserAction
.setBadgeText = function(details
) {};
2134 * @param {Object} details An object which may have 'imageData',
2135 * 'path', or 'tabId' as keys.
2137 chrome
.browserAction
.setIcon = function(details
) {};
2141 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2143 chrome
.browserAction
.setPopup = function(details
) {};
2147 * @param {Object} details An object which has 'title' and optionally
2150 chrome
.browserAction
.setTitle = function(details
) {};
2153 /** @type {!ChromeEvent} */
2154 chrome
.browserAction
.onClicked
;
2158 * @param {number} tabId the ID of the tab on which to disable this action.
2160 chrome
.browserAction
.disable = function(tabId
) {};
2164 * @param {number} tabId the ID of the tab on which to enable this action.
2166 chrome
.browserAction
.enable = function(tabId
) {};
2171 * @see https://developer.chrome.com/extensions/bookmarks.html
2173 chrome
.bookmarks
= {};
2178 * pareintId: (string|undefined),
2179 * index: (number|undefined),
2180 * url: (string|undefined),
2181 * title: (string|undefined)
2183 * @see https://developer.chrome.com/extensions/bookmarks#method-create
2185 chrome
.bookmarks
.CreateDetails
;
2189 * @param {(string|Array.<string>)} idOrIdList
2190 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2191 * callback function which accepts an array of BookmarkTreeNode.
2192 * @return {Array.<BookmarkTreeNode>}
2194 chrome
.bookmarks
.get = function(idOrIdList
, callback
) {};
2198 * @param {string} id
2199 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2200 * callback function which accepts an array of BookmarkTreeNode.
2201 * @return {Array.<BookmarkTreeNode>}
2203 chrome
.bookmarks
.getChildren = function(id
, callback
) {};
2207 * @param {number} numberOfItems The number of items to return.
2208 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2209 * callback function which accepts an array of BookmarkTreeNode.
2210 * @return {Array.<BookmarkTreeNode>}
2212 chrome
.bookmarks
.getRecent = function(numberOfItems
, callback
) {};
2216 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2217 * callback function which accepts an array of BookmarkTreeNode.
2218 * @return {Array.<BookmarkTreeNode>}
2220 chrome
.bookmarks
.getTree = function(callback
) {};
2224 * @param {string} id The ID of the root of the subtree to retrieve.
2225 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2226 * callback function which accepts an array of BookmarkTreeNode.
2227 * @return {Array.<BookmarkTreeNode>}
2229 chrome
.bookmarks
.getSubTree = function(id
, callback
) {};
2233 * @param {string} query
2234 * @param {function(Array.<BookmarkTreeNode>): void} callback
2235 * @return {Array.<BookmarkTreeNode>}
2237 chrome
.bookmarks
.search = function(query
, callback
) {};
2241 * @param {chrome.bookmarks.CreateDetails} bookmark
2242 * @param {function(BookmarkTreeNode): void=} opt_callback The
2243 * callback function which accepts a BookmarkTreeNode object.
2245 chrome
.bookmarks
.create = function(bookmark
, opt_callback
) {};
2249 * @param {string} id
2250 * @param {Object} destination An object which has optional 'parentId' and
2252 * @param {function(BookmarkTreeNode): void=} opt_callback
2253 * The callback function which accepts a BookmarkTreeNode object.
2255 chrome
.bookmarks
.move = function(id
, destination
, opt_callback
) {};
2259 * @param {string} id
2260 * @param {Object} changes An object which may have 'title' as a key.
2261 * @param {function(BookmarkTreeNode): void=} opt_callback The
2262 * callback function which accepts a BookmarkTreeNode object.
2264 chrome
.bookmarks
.update = function(id
, changes
, opt_callback
) {};
2268 * @param {string} id
2269 * @param {function(): void=} opt_callback
2271 chrome
.bookmarks
.remove = function(id
, opt_callback
) {};
2275 * @param {string} id
2276 * @param {function(): void=} opt_callback
2278 chrome
.bookmarks
.removeTree = function(id
, opt_callback
) {};
2282 * @param {function(): void=} opt_callback
2284 chrome
.bookmarks
.import = function(opt_callback
) {};
2288 * @param {function(): void=} opt_callback
2290 chrome
.bookmarks
.export = function(opt_callback
) {};
2293 /** @type {!ChromeEvent} */
2294 chrome
.bookmarks
.onChanged
;
2297 /** @type {!ChromeEvent} */
2298 chrome
.bookmarks
.onChildrenReordered
;
2301 /** @type {!ChromeEvent} */
2302 chrome
.bookmarks
.onCreated
;
2305 /** @type {!ChromeEvent} */
2306 chrome
.bookmarks
.onImportBegan
;
2309 /** @type {!ChromeEvent} */
2310 chrome
.bookmarks
.onImportEnded
;
2313 /** @type {!ChromeEvent} */
2314 chrome
.bookmarks
.onMoved
;
2317 /** @type {!ChromeEvent} */
2318 chrome
.bookmarks
.onRemoved
;
2324 * description: string
2332 * @see https://developer.chrome.com/extensions/omnibox.html
2334 chrome
.omnibox
= {};
2338 chrome
.omnibox
.InputChangedEvent = function() {};
2342 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2344 chrome
.omnibox
.InputChangedEvent
.prototype.addListener = function(callback
) {};
2348 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2350 chrome
.omnibox
.InputChangedEvent
.prototype.removeListener
=
2351 function(callback
) {};
2355 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2358 chrome
.omnibox
.InputChangedEvent
.prototype.hasListener = function(callback
) {};
2361 /** @return {boolean} */
2362 chrome
.omnibox
.InputChangedEvent
.prototype.hasListeners = function() {};
2366 chrome
.omnibox
.InputEnteredEvent = function() {};
2369 /** @param {function(string, string): void} callback */
2370 chrome
.omnibox
.InputEnteredEvent
.prototype.addListener = function(callback
) {};
2373 /** @param {function(string, string): void} callback */
2374 chrome
.omnibox
.InputEnteredEvent
.prototype.removeListener
=
2375 function(callback
) {};
2379 * @param {function(string, string): void} callback
2382 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListener = function(callback
) {};
2385 /** @return {boolean} */
2386 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListeners = function() {};
2390 * @param {{description: string}} suggestion A partial SuggestResult object.
2392 chrome
.omnibox
.setDefaultSuggestion = function(suggestion
) {};
2395 /** @type {!ChromeEvent} */
2396 chrome
.omnibox
.onInputCancelled
;
2399 /** @type {!chrome.omnibox.InputChangedEvent} */
2400 chrome
.omnibox
.onInputChanged
;
2403 /** @type {!chrome.omnibox.InputEnteredEvent} */
2404 chrome
.omnibox
.onInputEntered
;
2407 /** @type {!ChromeEvent} */
2408 chrome
.omnibox
.onInputStarted
;
2413 * @see https://developer.chrome.com/extensions/dev/contextMenus.html
2415 chrome
.contextMenus
= {};
2419 * @param {!Object} createProperties
2420 * @param {function()=} opt_callback
2421 * @return {number} The id of the newly created window.
2423 chrome
.contextMenus
.create = function(createProperties
, opt_callback
) {};
2427 * @param {number} menuItemId
2428 * @param {function()=} opt_callback
2430 chrome
.contextMenus
.remove = function(menuItemId
, opt_callback
) {};
2434 * @param {function()=} opt_callback
2436 chrome
.contextMenus
.removeAll = function(opt_callback
) {};
2440 * @param {number} id
2441 * @param {!Object} updateProperties
2442 * @param {function()=} opt_callback
2444 chrome
.contextMenus
.update = function(id
, updateProperties
, opt_callback
) {};
2449 * @see https://developer.chrome.com/extensions/dev/cookies.html
2451 chrome
.cookies
= {};
2455 * This typedef is used for the parameters to chrome.cookies.get,
2456 * chrome.cookies.remove, and for the parameter to remove's callback. These uses
2457 * all identify a single cookie uniquely without specifying its content, and the
2458 * objects are identical except for the the storeId being optional vs required.
2459 * If greater divergence occurs, then going to two typedefs is recommended.
2464 * storeId: (string|undefined)
2467 chrome
.cookies
.CookieIdentifier
;
2471 * @param {!chrome.cookies.CookieIdentifier} details
2472 * @param {function(Cookie=): void} callback
2474 chrome
.cookies
.get = function(details
, callback
) {};
2478 * @param {Object} details
2479 * @param {function(Array.<Cookie>): void} callback
2481 chrome
.cookies
.getAll = function(details
, callback
) {};
2485 * @param {function(Array.<CookieStore>): void} callback
2487 chrome
.cookies
.getAllCookieStores = function(callback
) {};
2491 * @param {!chrome.cookies.CookieIdentifier} details
2492 * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
2493 * removal failed for any reason, the parameter will be "null", and
2494 * "chrome.runtime.lastError" will be set.
2496 chrome
.cookies
.remove = function(details
, opt_callback
) {};
2502 * name: (string|undefined),
2503 * value: (string|undefined),
2504 * domain: (string|undefined),
2505 * path: (string|undefined),
2506 * secure: (boolean|undefined),
2507 * httpOnly: (boolean|undefined),
2508 * expirationDate: (number|undefined),
2509 * storeId: (string|undefined)
2512 chrome
.cookies
.CookieSetDetails
;
2516 * @param {!chrome.cookies.CookieSetDetails} details
2517 * @param {function(Cookie): void=} opt_callback If setting failed for any
2518 * reason, the parameter will be "null", and "chrome.runtime.lastError" will
2521 chrome
.cookies
.set = function(details
, opt_callback
) {};
2525 * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
2526 * @type {!ChromeEvent}
2528 chrome
.cookies
.onChanged
;
2533 function CookieChangeInfo() {}
2536 /** @type {boolean} */
2537 CookieChangeInfo
.prototype.removed
;
2540 /** @type {Cookie} */
2541 CookieChangeInfo
.prototype.cookie
;
2544 /** @type {string} */
2545 CookieChangeInfo
.prototype.cause
;
2549 chrome
.management
= {};
2554 * showConfirmDialog: (boolean|undefined)
2557 chrome
.management
.InstallOptions
;
2561 * @param {string} id
2562 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
2565 chrome
.management
.get = function(id
, opt_callback
) {};
2569 * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
2570 * callback function.
2571 * @return {!Array.<!ExtensionInfo>}
2573 chrome
.management
.getAll = function(opt_callback
) {};
2577 * @param {string} id The id of an already installed extension.
2578 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2580 chrome
.management
.getPermissionWarningsById = function(id
, opt_callback
) {};
2584 * @param {string} manifestStr Extension's manifest JSON string.
2585 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2587 chrome
.management
.getPermissionWarningsByManifest
=
2588 function(manifestStr
, opt_callback
) {};
2592 * @param {string} id The id of an already installed extension.
2593 * @param {function(): void=} opt_callback Optional callback function.
2595 chrome
.management
.launchApp = function(id
, opt_callback
) {};
2599 * @param {string} id The id of an already installed extension.
2600 * @param {boolean} enabled Whether this item should be enabled.
2601 * @param {function(): void=} opt_callback Optional callback function.
2603 chrome
.management
.setEnabled = function(id
, enabled
, opt_callback
) {};
2607 * @param {string} id The id of an already installed extension.
2608 * @param {(!chrome.management.InstallOptions|function(): void)=}
2609 * opt_optionsOrCallback An optional uninstall options object or an optional
2610 * callback function.
2611 * @param {function(): void=} opt_callback Optional callback function.
2613 chrome
.management
.uninstall
=
2614 function(id
, opt_optionsOrCallback
, opt_callback
) {};
2618 * @param {(!chrome.management.InstallOptions|function(): void)=}
2619 * opt_optionsOrCallback An optional uninstall options object or an optional
2620 * callback function.
2621 * @param {function(): void=} opt_callback An optional callback function.
2623 chrome
.management
.uninstallSelf
=
2624 function(opt_optionsOrCallback
, opt_callback
) {};
2628 * @param {string} id The id of an already installed extension.
2629 * @param {function(): void=} opt_callback Optional callback function.
2631 chrome
.management
.createAppShortcut = function(id
, opt_callback
) {};
2635 * @param {string} id The id of an already installed extension.
2636 * @param {string} launchType The LaunchType enum value to set. Make sure this
2637 * value is in ExtensionInfo.availableLaunchTypes because the available
2638 * launch types vary on different platforms and configurations.
2639 * @param {function(): void=} opt_callback Optional callback function.
2641 chrome
.management
.setLaunchType = function(id
, launchType
, opt_callback
) {};
2645 * @param {string} url The URL of a web page. The scheme of the URL can only be
2646 * "http" or "https".
2647 * @param {string} title The title of the generated app.
2648 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
2651 chrome
.management
.generateAppForLink = function(url
, title
, opt_callback
) {};
2654 /** @type {!ChromeExtensionInfoEvent} */
2655 chrome
.management
.onDisabled
;
2658 /** @type {!ChromeExtensionInfoEvent} */
2659 chrome
.management
.onEnabled
;
2662 /** @type {!ChromeExtensionInfoEvent} */
2663 chrome
.management
.onInstalled
;
2666 /** @type {!ChromeStringEvent} */
2667 chrome
.management
.onUninstalled
;
2672 * @see https://developer.chrome.com/extensions/idle.html
2678 * @param {number} thresholdSeconds Threshold in seconds, used to determine
2679 * when a machine is in the idle state.
2680 * @param {function(string): void} callback Callback to handle the state.
2682 chrome
.idle
.queryState = function(thresholdSeconds
, callback
) {};
2686 * @param {number} intervalInSeconds Threshold, in seconds, used to determine
2687 * when the system is in an idle state.
2689 chrome
.idle
.setDetectionInterval = function(intervalInSeconds
) {};
2692 /** @type {!ChromeEvent} */
2693 chrome
.idle
.onStateChanged
;
2697 * Chrome Text-to-Speech API.
2699 * @see https://developer.chrome.com/extensions/tts.html
2706 * An event from the TTS engine to communicate the status of an utterance.
2709 function TtsEvent() {}
2712 /** @type {string} */
2713 TtsEvent
.prototype.type
;
2716 /** @type {number} */
2717 TtsEvent
.prototype.charIndex
;
2720 /** @type {string} */
2721 TtsEvent
.prototype.errorMessage
;
2726 * A description of a voice available for speech synthesis.
2729 function TtsVoice() {}
2732 /** @type {string} */
2733 TtsVoice
.prototype.voiceName
;
2736 /** @type {string} */
2737 TtsVoice
.prototype.lang
;
2740 /** @type {string} */
2741 TtsVoice
.prototype.gender
;
2744 /** @type {string} */
2745 TtsVoice
.prototype.extensionId
;
2748 /** @type {Array.<string>} */
2749 TtsVoice
.prototype.eventTypes
;
2753 * Gets an array of all available voices.
2754 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
2757 chrome
.tts
.getVoices = function(opt_callback
) {};
2761 * Checks if the engine is currently speaking.
2762 * @param {function(boolean)=} opt_callback The callback function.
2764 chrome
.tts
.isSpeaking = function(opt_callback
) {};
2768 * Speaks text using a text-to-speech engine.
2769 * @param {string} utterance The text to speak, either plain text or a complete,
2770 * well-formed SSML document. Speech engines that do not support SSML will
2771 * strip away the tags and speak the text. The maximum length of the text is
2772 * 32,768 characters.
2773 * @param {Object=} opt_options The speech options.
2774 * @param {function()=} opt_callback Called right away, before speech finishes.
2776 chrome
.tts
.speak = function(utterance
, opt_options
, opt_callback
) {};
2780 * Stops any current speech.
2782 chrome
.tts
.stop = function() {};
2787 * @see https://developer.chrome.com/extensions/ttsEngine.html
2789 chrome
.ttsEngine
= {};
2792 /** @type {!ChromeEvent} */
2793 chrome
.ttsEngine
.onSpeak
;
2796 /** @type {!ChromeEvent} */
2797 chrome
.ttsEngine
.onStop
;
2802 * @see https://developer.chrome.com/extensions/contentSettings.html
2804 chrome
.contentSettings
= {};
2807 /** @type {!ContentSetting} */
2808 chrome
.contentSettings
.cookies
;
2811 /** @type {!ContentSetting} */
2812 chrome
.contentSettings
.images
;
2815 /** @type {!ContentSetting} */
2816 chrome
.contentSettings
.javascript
;
2819 /** @type {!ContentSetting} */
2820 chrome
.contentSettings
.plugins
;
2823 /** @type {!ContentSetting} */
2824 chrome
.contentSettings
.popups
;
2827 /** @type {!ContentSetting} */
2828 chrome
.contentSettings
.notifications
;
2833 * @see https://developer.chrome.com/extensions/fileBrowserHandle.html
2835 chrome
.fileBrowserHandle
= {};
2838 /** @type {!ChromeEvent} */
2839 chrome
.fileBrowserHandle
.onExecute
;
2844 * @see https://developer.chrome.com/extensions/gcm
2850 * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
2853 chrome
.gcm
.MAX_MESSAGE_SIZE
;
2857 * Registers the application with GCM. The registration ID will be returned by
2858 * the callback. If register is called again with the same list of senderIds,
2859 * the same registration ID will be returned.
2860 * @see https://developer.chrome.com/extensions/gcm#method-register
2861 * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
2862 * send messages to the application.
2863 * @param {function(string): void} callback Function called when
2864 * registration completes with registration ID as argument.
2866 chrome
.gcm
.register = function(senderIds
, callback
) {};
2870 * Unregisters the application from GCM.
2871 * @see https://developer.chrome.com/extensions/gcm#method-unregister
2872 * @param {function(): void} callback Called when unregistration is done.
2874 chrome
.gcm
.unregister = function(callback
) {};
2878 * Sends an upstream message using GCM.
2879 * @see https://developer.chrome.com/extensions/gcm#method-send
2880 * @param {!chrome.gcm.Message} message Message to be sent.
2881 * @param {function(string): void} callback Called with message ID.
2883 chrome
.gcm
.send = function(message
, callback
) {};
2889 * destinationId: string,
2890 * messageId: string,
2891 * timeToLive: (number|undefined),
2892 * data: !Object.<string, string>
2899 * An event, fired when a message is received through GCM.
2900 * @see https://developer.chrome.com/extensions/gcm#event-onMessage
2901 * @type {!chrome.gcm.OnMessageEvent}
2903 chrome
.gcm
.onMessage
;
2907 * An event, fired when GCM server had to delete messages to the application
2908 * from its queue in order to manage its size.
2909 * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
2910 * @type {!ChromeEvent}
2912 chrome
.gcm
.onMessagesDeleted
;
2916 * An event indicating problems with sending messages.
2917 * @see https://developer.chrome.com/extensions/gcm#event-onSendError
2918 * @type {!chrome.gcm.OnSendErrorEvent}
2920 chrome
.gcm
.onSendError
;
2926 chrome
.gcm
.OnMessageEvent = function() {};
2930 * @param {function(!Object): void} callback Callback.
2932 chrome
.gcm
.OnMessageEvent
.prototype.addListener = function(callback
) {};
2936 * @param {function(!Object): void} callback Callback.
2938 chrome
.gcm
.OnMessageEvent
.prototype.removeListener = function(callback
) {};
2942 * @param {function(!Object): void} callback Callback.
2945 chrome
.gcm
.OnMessageEvent
.prototype.hasListener = function(callback
) {};
2951 chrome
.gcm
.OnMessageEvent
.prototype.hasListeners = function() {};
2957 chrome
.gcm
.OnSendErrorEvent = function() {};
2961 * @param {function(!Object): void} callback Callback.
2963 chrome
.gcm
.OnSendErrorEvent
.prototype.addListener = function(callback
) {};
2967 * @param {function(!Object): void} callback Callback.
2969 chrome
.gcm
.OnSendErrorEvent
.prototype.removeListener = function(callback
) {};
2972 * @param {function(!Object): void} callback Callback.
2975 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListener = function(callback
) {};
2981 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListeners = function() {};
2986 * @see https://developer.chrome.com/extensions/history.html
2988 chrome
.history
= {};
2992 * @param {Object.<string, string>} details Object with a 'url' key.
2994 chrome
.history
.addUrl = function(details
) {};
2998 * @param {function(): void} callback Callback function.
3000 chrome
.history
.deleteAll = function(callback
) {};
3004 * @param {Object.<string, string>} range Object with 'startTime'
3005 * and 'endTime' keys.
3006 * @param {function(): void} callback Callback function.
3008 chrome
.history
.deleteRange = function(range
, callback
) {};
3012 * @param {Object.<string, string>} details Object with a 'url' key.
3014 chrome
.history
.deleteUrl = function(details
) {};
3018 * @param {Object.<string, string>} details Object with a 'url' key.
3019 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
3020 * @return {!Array.<!VisitItem>}
3022 chrome
.history
.getVisits = function(details
, callback
) {};
3026 * @param {Object.<string, string>} query Object with a 'text' (string)
3027 * key and optional 'startTime' (number), 'endTime' (number) and
3028 * 'maxResults' keys.
3029 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
3030 * @return {!Array.<!HistoryItem>}
3032 chrome
.history
.search = function(query
, callback
) {};
3035 /** @type {!ChromeEvent} */
3036 chrome
.history
.onVisitRemoved
;
3039 /** @type {!ChromeEvent} */
3040 chrome
.history
.onVisited
;
3045 * @see http://developer.chrome.com/apps/identity.html
3047 chrome
.identity
= {};
3051 * @param {(chrome.identity.TokenDetails|function(string=): void)}
3052 * detailsOrCallback Token options or a callback function if no options are
3054 * @param {function(string=): void=} opt_callback A callback function if options
3057 chrome
.identity
.getAuthToken = function(detailsOrCallback
, opt_callback
) {};
3060 /** @typedef {{interactive: (boolean|undefined)}} */
3061 chrome
.identity
.TokenDetails
;
3065 * @param {chrome.identity.InvalidTokenDetails} details
3066 * @param {function(): void} callback
3068 chrome
.identity
.removeCachedAuthToken = function(details
, callback
) {};
3071 /** @typedef {{token: string}} */
3072 chrome
.identity
.InvalidTokenDetails
;
3076 * @param {chrome.identity.WebAuthFlowDetails} details
3077 * @param {function(string=): void} callback
3079 chrome
.identity
.launchWebAuthFlow = function(details
, callback
) {};
3082 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
3083 chrome
.identity
.WebAuthFlowDetails
;
3086 /** @type {!ChromeEvent} */
3087 chrome
.identity
.onSignInChanged
;
3092 * @see https://developer.chrome.com/extensions/input.ime.html
3098 chrome
.input
.ime
= {};
3103 * The OnKeyEvent event takes an extra argument.
3106 function ChromeInputImeOnKeyEventEvent() {}
3110 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3112 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
3114 ChromeInputImeOnKeyEventEvent
.prototype.addListener
=
3115 function(callback
, opt_extraInfoSpec
) {};
3119 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3122 ChromeInputImeOnKeyEventEvent
.prototype.removeListener = function(callback
) {};
3126 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3129 ChromeInputImeOnKeyEventEvent
.prototype.hasListener = function(callback
) {};
3133 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3136 ChromeInputImeOnKeyEventEvent
.prototype.hasListeners = function(callback
) {};
3140 * @param {!Object.<string,number>} parameters An object with a
3141 * 'contextID' (number) key.
3142 * @param {function(boolean): void} callback Callback function.
3144 chrome
.input
.ime
.clearComposition = function(parameters
, callback
) {};
3148 * @param {!Object.<string,(string|number)>} parameters An object with
3149 * 'contextID' (number) and 'text' (string) keys.
3150 * @param {function(boolean): void=} opt_callback Callback function.
3152 chrome
.input
.ime
.commitText = function(parameters
, opt_callback
) {};
3156 * @param {!Object.<string,(string|number)>} parameters An object with
3157 * 'contextID' (number) and 'text' (string) keys.
3158 * @param {function(boolean): void=} opt_callback Callback function.
3160 chrome
.input
.ime
.deleteSurroundingText = function(parameters
, opt_callback
) {};
3164 * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
3165 * parameters An object with 'engineID' (string) and 'properties'
3167 * @param {function(boolean): void=} opt_callback Callback function.
3169 chrome
.input
.ime
.setCandidateWindowProperties
=
3170 function(parameters
, opt_callback
) {};
3174 * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
3175 * parameters An object with 'contextID' (number) and 'candidates'
3176 * (array of object) keys.
3177 * @param {function(boolean): void=} opt_callback Callback function.
3179 chrome
.input
.ime
.setCandidates = function(parameters
, opt_callback
) {};
3183 * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
3184 * parameters An object with 'contextID' (number), 'text' (string),
3185 * 'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
3186 * and 'segments' (array of object) keys.
3187 * @param {function(boolean): void=} opt_callback Callback function.
3189 chrome
.input
.ime
.setComposition = function(parameters
, opt_callback
) {};
3193 * @param {!Object.<string,number>} parameters An object with
3194 * 'contextID' (number) and 'candidateID' (number) keys.
3195 * @param {function(boolean): void=} opt_callback Callback function.
3197 chrome
.input
.ime
.setCursorPosition = function(parameters
, opt_callback
) {};
3201 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3202 * parameters An object with 'engineID' (string) and 'items'
3203 * (array of object) keys.
3204 * @param {function(): void=} opt_callback Callback function.
3206 chrome
.input
.ime
.setMenuItems = function(parameters
, opt_callback
) {};
3210 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3211 * parameters An object with 'engineID' (string) and 'items'
3212 * (array of object) keys.
3213 * @param {function(): void=} opt_callback Callback function.
3215 chrome
.input
.ime
.updateMenuItems = function(parameters
, opt_callback
) {};
3219 * @param {string} requestId Request id of the event that was handled. This
3220 * should come from keyEvent.requestId.
3221 * @param {boolean} response True if the keystroke was handled, false if not.
3223 chrome
.input
.ime
.keyEventHandled = function(requestId
, response
) {};
3226 /** @type {!ChromeEvent} */
3227 chrome
.input
.ime
.onActivate
;
3230 /** @type {!ChromeEvent} */
3231 chrome
.input
.ime
.onBlur
;
3234 /** @type {!ChromeEvent} */
3235 chrome
.input
.ime
.onCandidateClicked
;
3238 /** @type {!ChromeEvent} */
3239 chrome
.input
.ime
.onDeactivated
;
3242 /** @type {!ChromeEvent} */
3243 chrome
.input
.ime
.onFocus
;
3246 /** @type {!ChromeEvent} */
3247 chrome
.input
.ime
.onInputContextUpdate
;
3250 /** @type {!ChromeInputImeOnKeyEventEvent} */
3251 chrome
.input
.ime
.onKeyEvent
;
3254 /** @type {!ChromeEvent} */
3255 chrome
.input
.ime
.onMenuItemActivated
;
3258 /** @type {!ChromeEvent} */
3259 chrome
.input
.ime
.onReset
;
3262 /** @type {!ChromeEvent} */
3263 chrome
.input
.ime
.onSurroundingTextChanged
;
3268 * @see http://developer.chrome.com/apps/mediaGalleries
3271 chrome
.mediaGalleries
= {};
3275 * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
3276 * detailsOrCallback A details object for whether the request should be
3277 * interactive if permissions haven't been granted yet or the callback.
3278 * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
3279 * no details were supplied as arg1.
3281 chrome
.mediaGalleries
.getMediaFileSystems = function(
3282 detailsOrCallback
, opt_callback
) {};
3286 * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
3288 chrome
.mediaGalleries
.addUserSelectedFolder = function(callback
) {};
3290 chrome
.mediaGalleries
.startMediaScan = function() {};
3292 chrome
.mediaGalleries
.cancelMediaScan = function() {};
3296 * @param {function(!Array.<!FileSystem>)} callback Callback function.
3298 chrome
.mediaGalleries
.addScanResults = function(callback
) {};
3304 * galleryId: string,
3305 * deviceId: (string|undefined),
3306 * isRemovable: boolean,
3307 * isMediaDevice: boolean,
3308 * isAvailable: boolean
3311 chrome
.mediaGalleries
.MediaFileSystemMetadata
;
3315 * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
3316 * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
3318 chrome
.mediaGalleries
.getMediaFileSystemMetadata = function(mediaFileSystem
) {};
3322 * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
3323 * callback Callback function.
3325 chrome
.mediaGalleries
.getAllMediaFileSystemMetadata = function(callback
) {};
3331 * height: (number|undefined),
3332 * width: (number|undefined),
3333 * duration: (number|undefined),
3334 * rotation: (number|undefined),
3335 * album: (string|undefined),
3336 * artist: (string|undefined),
3337 * comment: (string|undefined),
3338 * copyright: (string|undefined),
3339 * disc: (number|undefined),
3340 * genre: (string|undefined),
3341 * language: (string|undefined),
3342 * title: (string|undefined),
3343 * track: (number|undefined)
3346 chrome
.mediaGalleries
.MetaData
;
3350 * @param {!Blob} mediaFile The media file for which to get metadata.
3351 * @param {{metadataType: (string|undefined)}|
3352 * function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
3353 * for the metadata to retrieve or the callback to invoke with the metadata.
3354 * The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
3355 * 'all' if the metadataType is omitted.
3356 * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
3357 * were passed as arg2, the callback to invoke with the metadata.
3359 chrome
.mediaGalleries
.getMetadata = function(
3360 mediaFile
, optionsOrCallback
, opt_callback
) {};
3366 * galleryCount: (number|undefined),
3367 * audioCount: (number|undefined),
3368 * imageCount: (number|undefined),
3369 * videoCount: (number|undefined)
3372 chrome
.mediaGalleries
.OnScanProgressDetails
;
3377 * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
3381 chrome
.mediaGalleries
.ScanProgressEvent = function() {};
3384 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3385 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.addListener
=
3386 function(callback
) {};
3389 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3390 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.removeListener
=
3391 function(callback
) {};
3395 * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
3398 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListener
=
3399 function(callback
) {};
3402 /** @return {boolean} */
3403 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListeners = function() {};
3406 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
3407 chrome
.mediaGalleries
.onScanProgress
;
3412 * @see https://developer.chrome.com/extensions/pageCapture.html
3414 chrome
.pageCapture
= {};
3418 * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
3419 * @param {function(Blob=): void} callback Callback function.
3421 chrome
.pageCapture
.saveAsMHTML = function(details
, callback
) {};
3426 * @see https://developer.chrome.com/extensions/permissions.html
3428 chrome
.permissions
= {};
3433 * permissions: (Array.<string>|undefined),
3434 * origins: (Array.<string>|undefined)
3436 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
3438 chrome
.permissions
.Permissions
;
3442 * @param {!chrome.permissions.Permissions} permissions
3443 * @param {function(boolean): void} callback Callback function.
3445 chrome
.permissions
.contains = function(permissions
, callback
) {};
3449 * @param {function(!chrome.permissions.Permissions): void} callback
3450 * Callback function.
3452 chrome
.permissions
.getAll = function(callback
) {};
3456 * @param {!chrome.permissions.Permissions} permissions
3457 * @param {function(boolean): void=} opt_callback Callback function.
3459 chrome
.permissions
.remove = function(permissions
, opt_callback
) {};
3463 * @param {!chrome.permissions.Permissions} permissions
3464 * @param {function(boolean): void=} opt_callback Callback function.
3466 chrome
.permissions
.request = function(permissions
, opt_callback
) {};
3469 /** @type {!ChromeEvent} */
3470 chrome
.permissions
.onAdded
;
3473 /** @type {!ChromeEvent} */
3474 chrome
.permissions
.onRemoved
;
3478 * @see http://developer.chrome.com/dev/extensions/power.html
3484 * @param {string} level A string describing the degree to which power
3485 * management should be disabled, should be either "system" or "display".
3487 chrome
.power
.requestKeepAwake = function(level
) {};
3491 * Releases a request previously made via requestKeepAwake().
3493 chrome
.power
.releaseKeepAwake = function() {};
3498 * @see https://developer.chrome.com/extensions/privacy.html
3500 chrome
.privacy
= {};
3503 /** @type {!Object.<string,!ChromeSetting>} */
3504 chrome
.privacy
.network
;
3507 /** @type {!Object.<string,!ChromeSetting>} */
3508 chrome
.privacy
.services
;
3511 /** @type {!Object.<string,!ChromeSetting>} */
3512 chrome
.privacy
.websites
;
3517 * @see https://developer.chrome.com/extensions/proxy.html
3522 /** @type {!Object.<string,!ChromeSetting>} */
3523 chrome
.proxy
.settings
;
3526 /** @type {!ChromeEvent} */
3527 chrome
.proxy
.onProxyError
;
3532 * @see http://developer.chrome.com/apps/socket.html
3541 chrome
.socket
.CreateInfo = function() {};
3544 /** @type {number} */
3545 chrome
.socket
.CreateInfo
.prototype.socketId
;
3552 chrome
.socket
.ReadInfo = function() {};
3555 /** @type {number} */
3556 chrome
.socket
.ReadInfo
.prototype.resultCode
;
3559 /** @type {!ArrayBuffer} */
3560 chrome
.socket
.ReadInfo
.prototype.data
;
3567 chrome
.socket
.WriteInfo = function() {};
3570 /** @type {number} */
3571 chrome
.socket
.WriteInfo
.prototype.bytesWritten
;
3578 chrome
.socket
.RecvFromInfo = function() {};
3581 /** @type {number} */
3582 chrome
.socket
.RecvFromInfo
.prototype.resultCode
;
3585 /** @type {!ArrayBuffer} */
3586 chrome
.socket
.RecvFromInfo
.prototype.data
;
3589 /** @type {string} */
3590 chrome
.socket
.RecvFromInfo
.prototype.address
;
3593 /** @type {number} */
3594 chrome
.socket
.RecvFromInfo
.prototype.port
;
3601 chrome
.socket
.AcceptInfo = function() {};
3604 /** @type {number} */
3605 chrome
.socket
.AcceptInfo
.prototype.resultCode
;
3608 /** @type {(number|undefined)} */
3609 chrome
.socket
.AcceptInfo
.prototype.socketId
;
3616 chrome
.socket
.SocketInfo = function() {};
3619 /** @type {string} */
3620 chrome
.socket
.SocketInfo
.prototype.socketType
;
3623 /** @type {boolean} */
3624 chrome
.socket
.SocketInfo
.prototype.connected
;
3627 /** @type {(string|undefined)} */
3628 chrome
.socket
.SocketInfo
.prototype.peerAddress
;
3631 /** @type {(number|undefined)} */
3632 chrome
.socket
.SocketInfo
.prototype.peerPort
;
3635 /** @type {(string|undefined)} */
3636 chrome
.socket
.SocketInfo
.prototype.localAddress
;
3639 /** @type {(number|undefined)} */
3640 chrome
.socket
.SocketInfo
.prototype.localPort
;
3647 chrome
.socket
.NetworkAdapterInfo = function() {};
3650 /** @type {string} */
3651 chrome
.socket
.NetworkAdapterInfo
.prototype.name
;
3654 /** @type {string} */
3655 chrome
.socket
.NetworkAdapterInfo
.prototype.address
;
3659 * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
3660 * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
3661 * socket options or callback.
3662 * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
3663 * socket has been created.
3665 chrome
.socket
.create = function(type
, optionsOrCallback
, opt_callback
) {};
3669 * @param {number} socketId The id of the socket to destroy.
3671 chrome
.socket
.destroy = function(socketId
) {};
3675 * @param {number} socketId The id of the socket.
3676 * @param {string} hostname The hostname or IP address of the remote machine.
3677 * @param {number} port The port of the remote machine.
3678 * @param {function(number)} callback Called when the connection attempt is
3681 chrome
.socket
.connect = function(socketId
, hostname
, port
, callback
) {};
3685 * @param {number} socketId The id of the socket.
3686 * @param {string} address The address of the local machine.
3687 * @param {number} port The port of the local machine.
3688 * @param {function(number)} callback Called when the bind attempt is complete.
3690 chrome
.socket
.bind = function(socketId
, address
, port
, callback
) {};
3694 * @param {number} socketId The id of the socket to disconnect.
3696 chrome
.socket
.disconnect = function(socketId
) {};
3700 * @param {number} socketId The id of the socket to read from.
3701 * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
3702 * read buffer size or the callback.
3703 * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
3704 * that was available to be read without blocking.
3706 chrome
.socket
.read = function(socketId
, bufferSizeOrCallback
, opt_callback
) {};
3710 * @param {number} socketId The id of the socket to write to.
3711 * @param {!ArrayBuffer} data The data to write.
3712 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
3713 * operation completes without blocking or an error occurs.
3715 chrome
.socket
.write = function(socketId
, data
, callback
) {};
3719 * @param {number} socketId The id of the socket to read from.
3720 * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
3721 * The read buffer size or the callback.
3722 * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
3723 * that was available to be read without blocking.
3725 chrome
.socket
.recvFrom = function(socketId
, bufferSizeOrCallback
,
3730 * @param {number} socketId The id of the socket to write to.
3731 * @param {!ArrayBuffer} data The data to write.
3732 * @param {string} address The address of the remote machine.
3733 * @param {number} port The port of the remote machine.
3734 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
3735 * operation completes without blocking or an error occurs.
3737 chrome
.socket
.sendTo = function(socketId
, data
, address
, port
, callback
) {};
3741 * @param {number} socketId The id of the socket to listen on.
3742 * @param {string} address The address of the local machine to listen on. Use
3743 * '0' to listen on all addresses.
3744 * @param {number} port The port of the local machine.
3745 * @param {(number|function(number))} backlogOrCallback The length of the
3746 * socket's listen queue or the callback.
3747 * @param {function(number)=} opt_callback Called when the listen operation
3750 chrome
.socket
.listen
=
3751 function(socketId
, address
, port
, backlogOrCallback
, opt_callback
) {};
3755 * @param {number} socketId The id of the socket to accept a connection on.
3756 * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
3757 * socket is accepted.
3759 chrome
.socket
.accept = function(socketId
, callback
) {};
3763 * @param {number} socketId The id of the socket to listen on.
3764 * @param {boolean} enable If true, enable keep-alive functionality.
3765 * @param {(number|function(boolean))} delayOrCallback The delay in seconds
3766 * between the last packet received and the first keepalive probe (default
3767 * is 0) or the callback
3768 * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
3771 chrome
.socket
.setKeepAlive = function(socketId
, enable
, delayOrCallback
,
3776 * @param {number} socketId The id of the socket to listen on.
3777 * @param {boolean} noDelay If true, disables Nagle's algorithm.
3778 * @param {function(boolean)} callback Called when the setNoDelay attempt is
3781 chrome
.socket
.setNoDelay = function(socketId
, noDelay
, callback
) {};
3785 * @param {number} socketId The id of the socket.
3786 * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
3789 chrome
.socket
.getInfo = function(socketId
, callback
) {};
3793 * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
3794 * when local adapter information is available.
3796 chrome
.socket
.getNetworkList = function(callback
) {};
3800 * @param {number} socketId The id of the socket.
3801 * @param {string} address The group address to join. Domain names are not
3803 * @param {function(number)} callback Called when the join operation is done.
3805 chrome
.socket
.joinGroup = function(socketId
, address
, callback
) {};
3809 * @param {number} socketId The id of the socket.
3810 * @param {string} address The group address to leave. Domain names are not
3812 * @param {function(number)} callback Called when the leave operation is done.
3814 chrome
.socket
.leaveGroup = function(socketId
, address
, callback
) {};
3818 * @param {number} socketId The id of the socket.
3819 * @param {number} ttl The time-to-live value.
3820 * @param {function(number)} callback Called when the configuration operation is
3823 chrome
.socket
.setMulticastTimeToLive = function(socketId
, ttl
, callback
) {};
3827 * @param {number} socketId The id of the socket.
3828 * @param {boolean} enabled True to enable loopback mode.
3829 * @param {function(number)} callback Called when the configuration operation is
3832 chrome
.socket
.setMulticastLoopbackMode = function(socketId
, enabled
,
3837 * @param {number} socketId The id of the socket.
3838 * @param {function(!Array.<string>)} callback Called with an array of string
3841 chrome
.socket
.getJoinedGroups = function(socketId
, callback
) {};
3846 * @see https://developer.chrome.com/extensions/storage.html
3848 chrome
.storage
= {};
3851 /** @type {!StorageArea} */
3852 chrome
.storage
.sync
;
3855 /** @type {!StorageArea} */
3856 chrome
.storage
.local
;
3859 /** @type {!StorageChangeEvent} */
3860 chrome
.storage
.onChanged
;
3869 * @see http://developer.chrome.com/apps/system_display.html
3871 chrome
.system
.display
= {};
3874 /** @type {!ChromeEvent} */
3875 chrome
.system
.display
.onDisplayChanged
;
3881 chrome
.system
.display
.Bounds = function() {};
3884 /** @type {number} */
3885 chrome
.system
.display
.Bounds
.prototype.left
;
3888 /** @type {number} */
3889 chrome
.system
.display
.Bounds
.prototype.top
;
3892 /** @type {number} */
3893 chrome
.system
.display
.Bounds
.prototype.width
;
3896 /** @type {number} */
3897 chrome
.system
.display
.Bounds
.prototype.height
;
3902 * left: (number|undefined),
3903 * top: (number|undefined),
3904 * right: (number|undefined),
3905 * bottom: (number|undefined)
3908 chrome
.system
.display
.Insets
;
3914 chrome
.system
.display
.DisplayInfo = function() {};
3917 /** @type {string} */
3918 chrome
.system
.display
.DisplayInfo
.prototype.id
;
3921 /** @type {string} */
3922 chrome
.system
.display
.DisplayInfo
.prototype.name
;
3925 /** @type {string} */
3926 chrome
.system
.display
.DisplayInfo
.prototype.mirroringSourceId
;
3929 /** @type {boolean} */
3930 chrome
.system
.display
.DisplayInfo
.prototype.isPrimary
;
3933 /** @type {boolean} */
3934 chrome
.system
.display
.DisplayInfo
.prototype.isInternal
;
3937 /** @type {boolean} */
3938 chrome
.system
.display
.DisplayInfo
.prototype.isEnabled
;
3941 /** @type {number} */
3942 chrome
.system
.display
.DisplayInfo
.prototype.dpiX
;
3945 /** @type {number} */
3946 chrome
.system
.display
.DisplayInfo
.prototype.dpiY
;
3949 /** @type {number} */
3950 chrome
.system
.display
.DisplayInfo
.prototype.rotation
;
3953 /** @type {!chrome.system.display.Bounds} */
3954 chrome
.system
.display
.DisplayInfo
.prototype.bounds
;
3957 /** @type {!chrome.system.display.Insets} */
3958 chrome
.system
.display
.DisplayInfo
.prototype.overscan
;
3961 /** @type {!chrome.system.display.Bounds} */
3962 chrome
.system
.display
.DisplayInfo
.prototype.workArea
;
3967 * mirroringSourceId: (string|undefined),
3968 * isPrimary: (boolean|undefined),
3969 * overscan: (!chrome.system.display.Insets|undefined),
3970 * rotation: (number|undefined),
3971 * boundsOriginX: (number|undefined),
3972 * boundsOriginY: (number|undefined)
3975 chrome
.system
.display
.SettableDisplayInfo
;
3983 * format: (string|undefined),
3984 * quality: (number|undefined)
3987 chrome
.types
.ImageDetails
;
3991 * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
3992 * callback Called with an array of objects representing display info.
3994 chrome
.system
.display
.getInfo = function(callback
) {};
3998 * @param {string} id The display's unique identifier.
3999 * @param {!chrome.system.display.SettableDisplayInfo} info The information
4000 * about display properties that should be changed.
4001 * @param {function()=} opt_callback The callback to execute when the display
4002 * info has been changed.
4004 chrome
.system
.display
.setDisplayProperties
=
4005 function(id
, info
, opt_callback
) {};
4010 * @see https://developer.chrome.com/extensions/types.html
4012 chrome
.chromeSetting
= {};
4015 /** @type {!ChromeEvent} */
4016 chrome
.chromeSetting
.onChange
;
4021 * @see https://developer.chrome.com/extensions/webNavigation.html
4023 chrome
.webNavigation
= {};
4027 * @param {Object} details Object with a 'tabId' (number) key.
4028 * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
4029 * Callback function.
4031 chrome
.webNavigation
.getAllFrames = function(details
, callback
) {};
4035 * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
4037 * @param {function(Object.<string, (boolean|string)>)} callback
4038 * Callback function.
4040 chrome
.webNavigation
.getFrame = function(details
, callback
) {};
4043 /** @type {!ChromeEvent} */
4044 chrome
.webNavigation
.onBeforeNavigate
;
4047 /** @type {!ChromeEvent} */
4048 chrome
.webNavigation
.onCommitted
;
4051 /** @type {!ChromeEvent} */
4052 chrome
.webNavigation
.onDOMContentLoaded
;
4055 /** @type {!ChromeEvent} */
4056 chrome
.webNavigation
.onCompleted
;
4059 /** @type {!ChromeEvent} */
4060 chrome
.webNavigation
.onErrorOccurred
;
4063 /** @type {!ChromeEvent} */
4064 chrome
.webNavigation
.onCreatedNavigationTarget
;
4067 /** @type {!ChromeEvent} */
4068 chrome
.webNavigation
.onReferenceFragmentUpdated
;
4071 /** @type {!ChromeEvent} */
4072 chrome
.webNavigation
.onTabReplaced
;
4075 /** @type {!ChromeEvent} */
4076 chrome
.webNavigation
.onHistoryStateUpdated
;
4081 * Most event listeners for WebRequest take extra arguments.
4082 * @see https://developer.chrome.com/extensions/webRequest.html.
4085 function WebRequestEvent() {}
4089 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4091 * @param {!RequestFilter} filter A set of filters that restrict
4092 * the events that will be sent to this listener.
4093 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
4094 * that should be passed to the listener function.
4096 WebRequestEvent
.prototype.addListener
=
4097 function(listener
, filter
, opt_extraInfoSpec
) {};
4101 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4104 WebRequestEvent
.prototype.removeListener = function(listener
) {};
4108 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4111 WebRequestEvent
.prototype.hasListener = function(listener
) {};
4115 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4118 WebRequestEvent
.prototype.hasListeners = function(listener
) {};
4123 * The onErrorOccurred event takes one less parameter than the others.
4124 * @see https://developer.chrome.com/extensions/webRequest.html.
4127 function WebRequestOnErrorOccurredEvent() {}
4131 * @param {function(!Object): void} listener Listener function.
4132 * @param {!RequestFilter} filter A set of filters that restrict
4133 * the events that will be sent to this listener.
4135 WebRequestOnErrorOccurredEvent
.prototype.addListener
=
4136 function(listener
, filter
) {};
4140 * @param {function(!Object): void} listener Listener function.
4142 WebRequestOnErrorOccurredEvent
.prototype.removeListener = function(listener
) {};
4146 * @param {function(!Object): void} listener Listener function.
4148 WebRequestOnErrorOccurredEvent
.prototype.hasListener = function(listener
) {};
4152 * @param {function(!Object): void} listener Listener function.
4154 WebRequestOnErrorOccurredEvent
.prototype.hasListeners = function(listener
) {};
4159 * @see https://developer.chrome.com/extensions/webRequest.html
4161 chrome
.webRequest
= {};
4165 * @param {function(): void=} opt_callback Callback function.
4167 chrome
.webRequest
.handlerBehaviorChanged = function(opt_callback
) {};
4170 /** @type {!WebRequestEvent} */
4171 chrome
.webRequest
.onAuthRequired
;
4174 /** @type {!WebRequestEvent} */
4175 chrome
.webRequest
.onBeforeRedirect
;
4178 /** @type {!WebRequestEvent} */
4179 chrome
.webRequest
.onBeforeRequest
;
4182 /** @type {!WebRequestEvent} */
4183 chrome
.webRequest
.onBeforeSendHeaders
;
4186 /** @type {!WebRequestEvent} */
4187 chrome
.webRequest
.onCompleted
;
4190 /** @type {!WebRequestOnErrorOccurredEvent} */
4191 chrome
.webRequest
.onErrorOccurred
;
4194 /** @type {!WebRequestEvent} */
4195 chrome
.webRequest
.onHeadersReceived
;
4198 /** @type {!WebRequestEvent} */
4199 chrome
.webRequest
.onResponseStarted
;
4202 /** @type {!WebRequestEvent} */
4203 chrome
.webRequest
.onSendHeaders
;
4211 * @see https://developer.chrome.com/extensions/management.html
4214 function ExtensionInfo() {}
4217 /** @type {string} */
4218 ExtensionInfo
.prototype.id
;
4221 /** @type {string} */
4222 ExtensionInfo
.prototype.name
;
4225 /** @type {string} */
4226 ExtensionInfo
.prototype.description
;
4229 /** @type {string} */
4230 ExtensionInfo
.prototype.version
;
4233 /** @type {boolean} */
4234 ExtensionInfo
.prototype.mayDisable
;
4237 /** @type {boolean} */
4238 ExtensionInfo
.prototype.enabled
;
4241 /** @type {string|undefined} */
4242 ExtensionInfo
.prototype.disabledReason
;
4245 /** @type {boolean} */
4246 ExtensionInfo
.prototype.isApp
;
4249 /** @type {string|undefined} */
4250 ExtensionInfo
.prototype.appLaunchUrl
;
4253 /** @type {string|undefined} */
4254 ExtensionInfo
.prototype.homepageUrl
;
4257 /** @type {string|undefined} */
4258 ExtensionInfo
.prototype.updateUrl
;
4261 /** @type {boolean} */
4262 ExtensionInfo
.prototype.offlineEnabled
;
4265 /** @type {string} */
4266 ExtensionInfo
.prototype.optionsUrl
;
4269 /** @type {!Array.<!IconInfo>|undefined} */
4270 ExtensionInfo
.prototype.icons
;
4273 /** @type {!Array.<string>} */
4274 ExtensionInfo
.prototype.permissions
;
4277 /** @type {!Array.<string>} */
4278 ExtensionInfo
.prototype.hostPermissions
;
4281 /** @type {string} */
4282 ExtensionInfo
.prototype.installType
;
4285 /** @type {string|undefined} */
4286 ExtensionInfo
.prototype.launchType
;
4289 /** @type {!Array.<string>|undefined} */
4290 ExtensionInfo
.prototype.availableLaunchTypes
;
4295 * @see https://developer.chrome.com/extensions/management.html
4298 function IconInfo() {}
4301 /** @type {number} */
4302 IconInfo
.prototype.size
;
4305 /** @type {string} */
4306 IconInfo
.prototype.url
;
4311 * @see https://developer.chrome.com/extensions/tabs
4316 // TODO: Make this field optional once dependent projects have been updated.
4323 /** @type {number} */
4324 Tab
.prototype.index
;
4327 /** @type {number} */
4328 Tab
.prototype.windowId
;
4331 // TODO: Make this field optional once dependent projects have been updated.
4335 Tab
.prototype.openerTabId
;
4338 /** @type {boolean} */
4339 Tab
.prototype.highlighted
;
4342 /** @type {boolean} */
4343 Tab
.prototype.active
;
4346 /** @type {boolean} */
4347 Tab
.prototype.pinned
;
4350 // TODO: Make this field optional once dependent projects have been updated.
4357 // TODO: Make this field optional once dependent projects have been updated.
4361 Tab
.prototype.title
;
4364 // TODO: Make this field optional once dependent projects have been updated.
4368 Tab
.prototype.favIconUrl
;
4371 // TODO: Make this field optional once dependent projects have been updated.
4375 Tab
.prototype.status
;
4378 /** @type {boolean} */
4379 Tab
.prototype.incognito
;
4382 /** @type {number|undefined} */
4383 Tab
.prototype.width
;
4386 /** @type {number|undefined} */
4387 Tab
.prototype.height
;
4390 /** @type {number|undefined} */
4391 Tab
.prototype.sessionId
;
4395 * @see https://developer.chrome.com/extensions/windows.html
4398 function ChromeWindow() {}
4401 /** @type {number} */
4402 ChromeWindow
.prototype.id
;
4405 /** @type {boolean} */
4406 ChromeWindow
.prototype.focused
;
4409 /** @type {number} */
4410 ChromeWindow
.prototype.top
;
4413 /** @type {number} */
4414 ChromeWindow
.prototype.left
;
4417 /** @type {number} */
4418 ChromeWindow
.prototype.width
;
4421 /** @type {number} */
4422 ChromeWindow
.prototype.height
;
4425 /** @type {Array.<Tab>} */
4426 ChromeWindow
.prototype.tabs
;
4429 /** @type {boolean} */
4430 ChromeWindow
.prototype.incognito
;
4433 /** @type {string} */
4434 ChromeWindow
.prototype.type
;
4437 /** @type {string} */
4438 ChromeWindow
.prototype.state
;
4441 /** @type {boolean} */
4442 ChromeWindow
.prototype.alwaysOnTop
;
4447 * @see https://developer.chrome.com/extensions/events.html
4450 function ChromeEvent() {}
4453 /** @param {!Function} callback */
4454 ChromeEvent
.prototype.addListener = function(callback
) {};
4457 /** @param {!Function} callback */
4458 ChromeEvent
.prototype.removeListener = function(callback
) {};
4462 * @param {!Function} callback
4465 ChromeEvent
.prototype.hasListener = function(callback
) {};
4468 /** @return {boolean} */
4469 ChromeEvent
.prototype.hasListeners = function() {};
4473 * Event whose listeners take a string parameter.
4476 function ChromeStringEvent() {}
4479 /** @param {function(string): void} callback */
4480 ChromeStringEvent
.prototype.addListener = function(callback
) {};
4483 /** @param {function(string): void} callback */
4484 ChromeStringEvent
.prototype.removeListener = function(callback
) {};
4488 * @param {function(string): void} callback
4491 ChromeStringEvent
.prototype.hasListener = function(callback
) {};
4494 /** @return {boolean} */
4495 ChromeStringEvent
.prototype.hasListeners = function() {};
4500 * Event whose listeners take a boolean parameter.
4504 function ChromeBooleanEvent() {}
4508 * @param {function(boolean): void} callback
4510 ChromeBooleanEvent
.prototype.addListener = function(callback
) {};
4514 * @param {function(boolean): void} callback
4516 ChromeBooleanEvent
.prototype.removeListener = function(callback
) {};
4520 * @param {function(boolean): void} callback
4523 ChromeBooleanEvent
.prototype.hasListener = function(callback
) {};
4529 ChromeBooleanEvent
.prototype.hasListeners = function() {};
4534 * Event whose listeners take a number parameter.
4538 function ChromeNumberEvent() {}
4542 * @param {function(number): void} callback
4544 ChromeNumberEvent
.prototype.addListener = function(callback
) {};
4548 * @param {function(number): void} callback
4550 ChromeNumberEvent
.prototype.removeListener = function(callback
) {};
4554 * @param {function(number): void} callback
4557 ChromeNumberEvent
.prototype.hasListener = function(callback
) {};
4563 ChromeNumberEvent
.prototype.hasListeners = function() {};
4568 * Event whose listeners take an Object parameter.
4571 function ChromeObjectEvent() {}
4575 * @param {function(!Object): void} callback Callback.
4577 ChromeObjectEvent
.prototype.addListener = function(callback
) {};
4581 * @param {function(!Object): void} callback Callback.
4583 ChromeObjectEvent
.prototype.removeListener = function(callback
) {};
4587 * @param {function(!Object): void} callback Callback.
4590 ChromeObjectEvent
.prototype.hasListener = function(callback
) {};
4596 ChromeObjectEvent
.prototype.hasListeners = function() {};
4601 * Event whose listeners take an ExtensionInfo parameter.
4604 function ChromeExtensionInfoEvent() {}
4607 /** @param {function(!ExtensionInfo): void} callback */
4608 ChromeExtensionInfoEvent
.prototype.addListener = function(callback
) {};
4611 /** @param {function(!ExtensionInfo): void} callback */
4612 ChromeExtensionInfoEvent
.prototype.removeListener = function(callback
) {};
4616 * @param {function(!ExtensionInfo): void} callback
4619 ChromeExtensionInfoEvent
.prototype.hasListener = function(callback
) {};
4622 /** @return {boolean} */
4623 ChromeExtensionInfoEvent
.prototype.hasListeners = function() {};
4627 * Event whose listeners take a string array parameter.
4630 function ChromeStringArrayEvent() {}
4633 /** @param {function(!Array.<string>): void} callback */
4634 ChromeStringArrayEvent
.prototype.addListener = function(callback
) {};
4637 /** @param {function(!Array.<string>): void} callback */
4638 ChromeStringArrayEvent
.prototype.removeListener = function(callback
) {};
4642 * @param {function(!Array.<string>): void} callback
4645 ChromeStringArrayEvent
.prototype.hasListener = function(callback
) {};
4648 /** @return {boolean} */
4649 ChromeStringArrayEvent
.prototype.hasListeners = function() {};
4654 * Event whose listeners take two strings as parameters.
4657 function ChromeStringStringEvent() {}
4660 /** @param {function(string, string): void} callback */
4661 ChromeStringStringEvent
.prototype.addListener = function(callback
) {};
4664 /** @param {function(string, string): void} callback */
4665 ChromeStringStringEvent
.prototype.removeListener = function(callback
) {};
4669 * @param {function(string, string): void} callback
4672 ChromeStringStringEvent
.prototype.hasListener = function(callback
) {};
4675 /** @return {boolean} */
4676 ChromeStringStringEvent
.prototype.hasListeners = function() {};
4680 * @see http://developer.chrome.com/extensions/pushMessaging.html
4683 chrome
.pushMessaging
= {};
4687 * @type {!chrome.pushMessaging.PushMessageEvent}
4689 chrome
.pushMessaging
.onMessage
;
4693 * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
4694 * interactiveOrCallback Either a flag(optional), if set to true, user will
4695 * be asked to log in if they are not already logged in, or, when he flag is
4696 * not given, the callback.
4697 * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
4700 chrome
.pushMessaging
.getChannelId
=
4701 function(interactiveOrCallback
, opt_callback
) {};
4706 * Event whose listeners take a chrome.pushMessaging.Message parameter.
4709 chrome
.pushMessaging
.PushMessageEvent = function() {};
4713 * @param {function(!chrome.pushMessaging.Message): void} callback
4715 chrome
.pushMessaging
.PushMessageEvent
.prototype.addListener
=
4716 function(callback
) {};
4720 * @param {function(!chrome.pushMessaging.Message): void} callback
4722 chrome
.pushMessaging
.PushMessageEvent
.prototype.removeListener
=
4723 function(callback
) {};
4727 * @param {function(!chrome.pushMessaging.Message): void} callback
4730 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListener
=
4731 function(callback
) {};
4737 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListeners = function() {};
4742 * @see http://developer.chrome.com/apps/runtime.html#type-Port
4748 /** @type {string} */
4749 Port
.prototype.name
;
4752 /** @type {!ChromeEvent} */
4753 Port
.prototype.onDisconnect
;
4756 /** @type {!ChromeEvent} */
4757 Port
.prototype.onMessage
;
4760 /** @type {MessageSender} */
4761 Port
.prototype.sender
;
4765 * @param {Object.<string>} obj Message object.
4767 Port
.prototype.postMessage = function(obj
) {};
4771 * Note: as of 2012-04-12, this function is no longer documented on
4772 * the public web pages, but there are still existing usages.
4774 Port
.prototype.disconnect = function() {};
4779 * @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
4782 function MessageSender() {}
4785 /** @type {!Tab|undefined} */
4786 MessageSender
.prototype.tab
;
4789 /** @type {string|undefined} */
4790 MessageSender
.prototype.id
;
4793 /** @type {string|undefined} */
4794 MessageSender
.prototype.url
;
4797 /** @type {string|undefined} */
4798 MessageSender
.prototype.tlsChannelId
;
4803 * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
4806 function BookmarkTreeNode() {}
4809 /** @type {string} */
4810 BookmarkTreeNode
.prototype.id
;
4813 /** @type {string|undefined} */
4814 BookmarkTreeNode
.prototype.parentId
;
4817 /** @type {number|undefined} */
4818 BookmarkTreeNode
.prototype.index
;
4821 /** @type {string|undefined} */
4822 BookmarkTreeNode
.prototype.url
;
4825 /** @type {string} */
4826 BookmarkTreeNode
.prototype.title
;
4829 /** @type {number|undefined} */
4830 BookmarkTreeNode
.prototype.dateAdded
;
4833 /** @type {number|undefined} */
4834 BookmarkTreeNode
.prototype.dateGroupModified
;
4837 /** @type {string|undefined} */
4838 BookmarkTreeNode
.prototype.unmodifiable
;
4841 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
4842 BookmarkTreeNode
.prototype.children
;
4847 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
4850 function Cookie() {}
4853 /** @type {string} */
4854 Cookie
.prototype.name
;
4857 /** @type {string} */
4858 Cookie
.prototype.value
;
4861 /** @type {string} */
4862 Cookie
.prototype.domain
;
4865 /** @type {boolean} */
4866 Cookie
.prototype.hostOnly
;
4869 /** @type {string} */
4870 Cookie
.prototype.path
;
4873 /** @type {boolean} */
4874 Cookie
.prototype.secure
;
4877 /** @type {boolean} */
4878 Cookie
.prototype.httpOnly
;
4881 /** @type {boolean} */
4882 Cookie
.prototype.session
;
4885 /** @type {number} */
4886 Cookie
.prototype.expirationDate
;
4889 /** @type {string} */
4890 Cookie
.prototype.storeId
;
4895 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
4898 function CookieStore() {}
4901 /** @type {string} */
4902 CookieStore
.prototype.id
;
4905 /** @type {Array.<number>} */
4906 CookieStore
.prototype.tabIds
;
4911 * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
4914 function OnClickData() {}
4917 /** @type {number} */
4918 OnClickData
.prototype.menuItemId
;
4921 /** @type {number} */
4922 OnClickData
.prototype.parentMenuItemId
;
4925 /** @type {string} */
4926 OnClickData
.prototype.mediaType
;
4929 /** @type {string} */
4930 OnClickData
.prototype.linkUrl
;
4933 /** @type {string} */
4934 OnClickData
.prototype.srcUrl
;
4937 /** @type {string} */
4938 OnClickData
.prototype.pageUrl
;
4941 /** @type {string} */
4942 OnClickData
.prototype.frameUrl
;
4945 /** @type {string} */
4946 OnClickData
.prototype.selectionText
;
4949 /** @type {string} */
4950 OnClickData
.prototype.editable
;
4955 * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
4958 function Debuggee() {}
4961 /** @type {number} */
4962 Debuggee
.prototype.tabId
;
4967 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
4970 function ResourceIdentifier() {}
4973 /** @type {string} */
4974 ResourceIdentifier
.prototype.id
;
4977 /** @type {string} */
4978 ResourceIdentifier
.prototype.description
;
4983 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
4986 function ContentSetting() {}
4990 * @param {!Object.<string,string>} details Settings details.
4991 * @param {function(): void=} opt_callback Callback function.
4993 ContentSetting
.prototype.clear = function(details
, opt_callback
) {};
4997 * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
4999 * @param {function(): void} callback Callback function.
5001 ContentSetting
.prototype.get = function(details
, callback
) {};
5005 * @param {function(): void} callback Callback function.
5007 ContentSetting
.prototype.getResourceIdentifiers = function(callback
) {};
5011 * @param {!Object.<string,(string|ResourceIdentifier)>} details
5013 * @param {function(): void=} opt_callback Callback function.
5015 ContentSetting
.prototype.set = function(details
, opt_callback
) {};
5020 * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
5023 function HistoryItem() {}
5026 /** @type {string} */
5027 HistoryItem
.prototype.id
;
5030 /** @type {string} */
5031 HistoryItem
.prototype.url
;
5034 /** @type {string} */
5035 HistoryItem
.prototype.title
;
5038 /** @type {number} */
5039 HistoryItem
.prototype.lastVisitTime
;
5042 /** @type {number} */
5043 HistoryItem
.prototype.visitCount
;
5046 /** @type {number} */
5047 HistoryItem
.prototype.typedCount
;
5052 * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
5055 function VisitItem() {}
5058 /** @type {string} */
5059 VisitItem
.prototype.id
;
5062 /** @type {string} */
5063 VisitItem
.prototype.visitId
;
5066 /** @type {number} */
5067 VisitItem
.prototype.visitTime
;
5070 /** @type {string} */
5071 VisitItem
.prototype.referringVisitId
;
5074 /** @type {string} */
5075 VisitItem
.prototype.transition
;
5080 * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
5083 function FileHandlerExecuteEventDetails() {}
5086 /** @type {!Array.<!FileEntry>} */
5087 FileHandlerExecuteEventDetails
.prototype.entries
;
5090 /** @type {number} */
5091 FileHandlerExecuteEventDetails
.prototype.tab_id
;
5096 * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
5099 function ChromeKeyboardEvent() {}
5102 /** @type {string} */
5103 ChromeKeyboardEvent
.prototype.type
;
5106 /** @type {string} */
5107 ChromeKeyboardEvent
.prototype.requestId
;
5110 /** @type {string} */
5111 ChromeKeyboardEvent
.prototype.key
;
5114 /** @type {boolean} */
5115 ChromeKeyboardEvent
.prototype.altKey
;
5118 /** @type {boolean} */
5119 ChromeKeyboardEvent
.prototype.ctrlKey
;
5122 /** @type {boolean} */
5123 ChromeKeyboardEvent
.prototype.shiftKey
;
5128 * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
5131 function InputContext() {}
5134 /** @type {number} */
5135 InputContext
.prototype.contextID
;
5138 /** @type {string} */
5139 InputContext
.prototype.type
;
5144 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
5147 function ProxyServer() {}
5150 /** @type {string} */
5151 ProxyServer
.prototype.scheme
;
5154 /** @type {string} */
5155 ProxyServer
.prototype.host
;
5158 /** @type {number} */
5159 ProxyServer
.prototype.port
;
5164 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
5167 function ProxyRules() {}
5170 /** @type {ProxyServer} */
5171 ProxyRules
.prototype.singleProxy
;
5174 /** @type {ProxyServer} */
5175 ProxyRules
.prototype.proxyForHttp
;
5178 /** @type {ProxyServer} */
5179 ProxyRules
.prototype.proxyForHttps
;
5182 /** @type {ProxyServer} */
5183 ProxyRules
.prototype.proxyForFtp
;
5186 /** @type {ProxyServer} */
5187 ProxyRules
.prototype.fallbackProxy
;
5190 /** @type {!Array.<string>} */
5191 ProxyRules
.prototype.bypassList
;
5196 * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
5199 function PacScript() {}
5202 /** @type {string} */
5203 PacScript
.prototype.url
;
5206 /** @type {string} */
5207 PacScript
.prototype.data
;
5210 /** @type {boolean} */
5211 PacScript
.prototype.mandatory
;
5216 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
5219 function ProxyConfig() {}
5222 /** @type {ProxyRules} */
5223 ProxyConfig
.prototype.rules
;
5226 /** @type {PacScript} */
5227 ProxyConfig
.prototype.pacScript
;
5230 /** @type {string} */
5231 ProxyConfig
.prototype.mode
;
5236 * The event listener for Storage receives an Object mapping each
5237 * key that changed to its corresponding StorageChange for that item.
5239 * @see https://developer.chrome.com/extensions/storage.html
5242 function StorageChangeEvent() {}
5246 * @param {function(!Object.<string, !StorageChange>, string)} callback
5247 * Listener will receive an object that maps each key to its StorageChange,
5248 * and the namespace ("sync" or "local") of the storage area the changes
5251 StorageChangeEvent
.prototype.addListener = function(callback
) {};
5254 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5255 StorageChangeEvent
.prototype.removeListener = function(callback
) {};
5258 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5259 StorageChangeEvent
.prototype.hasListener = function(callback
) {};
5262 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5263 StorageChangeEvent
.prototype.hasListeners = function(callback
) {};
5268 * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
5271 function StorageChange() {}
5275 StorageChange
.prototype.oldValue
;
5279 StorageChange
.prototype.newValue
;
5284 * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
5287 function StorageArea() {}
5291 * Removes all items from storage.
5292 * @param {function(): void=} opt_callback Callback function.
5294 StorageArea
.prototype.clear = function(opt_callback
) {};
5298 * @param {(string|!Array.<string>|!Object|null)=} opt_keys
5299 * A single key to get, list of keys to get, or a dictionary
5300 * specifying default values (see description of the
5301 * object). An empty list or object will return an empty
5302 * result object. Pass in null to get the entire contents of storage.
5303 * @param {function(Object)=} opt_callback Callback with storage items, or null
5306 StorageArea
.prototype.get = function(opt_keys
, opt_callback
) {};
5310 * @param {(string|!Array.<string>)} keys
5311 * A single key or a list of keys for items to remove.
5312 * @param {function()=} opt_callback Callback.
5314 StorageArea
.prototype.remove = function(keys
, opt_callback
) {};
5318 * @param {!Object.<string>} keys
5319 * Object specifying items to augment storage
5320 * with. Values that cannot be serialized (functions, etc) will be ignored.
5321 * @param {function()=} opt_callback Callback.
5323 StorageArea
.prototype.set = function(keys
, opt_callback
) { };
5327 * @param {(string|!Array.<string>|null)=} opt_keys
5328 * A single key or list of keys to get the total usage for. An empty list
5329 * will return 0. Pass in null to get the total usage of all of storage.
5330 * @param {function(number)=} opt_callback
5331 * Callback with the amount of space being used by storage.
5333 StorageArea
.prototype.getBytesInUse = function(opt_keys
, opt_callback
) { };
5338 * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
5341 function ChromeSetting() {}
5345 * @param {Object} details Object with a 'scope' (string) key.
5346 * @param {function(): void=} opt_callback Callback function.
5348 ChromeSetting
.prototype.clear = function(details
, opt_callback
) {};
5352 * @param {Object} details Object with an 'incognito' (boolean) key.
5353 * @param {function(Object.<string, *>): void} callback Callback function.
5355 ChromeSetting
.prototype.get = function(details
, callback
) {};
5359 * @param {Object} details Object with a 'value' (*) key and an optional
5360 * 'scope' (string) key.
5361 * @param {function(): void=} opt_callback Callback function.
5363 ChromeSetting
.prototype.set = function(details
, opt_callback
) {};
5368 * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
5371 function RequestFilter() {}
5374 /** @type {!Array.<string>} */
5375 RequestFilter
.prototype.urls
;
5378 /** @type {!Array.<string>} */
5379 RequestFilter
.prototype.types
;
5382 /** @type {number} */
5383 RequestFilter
.prototype.tabId
;
5386 /** @type {number} */
5387 RequestFilter
.prototype.windowId
;
5392 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
5395 function HttpHeader() {}
5398 /** @type {string} */
5399 HttpHeader
.prototype.name
;
5402 /** @type {string} */
5403 HttpHeader
.prototype.value
;
5406 /** @type {!Array.<number>} */
5407 HttpHeader
.prototype.binaryValue
;
5411 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
5412 * @typedef {Array.<!HttpHeader>}
5420 * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
5423 function BlockingResponse() {}
5426 /** @type {boolean} */
5427 BlockingResponse
.prototype.cancel
;
5430 /** @type {string} */
5431 BlockingResponse
.prototype.redirectUrl
;
5434 /** @type {!HttpHeaders_} */
5435 BlockingResponse
.prototype.requestHeaders
;
5438 /** @type {!HttpHeaders_} */
5439 BlockingResponse
.prototype.responseHeaders
;
5442 /** @type {Object.<string,string>} */
5443 BlockingResponse
.prototype.authCredentials
;
5448 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
5451 chrome
.pushMessaging
.Message = function() {};
5457 chrome
.pushMessaging
.Message
.prototype.subchannelId
;
5463 chrome
.pushMessaging
.Message
.prototype.payload
;
5468 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
5471 chrome
.pushMessaging
.ChannelIdResult = function() {};
5477 chrome
.pushMessaging
.ChannelIdResult
.prototype.channelId
;
5481 * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
5482 * defined in {@code javascript/externs/fileapi.js}.
5484 * @see http://developer.chrome.com/apps/fileSystem.html
5486 chrome
.fileSystem
= {};
5490 * @param {!Entry} entry The entry to get the display path for. The entry can
5491 * originally be obtained through
5492 * {@code chrome.fileSystem.chooseEntry} or
5493 * {@code chrome.fileSystem.restoreEntry}.
5494 * @param {function(string)} callback A success callback.
5495 * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
5497 chrome
.fileSystem
.getDisplayPath = function(entry
, callback
) {};
5501 * @param {!Entry} entry The entry to get a writable entry for.
5502 * @param {function(!Entry)} callback A success callback.
5503 * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
5505 chrome
.fileSystem
.getWritableEntry = function(entry
, callback
) {};
5509 * @param {!Entry} entry The entry to query writability.
5510 * @param {function(boolean)} callback A success callback.
5511 * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
5513 chrome
.fileSystem
.isWritableEntry = function(entry
, callback
) {};
5518 * description: (string|undefined),
5519 * mimeTypes: (!Array.<string>|undefined),
5520 * extensions: (!Array.<string>|undefined)
5522 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5524 chrome
.fileSystem
.AcceptsOption
;
5529 * type: (string|undefined),
5530 * suggestedName: (string|undefined),
5531 * accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
5532 * acceptsAllTypes: (boolean|undefined),
5533 * acceptsMultiple: (boolean|undefined)
5535 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5537 chrome
.fileSystem
.ChooseEntryOptions
;
5541 * @param {!chrome.fileSystem.ChooseEntryOptions|
5542 * function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
5543 * options for the file prompt or the callback.
5544 * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
5545 * callback, if arg1 is options.
5546 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5548 chrome
.fileSystem
.chooseEntry = function(optionsOrCallback
, opt_callback
) {};
5552 * @param {string} id The ID of the file entry to restore.
5553 * @param {function(!Entry)} callback A success callback.
5554 * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
5556 chrome
.fileSystem
.restoreEntry = function(id
, callback
) {};
5560 * @param {string} id The ID of the file entry to query restorability.
5561 * @param {function(boolean)} callback A success callback.
5562 * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
5564 chrome
.fileSystem
.isRestorable = function(id
, callback
) {};
5568 * @param {!Entry} entry The entry to regain access to.
5569 * @return {string} The ID that can be passed to restoreEntry to regain access
5570 * to the given file entry.
5571 * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
5573 chrome
.fileSystem
.retainEntry = function(entry
) {};
5578 * @see http://developer.chrome.com/extensions/alarms.html
5584 * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
5585 * is fired. If there is another alarm with the same name (or no name if none is
5586 * specified), it will be cancelled and replaced by this alarm.
5587 * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
5588 * the name to identify this alarm or the info used to create the alarm. If
5589 * no name is passed, the empty string is used to identify the alarm.
5590 * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
5591 * as arg1, the info used to create the alarm.
5592 * @see http://developer.chrome.com/extensions/alarms.html#method-create
5594 chrome
.alarms
.create = function(nameOrAlarmCreateInfo
, opt_alarmInfo
) {};
5598 * Retrieves details about the specified alarm.
5599 * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
5600 * of the alarm to get or the callback to invoke with the alarm. If no name
5601 * is passed, the empty string is used to get the alarm.
5602 * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
5603 * as arg1, the callback to invoke with the alarm.
5604 * @see http://developer.chrome.com/extensions/alarms.html#method-get
5606 chrome
.alarms
.get = function(nameOrCallback
, opt_callback
) {};
5610 * Gets an array of all the alarms.
5611 * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
5612 * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
5614 chrome
.alarms
.getAll = function(callback
) {};
5618 * Clears the alarm with the given name.
5619 * @param {string=} opt_name
5620 * @see http://developer.chrome.com/extensions/alarms.html#method-clear
5622 chrome
.alarms
.clear = function(opt_name
) {};
5626 * Clears all alarms.
5627 * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
5629 chrome
.alarms
.clearAll = function() {};
5633 * Fired when an alarm has elapsed. Useful for event pages.
5634 * @type {!chrome.alarms.AlarmEvent}
5635 * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
5637 chrome
.alarms
.onAlarm
;
5644 chrome
.alarms
.AlarmEvent = function() {};
5648 * @param {function(!chrome.alarms.Alarm): void} callback
5650 chrome
.alarms
.AlarmEvent
.prototype.addListener = function(callback
) {};
5654 * @param {function(!chrome.alarms.Alarm): void} callback
5656 chrome
.alarms
.AlarmEvent
.prototype.removeListener = function(callback
) {};
5660 * @param {function(!chrome.alarms.Alarm): void} callback
5663 chrome
.alarms
.AlarmEvent
.prototype.hasListener = function(callback
) {};
5669 chrome
.alarms
.AlarmEvent
.prototype.hasListeners = function() {};
5675 * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
5677 chrome
.alarms
.Alarm = function() {};
5681 * Name of this alarm.
5684 chrome
.alarms
.Alarm
.prototype.name
;
5688 * Time at which this alarm was scheduled to fire, in milliseconds past the
5689 * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
5690 * delayed an arbitrary amount beyond this.
5693 chrome
.alarms
.Alarm
.prototype.scheduledTime
;
5697 * If not null, the alarm is a repeating alarm and will fire again in
5698 * periodInMinutes minutes.
5701 chrome
.alarms
.Alarm
.prototype.periodInMinutes
;
5706 * when: (number|undefined),
5707 * delayInMinutes: (number|undefined),
5708 * periodInMinutes: (number|undefined)
5710 * @see http://developer.chrome.com/extensions/alarms.html#method-create
5712 chrome
.alarms
.AlarmCreateInfo
;
5716 * @see https://developer.chrome.com/apps/hid
5727 * @see https://developer.chrome.com/apps/hid#method-getDevices
5729 chrome
.hid
.HidGetDevicesOptions
;
5733 * usagePage: number,
5735 * reportIds: !Array.<number>
5737 * @see https://developer.chrome.com/apps/hid#method-getDevices
5739 chrome
.hid
.HidDeviceUsage
;
5745 * productId: number,
5746 * collections: !Array.<!chrome.hid.HidDeviceUsage>,
5747 * maxInputReportSize: number,
5748 * maxOutputReportSize: number,
5749 * maxFeatureReportSize: number
5751 * @see https://developer.chrome.com/apps/hid#method-getDevices
5753 chrome
.hid
.HidDeviceInfo
;
5758 * connectionId: number
5760 * @see https://developer.chrome.com/apps/hid#method-connect
5762 chrome
.hid
.HidConnectInfo
;
5766 * @see https://developer.chrome.com/apps/hid#method-getDevices
5767 * Enumerates all the connected HID devices specified by the
5768 * vendorId/productId/interfaceId tuple.
5769 * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
5770 * for on target devices.
5771 * @param {function(!Array.<!Object>)} callback Invoked with a list of
5772 * |HidDeviceInfo|s on complete.
5774 chrome
.hid
.getDevices = function(options
, callback
) {};
5778 * @see https://developer.chrome.com/apps/hid#method-connect
5779 * Opens a connection to a HID device for communication.
5780 * @param {number} deviceId The ID of the device to open.
5781 * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
5782 * connection succeeds, or undefined if it fails.
5784 chrome
.hid
.connect = function(deviceId
, callback
) {};
5788 * @see https://developer.chrome.com/apps/hid#method-disconnect
5789 * Disconnects from a device.
5790 * @param {number} connectionId The connection to close.
5791 * @param {function()=} opt_callback The callback to invoke once the connection
5794 chrome
.hid
.disconnect = function(connectionId
, opt_callback
) {};
5798 * @see https://developer.chrome.com/apps/hid#method-receive
5799 * Receives an input report from an HID device.
5800 * @param {number} connectionId The connection from which to receive the report.
5801 * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
5802 * the received report.
5804 chrome
.hid
.receive = function(connectionId
, callback
) {};
5808 * @see https://developer.chrome.com/apps/hid#method-send
5809 * Sends an output report to an HID device.
5810 * @param {number} connectionId The connection to which to send the report.
5811 * @param {number} reportId The report ID to use, or 0 if none.
5812 * @param {!ArrayBuffer} data The report data.
5813 * @param {function()} callback The callback to invoke once the write is
5816 chrome
.hid
.send = function(connectionId
, reportId
, data
, callback
) {};
5820 * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
5821 * Receives a feature report from the device.
5822 * @param {number} connectionId The connection from which to read the feature
5824 * @param {number} reportId The report ID to use, or 0 if none.
5825 * @param {number} size The size of the feature report to receive.
5826 * @param {function(!ArrayBuffer)} callback The callback to invoke with the
5829 chrome
.hid
.receiveFeatureReport
=
5830 function(connectionId
, reportId
, size
, callback
) {};
5834 * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
5835 * Sends a feature report to the device.
5836 * @param {number} connectionId The connection to which to send the feature
5838 * @param {number} reportId The report ID to use, or 0 if none.
5839 * @param {!ArrayBuffer} data The report data.
5840 * @param {function()} callback The callback to invoke once the write is
5843 chrome
.hid
.sendFeatureReport
=
5844 function(connectionId
, reportId
, data
, callback
) {};
5848 * @see http://developer.chrome.com/extensions/notifications.html
5851 chrome
.notifications
= {};
5857 * iconUrl: (string|undefined)
5859 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
5861 chrome
.notifications
.NotificationButton
;
5869 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
5871 chrome
.notifications
.NotificationItem
;
5876 * type: (string|undefined),
5877 * iconUrl: (string|undefined),
5878 * title: (string|undefined),
5879 * message: (string|undefined),
5880 * contextMessage: (string|undefined),
5881 * priority: (number|undefined),
5882 * eventTime: (number|undefined),
5883 * buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
5884 * imageUrl: (string|undefined),
5885 * items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
5886 * progress: (number|undefined),
5887 * isClickable: (boolean|undefined)
5889 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
5891 chrome
.notifications
.NotificationOptions
;
5895 * @typedef {function(string): void}
5896 * @see http://developer.chrome.com/extensions/notifications.html#method-create
5897 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
5899 chrome
.notifications
.StringCallback
;
5903 * @typedef {function(boolean): void}
5904 * @see http://developer.chrome.com/extensions/notifications.html#method-update
5905 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
5907 chrome
.notifications
.BooleanCallback
;
5911 * @typedef {function(!Object): void}
5912 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
5914 chrome
.notifications
.ObjectCallback
;
5918 * @typedef {function(string, boolean): void}
5919 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
5921 chrome
.notifications
.ClosedCallback
;
5925 * @typedef {function(string, number): void}
5926 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
5928 chrome
.notifications
.ButtonCallback
;
5932 * @param {string} notificationId
5933 * @param {!chrome.notifications.NotificationOptions} options
5934 * @param {!chrome.notifications.StringCallback} callback
5935 * @see http://developer.chrome.com/extensions/notifications.html#method-create
5937 chrome
.notifications
.create = function(notificationId
, options
, callback
) {};
5941 * @param {string} notificationId
5942 * @param {!chrome.notifications.NotificationOptions} options
5943 * @param {!chrome.notifications.BooleanCallback} callback
5944 * @see http://developer.chrome.com/extensions/notifications.html#method-update
5946 chrome
.notifications
.update = function(notificationId
, options
, callback
) {};
5950 * @param {string} notificationId
5951 * @param {!chrome.notifications.BooleanCallback} callback
5952 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
5954 chrome
.notifications
.clear = function(notificationId
, callback
) {};
5958 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
5959 * @param {!chrome.notifications.ObjectCallback} callback
5961 chrome
.notifications
.getAll = function(callback
) {};
5965 * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
5966 * @param {function(string)} callback takes 'granted' or 'denied'
5968 chrome
.notifications
.getPermissionLevel = function(callback
) {};
5972 * @type {!chrome.notifications.ClosedEvent}
5973 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
5975 chrome
.notifications
.onClosed
;
5979 * @type {!chrome.notifications.ClickedEvent}
5980 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
5982 chrome
.notifications
.onClicked
;
5986 * @type {!chrome.notifications.ButtonClickedEvent}
5987 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
5989 chrome
.notifications
.onButtonClicked
;
5995 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
5997 chrome
.notifications
.ClosedEvent = function() {};
6001 * @param {!chrome.notifications.ClosedCallback} callback
6003 chrome
.notifications
.ClosedEvent
.prototype.addListener = function(callback
) {};
6007 * @param {!chrome.notifications.ClosedCallback} callback
6009 chrome
.notifications
.ClosedEvent
.prototype.removeListener
=
6010 function(callback
) {};
6014 * @param {!chrome.notifications.ClosedCallback} callback
6017 chrome
.notifications
.ClosedEvent
.prototype.hasListener = function(callback
) {};
6023 chrome
.notifications
.ClosedEvent
.prototype.hasListeners = function() {};
6029 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
6031 chrome
.notifications
.ClickedEvent = function() {};
6035 * @param {!chrome.notifications.StringCallback} callback
6037 chrome
.notifications
.ClickedEvent
.prototype.addListener = function(callback
) {};
6041 * @param {!chrome.notifications.StringCallback} callback
6043 chrome
.notifications
.ClickedEvent
.prototype.removeListener
=
6044 function(callback
) {};
6048 * @param {!chrome.notifications.StringCallback} callback
6051 chrome
.notifications
.ClickedEvent
.prototype.hasListener = function(callback
) {};
6057 chrome
.notifications
.ClickedEvent
.prototype.hasListeners = function() {};
6063 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6065 chrome
.notifications
.ButtonClickedEvent = function() {};
6069 * @param {!chrome.notifications.ButtonCallback} callback
6071 chrome
.notifications
.ButtonClickedEvent
.prototype.addListener
=
6072 function(callback
) {};
6076 * @param {!chrome.notifications.ButtonCallback} callback
6078 chrome
.notifications
.ButtonClickedEvent
.prototype.removeListener
=
6079 function(callback
) {};
6083 * @param {!chrome.notifications.ButtonCallback} callback
6086 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListener
=
6087 function(callback
) {};
6093 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListeners = function() {};
6099 * @see http://developer.chrome.com/apps/system_storage.html
6101 chrome
.system
.storage
= {};
6106 chrome
.system
.storage
.StorageUnitInfo = function() {};
6109 /** @type {string} */
6110 chrome
.system
.storage
.StorageUnitInfo
.id
;
6113 /** @type {string} */
6114 chrome
.system
.storage
.StorageUnitInfo
.name
;
6117 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
6118 chrome
.system
.storage
.StorageUnitInfo
.type
;
6121 /** @type {number} */
6122 chrome
.system
.storage
.StorageUnitInfo
.capacity
;
6127 * Event whose listeners take a StorageUnitInfoEvent parameter.
6130 chrome
.system
.storage
.StorageUnitInfoEvent = function() {};
6133 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
6134 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.addListener
=
6135 function(callback
) {};
6138 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
6139 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.removeListener
=
6140 function(callback
) {};
6144 * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
6147 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListener
=
6148 function(callback
) {};
6151 /** @return {boolean} */
6152 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListeners
=
6156 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
6157 chrome
.system
.storage
.onAttached
;
6160 /** @type {!ChromeStringEvent} */
6161 chrome
.system
.storage
.onDetached
;
6165 * Gets the storage information from the system.
6166 * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
6168 chrome
.system
.storage
.getInfo = function(callback
) {};
6172 * Ejects a removable storage device.
6173 * @param {string} id The transient device ID from StorageUnitInfo.
6174 * @param {function(string)} callback Callback function where the value
6175 * is any of: "success", "in_use", "no_such_device", "failure"
6177 chrome
.system
.storage
.ejectDevice = function(id
, callback
) {};
6181 * Gets the available capacity of a specified storage device.
6182 * @param {string} id The transient device ID from StorageUnitInfo.
6183 * @param {function(Object.<string, number>)} callback A callback function that
6184 * accepts an object with {@code id} and {@code availableCapacity} fields.
6186 chrome
.system
.storage
.getAvailableCapacity = function(id
, callback
) {};
6190 * @see http://developer.chrome.com/apps/usb.html
6198 chrome
.usb
.Device
= function Device() {};
6201 /** @type {number} */
6202 chrome
.usb
.Device
.prototype.device
;
6205 /** @type {number} */
6206 chrome
.usb
.Device
.prototype.vendorId
;
6209 /** @type {number} */
6210 chrome
.usb
.Device
.prototype.productId
;
6215 chrome
.usb
.ConnectionHandle
= function ConnectionHandle() {};
6218 /** @type {number} */
6219 chrome
.usb
.ConnectionHandle
.prototype.handle
;
6222 /** @type {number} */
6223 chrome
.usb
.ConnectionHandle
.prototype.vendorId
;
6226 /** @type {number} */
6227 chrome
.usb
.ConnectionHandle
.prototype.productId
;
6233 * direction: string,
6235 * length: (number|undefined),
6236 * data: (!ArrayBuffer|undefined)
6239 chrome
.usb
.GenericTransferInfo
;
6244 * direction: string,
6245 * recipient: string,
6246 * requestType: string,
6250 * length: (number|undefined),
6251 * data: (!ArrayBuffer|undefined)
6254 chrome
.usb
.ControlTransferInfo
;
6259 chrome
.usb
.TransferResultInfo = function() {};
6262 /** @type {number|undefined} */
6263 chrome
.usb
.TransferResultInfo
.prototype.resultCode
;
6266 /** @type {!ArrayBuffer|undefined} */
6267 chrome
.usb
.TransferResultInfo
.prototype.data
;
6273 * productId: number,
6274 * interfaceId: (number|undefined)
6277 chrome
.usb
.FindDevicesOptions
;
6281 * @see http://developer.chrome.com/apps/usb.html#method-getDevices
6282 * @param {!Object} options The properties to search for on target devices.
6283 * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
6284 * of |Device|s on complete.
6286 chrome
.usb
.getDevices = function(options
, callback
) {};
6290 * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
6291 * @param {!chrome.usb.Device} device The device to request access to.
6292 * @param {number} interfaceId
6293 * @param {function(boolean)} callback
6295 chrome
.usb
.requestAccess = function(device
, interfaceId
, callback
) {};
6299 * @see http://developer.chrome.com/apps/usb.html#method-openDevice
6300 * @param {!chrome.usb.Device} device The device to open.
6301 * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
6302 * created ConnectionHandle on complete.
6304 chrome
.usb
.openDevice = function(device
, callback
) {};
6308 * @see http://developer.chrome.com/apps/usb.html#method-findDevices
6309 * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
6310 * on target devices.
6311 * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
6312 * with the opened ConnectionHandle on complete.
6314 chrome
.usb
.findDevices = function(options
, callback
) {};
6318 * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
6319 * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
6320 * @param {function()=} opt_callback The callback to invoke once the device is
6323 chrome
.usb
.closeDevice = function(handle
, opt_callback
) {};
6327 * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
6328 * @param {!chrome.usb.ConnectionHandle} handle The device from which the
6329 * interfaces should be listed.
6330 * @param {function(!Array.<!Object>)} callback
6331 * The callback to invoke when the interfaces are enumerated.
6333 chrome
.usb
.listInterfaces = function(handle
, callback
) {};
6337 * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
6338 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6339 * interface is to be claimed.
6340 * @param {number} interfaceNumber
6341 * @param {function()} callback The callback to invoke once the interface is
6344 chrome
.usb
.claimInterface = function(handle
, interfaceNumber
, callback
) {};
6348 * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
6349 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6350 * interface is to be released.
6351 * @param {number} interfaceNumber
6352 * @param {function()} callback The callback to invoke once the interface is
6355 chrome
.usb
.releaseInterface = function(handle
, interfaceNumber
, callback
) {};
6359 * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
6360 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6361 * interface settings are to be set.
6362 * @param {number} interfaceNumber
6363 * @param {number} alternateSetting The alternate setting to set.
6364 * @param {function()} callback The callback to invoke once the interface
6367 chrome
.usb
.setInterfaceAlternateSetting = function(
6368 handle
, interfaceNumber
, alternateSetting
, callback
) {};
6372 * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
6373 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6375 * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
6377 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6378 * transfer has completed.
6380 chrome
.usb
.controlTransfer = function(handle
, transferInfo
, callback
) {};
6384 * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
6385 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
6387 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
6388 * transfer. See GenericTransferInfo.
6389 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6390 * transfer has completed.
6392 chrome
.usb
.bulkTransfer = function(handle
, transferInfo
, callback
) {};
6396 * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
6397 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6399 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
6400 * transfer. See GenericTransferInfo.
6401 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6402 * transfer has completed.
6404 chrome
.usb
.interruptTransfer = function(handle
, transferInfo
, callback
) {};
6408 * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
6409 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6411 * @param {!Object} transferInfo The parameters to the transfer. See
6412 * IsochronousTransferInfo.
6413 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6414 * transfer has been completed.
6416 chrome
.usb
.isochronousTransfer = function(handle
, transferInfo
, callback
) {};
6420 * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
6421 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
6422 * @param {function(boolean)} callback Invoked once the device is reset with a
6423 * boolean indicating whether the reset completed successfully.
6425 chrome
.usb
.resetDevice = function(handle
, callback
) {};
6430 * @see https://developer.chrome.com/apps/webstore
6432 chrome
.webstore
= {};
6436 * @param {string|function()|function(string)=}
6437 * opt_urlOrSuccessCallbackOrFailureCallback Either the URL to install or
6438 * the succcess callback taking no arg or the failure callback taking an
6440 * @param {function()|function(string)=} opt_successCallbackOrFailureCallback
6441 * Either the succcess callback taking no arg or the failure callback
6442 * taking an error string arg.
6443 * @param {function(string)=} opt_failureCallback The failure callback.
6445 chrome
.webstore
.install = function(
6446 opt_urlOrSuccessCallbackOrFailureCallback
,
6447 opt_successCallbackOrFailureCallback
,
6448 opt_failureCallback
) {};
6451 /** @type {!ChromeStringEvent} */
6452 chrome
.webstore
.onInstallStageChanged
;
6455 /** @type {!ChromeNumberEvent} */
6456 chrome
.webstore
.onDownloadProgress
;
6459 ////////////////////////////////////////////////////////////////////////////////
6460 /////////////////////////// Chrome Private APIs ////////////////////////////////
6461 ////////////////////////////////////////////////////////////////////////////////
6465 chrome
.screenlockPrivate
= {};
6469 * @param {string} message Displayed on the unlock screen.
6471 chrome
.screenlockPrivate
.showMessage = function(message
) {};
6475 * @param {function(boolean)} callback
6477 chrome
.screenlockPrivate
.getLocked = function(callback
) {};
6481 * @param {boolean} locked If true and the screen is unlocked, locks the screen.
6482 * If false and the screen is locked, unlocks the screen.
6484 chrome
.screenlockPrivate
.setLocked = function(locked
) {};
6487 /** @type {!ChromeBooleanEvent} */
6488 chrome
.screenlockPrivate
.onChanged
;
6494 chrome
.musicManagerPrivate
= {};
6498 * @param {function(string): void} callback
6500 chrome
.musicManagerPrivate
.getDeviceId = function(callback
) {};
6506 chrome
.mediaGalleriesPrivate
= {};
6510 * @typedef {function({deviceId: string, deviceName: string}): void}
6512 chrome
.mediaGalleriesPrivate
.DeviceCallback
;
6516 * @typedef {function({galleryId: string}): void}
6518 chrome
.mediaGalleriesPrivate
.GalleryChangeCallback
;
6522 * @typedef {function({galleryId: string, success: boolean}): void}
6524 chrome
.mediaGalleriesPrivate
.AddGalleryWatchCallback
;
6528 * @param {string} galleryId
6529 * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
6531 chrome
.mediaGalleriesPrivate
.addGalleryWatch = function(galleryId
, callback
) {};
6535 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
6536 * @deprecated Use {chrome.system.storage.onAttach}.
6538 chrome
.mediaGalleriesPrivate
.onDeviceAttached
;
6542 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
6543 * @deprecated Use {chrome.system.storage.onDetach}.
6545 chrome
.mediaGalleriesPrivate
.onDeviceDetached
;
6549 * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
6551 chrome
.mediaGalleriesPrivate
.onGalleryChanged
;
6557 * @deprecated Use {chrome.system.storage.DeviceEvent}.
6559 chrome
.mediaGalleriesPrivate
.DeviceEvent = function() {};
6563 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
6564 * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
6566 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.addListener
=
6567 function(callback
) {};
6571 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
6572 * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
6574 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.removeListener
=
6575 function(callback
) {};
6579 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
6580 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
6582 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListener
=
6583 function(callback
) {};
6588 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
6590 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListeners
=
6591 function(callback
) {};
6598 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent = function() {};
6602 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
6604 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.addListener
=
6605 function(callback
) {};
6609 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
6611 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.removeListener
=
6612 function(callback
) {};
6616 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
6618 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListener
=
6619 function(callback
) {};
6625 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListeners
=
6630 * WARNING(2014/08/04): This API is still under active initial development and
6631 * unstable and has a number of issues:
6633 * 1. The types NetworkProperties and ManagedNetworkProperties are not defined
6634 * in the docs; that is, there is no list of fields and their types.
6635 * Therefore, these types are treated as bags-of-objects, rather than types.
6636 * 2. According to Steven Bennetts, NetworkProperties *should* be a
6637 * bag-of-properties as it's a map containing ONC properties and the ONC
6638 * properties do not follow the JS field naming conventions; specifically,
6639 * the properties start with an uppercase letter, and at least one property
6640 * is in all uppercase.
6641 * 3. The deviceSsid and deviceBssid fields of VerticationProperties are listed
6642 * as being required while their description mentions "Only set if" which
6643 * sound optional. The dev team was unclear whether they are required or
6645 * 4. Some parameters to some functions are marked as being in the Beta channel
6646 * only (for example, the networkGuid parameter to getCaptivePortalStatus).
6648 * Because of the above issues, this API should not be used as an example for
6649 * other APIs added to this file. Please contact mednik@ for questions on and
6650 * maintenance for this API.
6652 * @see https://developer.chrome.com/extensions/networkingPrivate
6654 chrome
.networkingPrivate
= {};
6659 * certificate: string,
6660 * publicKey: string,
6662 * signedData: string,
6663 * deviceSerial: string,
6664 * deviceSsid: string,
6665 * deviceBssid: string
6668 chrome
.networkingPrivate
.VerificationProperties
;
6673 * networkType: string,
6674 * visible: (boolean|undefined),
6675 * configured: (boolean|undefined),
6676 * limit: (number|undefined)
6679 chrome
.networkingPrivate
.NetworkFilter
;
6683 * @param {string} guid
6684 * @param {function(!Object)} callback
6686 chrome
.networkingPrivate
.getProperties = function(guid
, callback
) {};
6690 * @param {string} guid
6691 * @param {function(!Object)} callback
6693 chrome
.networkingPrivate
.getManagedProperties = function(guid
, callback
) {};
6697 * @param {string} guid
6698 * @param {function(!Object)} callback
6700 chrome
.networkingPrivate
.getState = function(guid
, callback
) {};
6704 * @param {string} guid
6705 * @param {!Object} properties
6706 * @param {function()} callback
6708 chrome
.networkingPrivate
.setProperties = function(guid
, properties
, callback
) {
6713 * @param {boolean} shared
6714 * @param {!Object} properties
6715 * @param {function(string)} callback Returns guid of the configured
6718 chrome
.networkingPrivate
.createNetwork
=
6719 function(shared
, properties
, callback
) {};
6723 * @param {!chrome.networkingPrivate.NetworkFilter} filter
6724 * @param {function(!Array.<!Object>)=} opt_callback
6726 chrome
.networkingPrivate
.getNetworks = function(filter
, opt_callback
) {};
6730 * @param {string} type
6731 * @param {function(!Array.<!Object>)=} opt_callback
6733 chrome
.networkingPrivate
.getVisibleNetworks = function(type
, opt_callback
) {};
6736 /** @param {function(!Array.<string>)=} opt_callback */
6737 chrome
.networkingPrivate
.getEnabledNetworkTypes = function(opt_callback
) {};
6740 /** @param {string} networkType */
6741 chrome
.networkingPrivate
.enableNetworkType = function(networkType
) {};
6744 /** @param {string} networkType */
6745 chrome
.networkingPrivate
.disableNetworkType = function(networkType
) {};
6749 * Requests that the networking subsystem scan for new networks and update the
6750 * list returned by getVisibleNetworks.
6752 chrome
.networkingPrivate
.requestNetworkScan = function() {};
6756 * @param {string} guid
6757 * @param {function()=} opt_callback
6759 chrome
.networkingPrivate
.startConnect = function(guid
, opt_callback
) {};
6763 * @param {string} guid
6764 * @param {function()=} opt_callback
6766 chrome
.networkingPrivate
.startDisconnect = function(guid
, opt_callback
) {};
6770 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
6771 * @param {function(boolean)} callback
6773 chrome
.networkingPrivate
.verifyDestination
=
6774 function(verificationInfo
, callback
) {};
6778 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
6779 * @param {string} guid
6780 * @param {function(string)} callback
6782 chrome
.networkingPrivate
.verifyAndEncryptCredentials
=
6783 function(verificationInfo
, guid
, callback
) {};
6787 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
6788 * @param {string} data
6789 * @param {function(string)} callback
6791 chrome
.networkingPrivate
.verifyAndEncryptData
=
6792 function(verificationInfo
, data
, callback
) {};
6796 * @param {string} ipOrMacAddress
6797 * @param {boolean} enabled
6798 * @param {function(string)} callback
6800 chrome
.networkingPrivate
.setWifiTDLSEnabledState
=
6801 function(ipOrMacAddress
, enabled
, callback
) {};
6805 * @param {string} ipOrMacAddress
6806 * @param {function(string)} callback
6808 chrome
.networkingPrivate
.getWifiTDLSStatus
=
6809 function(ipOrMacAddress
, callback
) {};
6813 * @param {string} guid
6814 * @param {function(string)} callback
6816 chrome
.networkingPrivate
.getCaptivePortalStatus = function(guid
, callback
) {};
6819 /** @type {!ChromeStringArrayEvent} */
6820 chrome
.networkingPrivate
.onNetworksChanged
;
6823 /** @type {!ChromeStringArrayEvent} */
6824 chrome
.networkingPrivate
.onNetworkListChanged
;
6827 /** @type {!ChromeStringStringEvent} */
6828 chrome
.networkingPrivate
.onPortalDetectionCompleted
;
6832 * WARNING(2014/08/14): This API is still under active initial development and
6833 * unstable. The types are not well defined or documented, and this API
6834 * definition here should not be used as an example for other APIs added to this
6835 * file. Please contact mednik@ for questions on and maintenance for this API.
6837 * @see http://goo.gl/afV8wB
6843 * Data type sent to the event handler of chrome.mdns.onServiceList.
6844 * TODO: This one event handler data type is being made a typedef
6845 * as an experiment. This allows us to create these objects in tests to pass
6846 * to the handlers which isn't possible by using the object form.
6848 * serviceName: string,
6849 * serviceHostPort: string,
6850 * ipAddress: string,
6851 * serviceData: !Array.<string>}}
6853 chrome
.mdns
.MdnsService
;
6857 * Event whose listeners take an array of MdnsService parameter.
6860 chrome
.mdns
.ServiceListEvent = function() {};
6864 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
6865 * @param {!Object=} opt_filter
6867 chrome
.mdns
.ServiceListEvent
.prototype.addListener
=
6868 function(callback
, opt_filter
) {};
6871 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
6872 chrome
.mdns
.ServiceListEvent
.prototype.removeListener = function(callback
) {};
6876 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
6879 chrome
.mdns
.ServiceListEvent
.prototype.hasListener = function(callback
) {};
6882 /** @return {boolean} */
6883 chrome
.mdns
.ServiceListEvent
.prototype.hasListeners = function() {};
6886 /** @type {!chrome.mdns.ServiceListEvent} */
6887 chrome
.mdns
.onServiceList
;
6892 * @see http://goo.gl/79p5h5
6894 chrome
.gcdPrivate
= {};
6898 * Represents a GCD device discovered locally or registered to a given user.
6899 * deviceId: Opaque device identifier to be passed to API.
6900 * setupType: How this device was discovered.
6901 * cloudId: Cloud identifier string.
6902 * deviceName: Device human readable name.
6903 * deviceType: Device type (camera, printer, etc).
6904 * deviceDescription: Device human readable description.
6907 * setupType: string,
6908 * cloudId: (string|undefined),
6909 * deviceType: string,
6910 * deviceName: string,
6911 * deviceDescription: string
6914 chrome
.gcdPrivate
.Device
;
6918 chrome
.gcdPrivate
.ConfirmationInfo = function() {};
6921 /** @type {string} */
6922 chrome
.gcdPrivate
.ConfirmationInfo
.prototype.type
;
6925 /** @type {string|undefined} */
6926 chrome
.gcdPrivate
.ConfirmationInfo
.prototype.code
;
6930 * Returns the list of cloud devices visible locally or available in the
6931 * cloud for user account.
6932 * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
6934 chrome
.gcdPrivate
.getCloudDeviceList = function(callback
) {};
6938 * Queries network for local devices. Triggers onDeviceStateChanged and
6939 * onDeviceRemoved events. Call this function *only* after registering for
6940 * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
6942 chrome
.gcdPrivate
.queryForNewLocalDevices = function() {};
6946 * Cache the WiFi password in the browser process for use during
6947 * provisioning. This is done to allow the gathering of the wifi password to
6948 * not be done while connected to the device's network. Callback is called
6949 * with true if wifi password was cached and false if it was unavailable.
6950 * @param {string} ssid
6951 * @param {function(boolean): void} callback
6953 chrome
.gcdPrivate
.prefetchWifiPassword = function(ssid
, callback
) {};
6957 * Establish the session.
6958 * @param {string} ipAddress
6959 * @param {number} port
6960 * @param {function(number, string, !chrome.gcdPrivate.ConfirmationInfo): void}
6961 * callback Called when the session is established or on error. 1st param,
6962 * |sessionId|, is the session ID (identifies the session for future calls).
6963 * 2nd param, |status|, is the status (success or type of error). 3rd param,
6964 * |confirmationInfo|, is the info about how the device handles
6967 chrome
.gcdPrivate
.establishSession = function(ipAddress
, port
, callback
) {};
6971 * Confirm that the code is correct. Device will still need to confirm. |code|
6972 * must be present and must match the code from the device, even when the code
6973 * is supplied in the |ConfirmationInfo| object.
6974 * @param {number} sessionId
6975 * @param {string} code
6976 * @param {function(string): void} callback
6978 chrome
.gcdPrivate
.confirmCode = function(sessionId
, code
, callback
) {};
6982 * Send an encrypted message to the device. If the message is a setup message
6983 * with a wifi ssid specified but no password, the password cached from
6984 * prefetchWifiPassword() will be used and the call will fail if it's not
6985 * available. For open networks use an empty string as the password.
6986 * @param {number} sessionId
6987 * @param {string} api The API path.
6988 * @param {!Object} input The input message to be sent over the encrypted
6990 * @param {function(string, ?Object): void} callback
6992 chrome
.gcdPrivate
.sendMessage = function(sessionId
, api
, input
, callback
) {};
6996 * Terminate the session with the device.
6997 * @param {number} sessionId
6999 chrome
.gcdPrivate
.terminateSession = function(sessionId
) {};
7003 * Returns command definitions.
7004 * @param {string} deviceId The device to get command definitions for.
7005 * @param {function(!Object): void} callback The result callback.
7007 chrome
.gcdPrivate
.getCommandDefinitions = function(deviceId
, callback
) {};
7011 * Creates and sends a new command.
7012 * @param {string} deviceId The device to send the command to.
7013 * @param {number} expireInMs The number of milliseconds since now before the
7014 * command expires. An expired command should not be executed by the device.
7015 * Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
7016 * inclusive. All values outside that range will be replaced by 30 days.
7017 * @param {!Object} command Described at
7018 * https://developers.google.com/cloud-devices/v1/reference/commands.
7019 * @param {function(!Object): void} callback The result callback.
7021 chrome
.gcdPrivate
.insertCommand = function(
7022 deviceId
, expireInMs
, command
, callback
) {};
7026 * Returns a particular command.
7027 * @param {string} commandId Unique command ID.
7028 * @param {function(!Object): void} callback The result callback.
7030 chrome
.gcdPrivate
.getCommand = function(commandId
, callback
) {};
7034 * Cancels a command.
7035 * @param {string} commandId Unique command ID.
7036 * @param {function(!Object): void} callback The result callback.
7038 chrome
.gcdPrivate
.cancelCommand = function(commandId
, callback
) {};
7042 * Lists all commands in order of creation.
7043 * @param {string} deviceId The device to send the command to.
7044 * @param {string} byUser List all the commands issued by the user. Special
7045 * value 'me' can be used to list by the current user.
7046 * @param {string} state Command state.
7047 * @param {function(!Array.<!Object>): void} callback The result callback.
7049 chrome
.gcdPrivate
.getCommandsList = function(
7050 deviceId
, byUser
, state
, callback
) {};
7054 * Event whose listeners take a chrome.gcdPrivate.Device.
7057 chrome
.gcdPrivate
.DeviceEvent = function() {};
7060 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7061 chrome
.gcdPrivate
.DeviceEvent
.prototype.addListener = function(callback
) {};
7064 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7065 chrome
.gcdPrivate
.DeviceEvent
.prototype.removeListener = function(callback
) {};
7069 * @param {function(!chrome.gcdPrivate.Device): void} callback
7072 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListener = function(callback
) {};
7075 /** @return {boolean} */
7076 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListeners = function() {};
7080 * Fires when a device's state changes. When a listener is first added, this
7081 * event fires for all known devices on the network. Afterwards, it will fire
7082 * with device status updates.
7083 * @type {!chrome.gcdPrivate.DeviceEvent}
7085 chrome
.gcdPrivate
.onDeviceStateChanged
;
7089 * Fires when a given device disappears.
7090 * |deviceId| The device that has disappeared.
7091 * @type {!ChromeStringEvent}
7093 chrome
.gcdPrivate
.onDeviceRemoved
;
7098 * @see http://goo.gl/bKHibo
7100 chrome
.bluetoothPrivate
= {};
7104 chrome
.bluetoothPrivate
.PairingEvent = function() {};
7107 /** @type {string} */
7108 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pairing
;
7111 /** @type {!chrome.bluetooth.Device} */
7112 chrome
.bluetoothPrivate
.PairingEvent
.prototype.device
;
7115 /** @type {string|undefined} */
7116 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pincode
;
7119 /** @type {number|undefined} */
7120 chrome
.bluetoothPrivate
.PairingEvent
.prototype.passkey
;
7123 /** @type {number|undefined} */
7124 chrome
.bluetoothPrivate
.PairingEvent
.prototype.enteredKey
;
7129 * name: (string|undefined),
7130 * powered: (boolean|undefined),
7131 * discoverable: (boolean|undefined)
7134 chrome
.bluetoothPrivate
.NewAdapterState
;
7139 * device: !chrome.bluetooth.Device,
7140 * response: (string|undefined),
7141 * pincode: (string|undefined),
7142 * passkey: (number|undefined),
7143 * enteredKey: (number|undefined)
7146 chrome
.bluetoothPrivate
.SetPairingResponseOptions
;
7150 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
7151 * @param {function()} callback
7153 chrome
.bluetoothPrivate
.setAdapterState = function(adapterState
, callback
) {};
7157 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
7158 * @param {function()} callback
7160 chrome
.bluetoothPrivate
.setPairingResponse = function(options
, callback
) {};
7164 * Event whose listeners take a PairingEvent parameter.
7167 chrome
.bluetoothPrivate
.PairingEventEvent = function() {};
7170 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
7171 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.addListener
=
7172 function(callback
) {};
7175 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
7176 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.removeListener
=
7177 function(callback
) {};
7181 * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
7184 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListener
=
7185 function(callback
) {};
7188 /** @return {boolean} */
7189 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListeners
=
7193 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
7194 chrome
.bluetoothPrivate
.onPairing
;