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
33 * The best practices for each are described in more detail below. It
34 * should be noted that, due to historical reasons, and the evolutionary
35 * nature of this file, much this file currently violates the best practices
36 * described below. As changed are made, the changes should adhere to the
39 * A. When to Add Packages to this File?
40 * Packages in chrome.experimental.* should *not* be added to this file. The
41 * experimental APIs change very quickly, so rather than add them here, make a
42 * separate externs file for your project, then move the API here when it moves
43 * out of experimental.
45 * Some non-experimental APIs are still evolving or are not full documented. It
46 * is still advantageous to include these in this file as doing so avoids a
47 * proliferation of project-private externs files containing duplicated info. In
48 * these cases, use comments to describe the situation.
50 * B. Optional Parameters
51 * The Chrome extension APIs make extensive use of optional parameters that
52 * are not at the end of the parameter list, "interior optional parameters",
53 * while the JS Compiler's type system requires optional parameters to be
54 * at the end. This creates a bit of tension:
56 * 1. If a method has N required params, then the parameter declarations
57 * should have N required params.
58 * 2. If, due to interior optional params, a parameter can be of more than
59 * one type, its at-param should:
60 * a. be named to indicate both possibilities, eg, extensionIdOrRequest,
61 * or getInfoOrCallback.
62 * b. the type should include both types, in the same order as the parts
63 * of the name, even when one type subsumes the other, eg, {string|*}
64 * or {Object|function(string)}.
65 * See chrome.runtime.sendMessage for a complex example as sendMessage
66 * takes three params with the first and third being optional.
69 * The Chrome APIs define many types are that actually pseudo-types, that
70 * is, they can't be instantiated by name. The extension APIs also pass
71 * untyped objects (a bag of properties) to callbacks.
73 * The Chrome extension APIs include at least three different situations:
75 * 1. an object that must be created by an extension developer and passed
76 * into a Chrome extension API and for which there is no constructor.
77 * 2. an instance of a type that is created inside the extension libraries
78 * and passed out to a callback/listener or returned by an extension API
79 * (the constructor implicity lives within the library).
80 * 3. like #2, but a bag-of-properties object that is passed out to a
81 * callback/listener or returned by an extension API so there is no
84 * For #1, use a typedef so object literals and objects created via goog.object
85 * are acceptable, for example, the Permissions type defined at
86 * http://developer.chrome.com/extensions/permissions.html#type-Permissions
91 * * permissions: (!Array.<string>|undefined),
92 * * origins: (!Array.<string>|undefined)
95 * chrome.permissions.Permissions;
97 * Using typedefs provides type-safety for the fields that are defined in
98 * the object literal and also defined in the typedef. Note that typedefs define
99 * a minimal interface and will not complain about extraneous (often
100 * misspelled) fields.
102 * Also, typedefs of record types are non-nullable by default. The "{?{"
103 * creates a nullable record-type typedef so ! has the same meaning in usages
104 * as it does for real types.
106 * For #2, use a standard constructor, even though no constructor is provided
107 * and extension writers will never instantiate an instance, as using a first
108 * class type provides the strongest type checking. For example, see the Port
109 * type defined at http://developer.chrome.com/apps/runtime.html#type-Port.
110 * Always qualify the type name to reduce top-level pollution in this file:
113 * chrome.extension.Port = function() {}
117 * Note that, unfortunately, the actual Port class definition in this file
118 * does not follow this recommendation.
120 * For #3, use {!Object}, that is, a bag of properites. This is a sad reality
121 * given that the Chrome extensions do not document a real type. It is tempting
122 * to define a real-type within this file and treat this situation as identical
123 * to #2, but that means a new type is being defined in this file and developers
124 * do not expect to find required new types in extension files.
126 * If a real type is declared here, then developers will need to incorporate
127 * that type into the signature of their callback method and there will be
128 * no indication from the docs that they need to do so.
131 * Most packages define a set of events with the standard set of methods:
132 * addListener, removeListener, hasListener and hasListeners. ChromeEvent
133 * is the appropriate type when an event's listeners do not take any
134 * parameters, however, many events take parameters specific to that event:
136 * 1. Create a pseudo-type for the event, for example,
137 * chrome.runtime.PortEvent and define the four methods on it.
138 * 2. Fully describe the listener/callback's signature, for example,
140 * * at-param {function(!chrome.runtime.Port): void} callback Callback.
141 * chrome.runtime.PortEvent.prototype.addListener =
142 * function(callback) {};
145 * * at-param {function(*, !chrome.runtime.MessageSender,
146 * * function(*): void): (boolean|undefined)} callback Callback.
147 * chrome.runtime.MessageSenderEvent.prototype.addListener =
148 * function(callback) {};
151 * We treat the Chrome Extension API pages as "the truth". Not-null types
152 * should be used in the following situations:
154 * 1. Parameters and return values that are not explicitly declared to handle
156 * 2. Static event instances, for example, chrome.runtime.onConnect's type
157 * should be: !chrome.runtime.PortEvent.
158 * 3. Optional params as there is little value to passing null when the
159 * parameter can be omitted, of course, if null is explicitly declared
160 * to be meaningful, then a nullable type should be used.
163 * Private Chrome APIs (such as those that end in "Private") should go at the
164 * bottom of this file.
167 * The Chrome extension APIs define many enums that define a set of acceptable
168 * strings, however, they do not reify those enum types, therefore, enum
169 * parameters should be defined as {@code string}.
177 * TODO(tbreisacher): Move all chrome.app.* externs into their own file.
185 * @see http://developer.chrome.com/apps/app.runtime.html
187 chrome
.app
.runtime
= {};
193 * @see http://developer.chrome.com/apps/app_runtime.html
195 chrome
.app
.runtime
.LaunchItem = function() {};
198 /** @type {!FileEntry} */
199 chrome
.app
.runtime
.LaunchItem
.prototype.entry
;
202 /** @type {string} */
203 chrome
.app
.runtime
.LaunchItem
.prototype.type
;
209 * @see http://developer.chrome.com/apps/app_runtime.html
211 chrome
.app
.runtime
.LaunchData = function() {};
214 /** @type {string|undefined} */
215 chrome
.app
.runtime
.LaunchData
.prototype.id
;
218 /** @type {!Array.<!chrome.app.runtime.LaunchItem>|undefined} */
219 chrome
.app
.runtime
.LaunchData
.prototype.items
;
222 /** @type {string|undefined} */
223 chrome
.app
.runtime
.LaunchData
.prototype.url
;
226 /** @type {string|undefined} */
227 chrome
.app
.runtime
.LaunchData
.prototype.referrerUrl
;
230 /** @type {boolean|undefined} */
231 chrome
.app
.runtime
.LaunchData
.prototype.isKioskSession
;
236 * The type of chrome.app.runtime.onLaunched.
239 chrome
.app
.runtime
.LaunchEvent = function() {};
243 * @param {function(!chrome.app.runtime.LaunchData)} callback
244 * @see http://developer.chrome.com/apps/app.runtime.html#event-onLaunched
246 chrome
.app
.runtime
.LaunchEvent
.prototype.addListener = function(callback
) {};
250 * @param {function(!chrome.app.runtime.LaunchData)} callback
252 chrome
.app
.runtime
.LaunchEvent
.prototype.removeListener = function(callback
) {};
256 * @param {function(!chrome.app.runtime.LaunchData)} callback
259 chrome
.app
.runtime
.LaunchEvent
.prototype.hasListener = function(callback
) {};
265 chrome
.app
.runtime
.LaunchEvent
.prototype.hasListeners = function() {};
268 /** @type {!chrome.app.runtime.LaunchEvent} */
269 chrome
.app
.runtime
.onLaunched
;
273 * @type {!ChromeEvent}
274 * @see http://developer.chrome.com/apps/app.runtime.html#event-onRestarted
276 chrome
.app
.runtime
.onRestarted
;
281 * @see http://developer.chrome.com/apps/app.window.html
283 chrome
.app
.window
= {};
287 * @see https://developer.chrome.com/apps/app_window#method-getAll
288 * @return {!Array.<!chrome.app.window.AppWindow>}
290 chrome
.app
.window
.getAll = function() {};
294 * @see https://developer.chrome.com/apps/app_window#method-get
296 * @return {chrome.app.window.AppWindow}
298 chrome
.app
.window
.get = function(id
) {};
304 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
306 chrome
.app
.window
.AppWindow = function() {};
310 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
312 chrome
.app
.window
.AppWindow
.prototype.focus = function() {};
316 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
318 chrome
.app
.window
.AppWindow
.prototype.fullscreen = function() {};
323 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
325 chrome
.app
.window
.AppWindow
.prototype.isFullscreen = function() {};
329 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
331 chrome
.app
.window
.AppWindow
.prototype.minimize = function() {};
336 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
338 chrome
.app
.window
.AppWindow
.prototype.isMinimized = function() {};
342 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
344 chrome
.app
.window
.AppWindow
.prototype.maximize = function() {};
349 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
351 chrome
.app
.window
.AppWindow
.prototype.isMaximized = function() {};
355 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
357 chrome
.app
.window
.AppWindow
.prototype.restore = function() {};
361 * @param {number} left The new left position, in pixels.
362 * @param {number} top The new top position, in pixels.
363 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
365 chrome
.app
.window
.AppWindow
.prototype.moveTo = function(left
, top
) {};
369 * @param {number} width The new width, in pixels.
370 * @param {number} height The new height, in pixels.
371 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
373 chrome
.app
.window
.AppWindow
.prototype.resizeTo = function(width
, height
) {};
377 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
379 chrome
.app
.window
.AppWindow
.prototype.drawAttention = function() {};
383 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
385 chrome
.app
.window
.AppWindow
.prototype.clearAttention = function() {};
389 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
391 chrome
.app
.window
.AppWindow
.prototype.close = function() {};
395 * @param {boolean=} opt_focus Should the window be focused? Defaults to true.
396 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
398 chrome
.app
.window
.AppWindow
.prototype.show = function(opt_focus
) {};
402 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
404 chrome
.app
.window
.AppWindow
.prototype.hide = function() {};
408 * @return {!chrome.app.window.Bounds} The current window bounds.
409 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
411 chrome
.app
.window
.AppWindow
.prototype.getBounds = function() {};
415 * @param {!chrome.app.window.Bounds} bounds The new window bounds.
416 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
418 chrome
.app
.window
.AppWindow
.prototype.setBounds = function(bounds
) {};
423 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
425 chrome
.app
.window
.AppWindow
.prototype.isAlwaysOnTop = function() {};
429 * @param {boolean} alwaysOnTop Set whether the window should stay above most
431 * @see http://developer.chrome.com/apps/app.window.html#type-AppWindow
433 chrome
.app
.window
.AppWindow
.prototype.setAlwaysOnTop = function(alwaysOnTop
) {};
436 /** @type {!ChromeEvent} */
437 chrome
.app
.window
.AppWindow
.prototype.onBoundsChanged
;
440 /** @type {!ChromeEvent} */
441 chrome
.app
.window
.AppWindow
.prototype.onClosed
;
444 /** @type {!ChromeEvent} */
445 chrome
.app
.window
.AppWindow
.prototype.onFullscreened
;
448 /** @type {!ChromeEvent} */
449 chrome
.app
.window
.AppWindow
.prototype.onMinimized
;
452 /** @type {!ChromeEvent} */
453 chrome
.app
.window
.AppWindow
.prototype.onMaximized
;
456 /** @type {!ChromeEvent} */
457 chrome
.app
.window
.AppWindow
.prototype.onRestored
;
460 /** @type {!Window} */
461 chrome
.app
.window
.AppWindow
.prototype.contentWindow
;
466 * left: (number|undefined),
467 * top: (number|undefined),
468 * width: (number|undefined),
469 * height: (number|undefined)
471 * @see http://developer.chrome.com/apps/app.window.html#type-Bounds
473 chrome
.app
.window
.Bounds
;
478 * id: (string|undefined),
479 * minWidth: (number|undefined),
480 * minHeight: (number|undefined),
481 * maxWidth: (number|undefined),
482 * maxHeight: (number|undefined),
483 * frame: (string|undefined),
484 * bounds: (!chrome.app.window.Bounds|undefined),
485 * transparentBackground: (boolean|undefined),
486 * state: (string|undefined),
487 * hidden: (boolean|undefined),
488 * resizable: (boolean|undefined),
489 * alwaysOnTop: (boolean|undefined),
490 * focused: (boolean|undefined)
492 * @see http://developer.chrome.com/apps/app.window.html#method-create
494 chrome
.app
.window
.CreateWindowOptions
;
498 * @param {string} url URL to create.
499 * @param {!chrome.app.window.CreateWindowOptions=} opt_options The options for
501 * @param {function(!chrome.app.window.AppWindow)=} opt_createWindowCallback
502 * Callback to be run.
503 * @see http://developer.chrome.com/apps/app.window.html#method-create
505 chrome
.app
.window
.create = function(
506 url
, opt_options
, opt_createWindowCallback
) {};
510 * Returns an AppWindow object for the current script context (ie JavaScript
512 * @return {!chrome.app.window.AppWindow}
513 * @see http://developer.chrome.com/apps/app.window.html#method-current
515 chrome
.app
.window
.current = function() {};
519 * @type {!ChromeEvent}
520 * @see http://developer.chrome.com/apps/app.window.html#event-onBoundsChanged
522 chrome
.app
.window
.onBoundsChanged
;
526 * @type {!ChromeEvent}
527 * @see http://developer.chrome.com/apps/app.window.html#event-onClosed
529 chrome
.app
.window
.onClosed
;
533 * @type {!ChromeEvent}
534 * @see http://developer.chrome.com/apps/app.window.html#event-onFullscreened
536 chrome
.app
.window
.onFullscreened
;
540 * @type {!ChromeEvent}
541 * @see http://developer.chrome.com/apps/app.window.html#event-onMaximized
543 chrome
.app
.window
.onMaximized
;
547 * @type {!ChromeEvent}
548 * @see http://developer.chrome.com/apps/app.window.html#event-onMinimized
550 chrome
.app
.window
.onMinimized
;
554 * @type {!ChromeEvent}
555 * @see http://developer.chrome.com/apps/app.window.html#event-onRestored
557 chrome
.app
.window
.onRestored
;
562 * @see https://developer.chrome.com/apps/bluetooth
564 chrome
.bluetooth = function() {};
570 * @see https://developer.chrome.com/apps/bluetooth#type-AdapterState
572 chrome
.bluetooth
.AdapterState = function() {};
575 /** @type {string} */
576 chrome
.bluetooth
.AdapterState
.prototype.address
;
579 /** @type {string} */
580 chrome
.bluetooth
.AdapterState
.prototype.name
;
583 /** @type {boolean} */
584 chrome
.bluetooth
.AdapterState
.prototype.powered
;
587 /** @type {boolean} */
588 chrome
.bluetooth
.AdapterState
.prototype.available
;
591 /** @type {boolean} */
592 chrome
.bluetooth
.AdapterState
.prototype.discovering
;
598 * @see https://developer.chrome.com/apps/bluetooth#type-Device
600 chrome
.bluetooth
.Device = function() {};
603 /** @type {string} */
604 chrome
.bluetooth
.Device
.prototype.address
;
607 /** @type {string|undefined} */
608 chrome
.bluetooth
.Device
.prototype.name
;
611 /** @type {number|undefined} */
612 chrome
.bluetooth
.Device
.prototype.deviceClass
;
615 /** @type {string|undefined} */
616 chrome
.bluetooth
.Device
.prototype.vendorIdSource
;
619 /** @type {string|undefined} */
620 chrome
.bluetooth
.Device
.prototype.vendorId
;
623 /** @type {number|undefined} */
624 chrome
.bluetooth
.Device
.prototype.productId
;
627 /** @type {number|undefined} */
628 chrome
.bluetooth
.Device
.prototype.deviceId
;
631 /** @type {string|undefined} */
632 chrome
.bluetooth
.Device
.prototype.type
;
635 /** @type {boolean|undefined} */
636 chrome
.bluetooth
.Device
.prototype.paired
;
639 /** @type {boolean|undefined} */
640 chrome
.bluetooth
.Device
.prototype.connected
;
643 /** @type {!Array.<string>|undefined} */
644 chrome
.bluetooth
.Device
.prototype.uuids
;
648 * @param {function(!chrome.bluetooth.AdapterState)} callback
649 * @see https://developer.chrome.com/apps/bluetooth#method-getAdapterState
651 chrome
.bluetooth
.getAdapterState = function(callback
) {};
655 * @param {string} deviceAddress
656 * @param {function(!chrome.bluetooth.Device)} callback
657 * @see https://developer.chrome.com/apps/bluetooth#method-getDevice
659 chrome
.bluetooth
.getDevice = function(deviceAddress
, callback
) {};
663 * @param {function(!Array.<!chrome.bluetooth.Device>)} callback
664 * @see https://developer.chrome.com/apps/bluetooth#method-getDevices
666 chrome
.bluetooth
.getDevices = function(callback
) {};
670 * @param {function()=} opt_callback
671 * @see https://developer.chrome.com/apps/bluetooth#method-startDiscovery
673 chrome
.bluetooth
.startDiscovery = function(opt_callback
) {};
677 * @param {function()=} opt_callback
678 * @see https://developer.chrome.com/apps/bluetooth#method-stopDiscovery
680 chrome
.bluetooth
.stopDiscovery = function(opt_callback
) {};
685 * Event whose listeners take an AdapaterState parameter.
688 chrome
.bluetooth
.AdapterStateEvent = function() {};
691 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
692 chrome
.bluetooth
.AdapterStateEvent
.prototype.addListener
=
693 function(callback
) {};
696 /** @param {function(!chrome.bluetooth.AdapterState): void} callback */
697 chrome
.bluetooth
.AdapterStateEvent
.prototype.removeListener
=
698 function(callback
) {};
702 * @param {function(!chrome.bluetooth.AdapterState): void} callback
705 chrome
.bluetooth
.AdapterStateEvent
.prototype.hasListener
=
706 function(callback
) {};
709 /** @return {boolean} */
710 chrome
.bluetooth
.AdapterStateEvent
.prototype.hasListeners = function() {};
714 * @type {!chrome.bluetooth.AdapterStateEvent}
715 * @see https://developer.chrome.com/apps/bluetooth#event-onAdapterStateChanged
717 chrome
.bluetooth
.onAdapterStateChanged
;
722 * Event whose listeners take an Device parameter.
725 chrome
.bluetooth
.DeviceEvent = function() {};
728 /** @param {function(!chrome.bluetooth.Device): void} callback */
729 chrome
.bluetooth
.DeviceEvent
.prototype.addListener = function(callback
) {};
732 /** @param {function(!chrome.bluetooth.Device): void} callback */
733 chrome
.bluetooth
.DeviceEvent
.prototype.removeListener = function(callback
) {};
737 * @param {function(!chrome.bluetooth.Device): void} callback
740 chrome
.bluetooth
.DeviceEvent
.prototype.hasListener = function(callback
) {};
743 /** @return {boolean} */
744 chrome
.bluetooth
.DeviceEvent
.prototype.hasListeners = function() {};
748 * @type {!chrome.bluetooth.DeviceEvent}
749 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceAdded
751 chrome
.bluetooth
.onDeviceAdded
;
755 * @type {!chrome.bluetooth.DeviceEvent}
756 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceChanged
758 chrome
.bluetooth
.onDeviceChanged
;
762 * @type {!chrome.bluetooth.DeviceEvent}
763 * @see https://developer.chrome.com/apps/bluetooth#event-onDeviceRemoved
765 chrome
.bluetooth
.onDeviceRemoved
;
770 * @see https://developer.chrome.com/apps/bluetoothSocket
772 chrome
.bluetoothSocket
= {};
777 * persistent: (boolean|undefined),
778 * name: (string|undefined),
779 * bufferSize: (number|undefined)
781 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketProperties
783 chrome
.bluetoothSocket
.SocketProperties
;
788 * channel: (number|undefined),
789 * psm: (number|undefined),
790 * backlog: (number|undefined)
792 * @see https://developer.chrome.com/apps/bluetoothSocket#type-ListenOptions
794 chrome
.bluetoothSocket
.ListenOptions
;
800 * @see https://developer.chrome.com/apps/bluetoothSocket#type-SocketInfo
802 chrome
.bluetoothSocket
.SocketInfo = function() {};
805 /** @type {number} */
806 chrome
.bluetoothSocket
.SocketInfo
.prototype.socketId
;
809 /** @type {boolean} */
810 chrome
.bluetoothSocket
.SocketInfo
.prototype.persistent
;
813 /** @type {string|undefined} */
814 chrome
.bluetoothSocket
.SocketInfo
.prototype.name
;
817 /** @type {number|undefined} */
818 chrome
.bluetoothSocket
.SocketInfo
.prototype.bufferSize
;
821 /** @type {boolean} */
822 chrome
.bluetoothSocket
.SocketInfo
.prototype.paused
;
825 /** @type {boolean} */
826 chrome
.bluetoothSocket
.SocketInfo
.prototype.connected
;
829 /** @type {string|undefined} */
830 chrome
.bluetoothSocket
.SocketInfo
.prototype.address
;
833 /** @type {string|undefined} */
834 chrome
.bluetoothSocket
.SocketInfo
.prototype.uuid
;
838 * @param {!chrome.bluetoothSocket.SocketProperties|
839 * function(!{socketId: number})} propertiesOrCallback
840 * @param {function(!{socketId: number})=} opt_callback
841 * @see https://developer.chrome.com/apps/bluetoothSocket#method-create
843 chrome
.bluetoothSocket
.create = function(propertiesOrCallback
, opt_callback
) {};
847 * @param {number} socketId
848 * @param {!chrome.bluetoothSocket.SocketProperties} properties
849 * @param {function()=} opt_callback
850 * @see https://developer.chrome.com/apps/bluetoothSocket#method-update
852 chrome
.bluetoothSocket
.update = function(socketId
, properties
, opt_callback
) {};
856 * @param {number} socketId
857 * @param {boolean} paused
858 * @param {function()=} opt_callback
859 * @see https://developer.chrome.com/apps/bluetoothSocket#method-setPaused
861 chrome
.bluetoothSocket
.setPaused = function(socketId
, paused
, opt_callback
) {};
865 * @param {number} socketId
866 * @param {string} uuid
867 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
868 * @param {function()=} opt_callback
869 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingRfcomm
871 chrome
.bluetoothSocket
.listenUsingRfcomm
=
872 function(socketId
, uuid
, optionsOrCallback
, opt_callback
) {};
876 * @param {number} socketId
877 * @param {string} uuid
878 * @param {!chrome.bluetoothSocket.ListenOptions|function()} optionsOrCallback
879 * @param {function()=} opt_callback
880 * @see https://developer.chrome.com/apps/bluetoothSocket#method-listenUsingL2cap
882 chrome
.bluetoothSocket
.listenUsingL2cap
=
883 function(socketId
, uuid
, optionsOrCallback
, opt_callback
) {};
887 * @param {number} socketId
888 * @param {string} address
889 * @param {string} uuid
890 * @param {function()} callback
891 * @see https://developer.chrome.com/apps/bluetoothSocket#method-connect
893 chrome
.bluetoothSocket
.connect = function(socketId
, address
, uuid
, callback
) {};
897 * @param {number} socketId
898 * @param {function()=} opt_callback
899 * @see https://developer.chrome.com/apps/bluetoothSocket#method-disconnect
901 chrome
.bluetoothSocket
.disconnect = function(socketId
, opt_callback
) {};
905 * @param {number} socketId
906 * @param {function()=} opt_callback
907 * @see https://developer.chrome.com/apps/bluetoothSocket#method-close
909 chrome
.bluetoothSocket
.close = function(socketId
, opt_callback
) {};
913 * @param {number} socketId
914 * @param {!ArrayBuffer} data
915 * @param {function(number)=} opt_callback
916 * @see https://developer.chrome.com/apps/bluetoothSocket#method-send
918 chrome
.bluetoothSocket
.send = function(socketId
, data
, opt_callback
) {};
922 * @param {number} socketId
923 * @param {function(!chrome.bluetoothSocket.SocketInfo)} callback
924 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getInfo
926 chrome
.bluetoothSocket
.getInfo = function(socketId
, callback
) {};
930 * @param {function(!Array.<!chrome.bluetoothSocket.SocketInfo>)} callback
931 * @see https://developer.chrome.com/apps/bluetoothSocket#method-getSockets
933 chrome
.bluetoothSocket
.getSockets = function(callback
) {};
939 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAccept
941 chrome
.bluetoothSocket
.AcceptEventData = function() {};
944 /** @type {number} */
945 chrome
.bluetoothSocket
.AcceptEventData
.prototype.socketId
;
948 /** @type {number} */
949 chrome
.bluetoothSocket
.AcceptEventData
.prototype.clientSocketId
;
954 * Event whose listeners take a AcceptEventData parameter.
957 chrome
.bluetoothSocket
.AcceptEvent = function() {};
961 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
963 chrome
.bluetoothSocket
.AcceptEvent
.prototype.addListener
=
964 function(callback
) {};
968 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
970 chrome
.bluetoothSocket
.AcceptEvent
.prototype.removeListener
=
971 function(callback
) {};
975 * @param {function(!chrome.bluetoothSocket.AcceptEventData): void} callback
978 chrome
.bluetoothSocket
.AcceptEvent
.prototype.hasListener
=
979 function(callback
) {};
982 /** @return {boolean} */
983 chrome
.bluetoothSocket
.AcceptEvent
.prototype.hasListeners = function() {};
986 /** @type {!chrome.bluetoothSocket.AcceptEvent} */
987 chrome
.bluetoothSocket
.onAccept
;
993 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onAcceptError
995 chrome
.bluetoothSocket
.AcceptErrorEventData = function() {};
998 /** @type {number} */
999 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.socketId
;
1002 /** @type {string} */
1003 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.errorMessage
;
1006 /** @type {string} */
1007 chrome
.bluetoothSocket
.AcceptErrorEventData
.prototype.error
;
1012 * Event whose listeners take a AcceptErrorEventData parameter.
1015 chrome
.bluetoothSocket
.AcceptErrorEvent = function() {};
1020 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1022 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.addListener
=
1023 function(callback
) {};
1028 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1030 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.removeListener
=
1031 function(callback
) {};
1036 * !chrome.bluetoothSocket.AcceptErrorEventData): void} callback
1039 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.hasListener
=
1040 function(callback
) {};
1043 /** @return {boolean} */
1044 chrome
.bluetoothSocket
.AcceptErrorEvent
.prototype.hasListeners
=
1048 /** @type {!chrome.bluetoothSocket.AcceptErrorEvent} */
1049 chrome
.bluetoothSocket
.onAcceptError
;
1055 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceive
1057 chrome
.bluetoothSocket
.ReceiveEventData = function() {};
1060 /** @type {number} */
1061 chrome
.bluetoothSocket
.ReceiveEventData
.prototype.socketId
;
1064 /** @type {!ArrayBuffer} */
1065 chrome
.bluetoothSocket
.ReceiveEventData
.prototype.data
;
1070 * Event whose listeners take a ReceiveEventData parameter.
1073 chrome
.bluetoothSocket
.ReceiveEvent = function() {};
1077 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1079 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.addListener
=
1080 function(callback
) {};
1084 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1086 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.removeListener
=
1087 function(callback
) {};
1091 * @param {function(!chrome.bluetoothSocket.ReceiveEventData): void} callback
1094 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.hasListener
=
1095 function(callback
) {};
1098 /** @return {boolean} */
1099 chrome
.bluetoothSocket
.ReceiveEvent
.prototype.hasListeners = function() {};
1102 /** @type {!chrome.bluetoothSocket.ReceiveEvent} */
1103 chrome
.bluetoothSocket
.onReceive
;
1109 * @see https://developer.chrome.com/apps/bluetoothSocket#event-onReceiveError
1111 chrome
.bluetoothSocket
.ReceiveErrorEventData = function() {};
1114 /** @type {number} */
1115 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.socketId
;
1118 /** @type {string} */
1119 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.errorMessage
;
1122 /** @type {string} */
1123 chrome
.bluetoothSocket
.ReceiveErrorEventData
.prototype.error
;
1128 * Event whose listeners take a ReceiveErrorEventData parameter.
1131 chrome
.bluetoothSocket
.ReceiveErrorEvent = function() {};
1136 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1138 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.addListener
=
1139 function(callback
) {};
1144 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1146 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.removeListener
=
1147 function(callback
) {};
1152 * !chrome.bluetoothSocket.ReceiveErrorEventData): void} callback
1155 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.hasListener
=
1156 function(callback
) {};
1159 /** @return {boolean} */
1160 chrome
.bluetoothSocket
.ReceiveErrorEvent
.prototype.hasListeners
=
1164 /** @type {!chrome.bluetoothSocket.ReceiveErrorEvent} */
1165 chrome
.bluetoothSocket
.onReceiveError
;
1169 * @see http://developer.chrome.com/extensions/commands.html
1172 chrome
.commands
= {};
1176 * @param {function(Array.<string>): void} callback Callback function.
1178 chrome
.commands
.getAll = function(callback
) {};
1181 /** @type {!ChromeEvent} */
1182 chrome
.commands
.onCommand
;
1186 * @see https://developer.chrome.com/apps/copresence
1189 chrome
.copresence
= {};
1194 * lowPower: (boolean|undefined),
1195 * onlyBroadcast: (boolean|undefined),
1196 * onlyScan: (boolean|undefined),
1197 * audible: (boolean|undefined)
1199 * @see https://developer.chrome.com/apps/copresence#type-Strategy
1201 chrome
.copresence
.Strategy
;
1207 * payload: ArrayBuffer
1209 * @see https://developer.chrome.com/apps/copresence#type-Message
1211 chrome
.copresence
.Message
;
1216 * onlyEarshot: (boolean|undefined)
1218 * https://developer.chrome.com/apps/copresence#type-AccessPolicy
1220 chrome
.copresence
.AccessPolicy
;
1226 * message: !chrome.copresence.Message,
1227 * timeToLiveMillis: (number|undefined),
1228 * policy: (!chrome.copresence.AccessPolicy|undefined),
1229 * strategies: (!chrome.copresence.Strategy|undefined)
1231 * @see https://developer.chrome.com/apps/copresence#type-PublishOperation
1233 chrome
.copresence
.PublishOperation
;
1236 /** @typedef {?{type: string}} */
1237 chrome
.copresence
.SubscriptionFilter
;
1243 * filter: !chrome.copresence.SubscriptionFilter,
1244 * timeToLiveMillis: (number|undefined),
1245 * strategies: (!chrome.copresence.Strategy|undefined)
1247 * @see https://developer.chrome.com/apps/copresence#type-SubscribeOperation
1249 chrome
.copresence
.SubscribeOperation
;
1254 * unpublishId: string
1256 * @see https://developer.chrome.com/apps/copresence#type-UnpublishOperation
1258 chrome
.copresence
.UnpublishOperation
;
1263 * unsubscribeId: string
1265 * @see https://developer.chrome.com/apps/copresence#type-UnsubscribeOperation
1267 chrome
.copresence
.UnsubscribeOperation
;
1272 * publish: (!chrome.copresence.PublishOperation|undefined),
1273 * subscribe: (!chrome.copresence.SubscribeOperation|undefined),
1274 * unpublish: (!chrome.copresence.UnpublishOperation|undefined),
1275 * unsubscribe: (!chrome.copresence.UnsubscribeOperation|undefined)
1277 * @see https://developer.chrome.com/apps/copresence#type-Operation
1279 chrome
.copresence
.Operation
;
1283 * @param {!Array.<!chrome.copresence.Operation>} operations
1284 * @param {function(string): void} callback
1285 * @see https://developer.chrome.com/apps/copresence#method-execute
1287 chrome
.copresence
.execute = function(operations
, callback
) {};
1292 * Event whose listeners take a subscription id and received messages as a
1295 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1297 chrome
.copresence
.MessagesReceivedEvent = function() {};
1301 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1303 chrome
.copresence
.MessagesReceivedEvent
.prototype.addListener
=
1304 function(callback
) {};
1308 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1310 chrome
.copresence
.MessagesReceivedEvent
.prototype.removeListener
=
1311 function(callback
) {};
1315 * @param {function(string, !Array.<!chrome.copresence.Message>): void} callback
1318 chrome
.copresence
.MessagesReceivedEvent
.prototype.hasListener
=
1319 function(callback
) {};
1322 /** @return {boolean} */
1323 chrome
.copresence
.MessagesReceivedEvent
.prototype.hasListeners = function() {};
1327 * @type {!chrome.copresence.MessagesReceivedEvent}
1328 * @see https://developer.chrome.com/apps/copresence#event-onMessagesReceived
1330 chrome
.copresence
.onMessagesReceived
;
1334 * @type {!ChromeStringEvent}
1335 * @see https://developer.chrome.com/apps/copresence#event-onStatusUpdated
1337 chrome
.copresence
.onStatusUpdated
;
1341 * @see https://developer.chrome.com/extensions/extension.html
1344 chrome
.extension
= {};
1347 /** @type {!Object|undefined} */
1348 chrome
.extension
.lastError
= {};
1352 * @type {string|undefined}
1354 chrome
.extension
.lastError
.message
;
1357 /** @type {boolean|undefined} */
1358 chrome
.extension
.inIncognitoContext
;
1361 // TODO: change Object to !Object when it's clear nobody is passing in null
1362 // TODO: change Port to !Port since it should never be null
1364 * @param {string|Object.<string>=} opt_extensionIdOrConnectInfo Either the
1365 * extensionId to connect to, in which case connectInfo params can be
1366 * passed in the next optional argument, or the connectInfo params.
1367 * @param {Object.<string>=} opt_connectInfo The connectInfo object,
1368 * if arg1 was the extensionId to connect to.
1369 * @return {Port} New port.
1371 chrome
.extension
.connect = function(
1372 opt_extensionIdOrConnectInfo
, opt_connectInfo
) {};
1376 * @return {Window} The global JS object for the background page.
1378 chrome
.extension
.getBackgroundPage = function() {};
1382 * @param {string} path A path to a resource within an extension expressed
1383 * relative to it's install directory.
1384 * @return {string} The fully-qualified URL to the resource.
1386 chrome
.extension
.getURL = function(path
) {};
1390 * @param {Object=} opt_fetchProperties An object with optional 'type' and
1391 * optional 'windowId' keys.
1392 * @return {Array.<Window>} The global JS objects for each content view.
1394 chrome
.extension
.getViews = function(opt_fetchProperties
) {};
1398 * @param {function(boolean): void} callback Callback function.
1400 chrome
.extension
.isAllowedFileSchemeAccess = function(callback
) {};
1404 * @param {function(boolean): void} callback Callback function.
1406 chrome
.extension
.isAllowedIncognitoAccess = function(callback
) {};
1410 * @param {string|*} extensionIdOrRequest Either the extensionId to send the
1411 * request to, in which case the request is passed as the next arg, or the
1413 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1414 * @param {function(*): void=} opt_callback The callback function which
1415 * takes a JSON response object sent by the handler of the request.
1417 chrome
.extension
.sendMessage = function(
1418 extensionIdOrRequest
, opt_request
, opt_callback
) {};
1422 * @param {number|*=} opt_arg1 Either the extensionId to send the request to,
1423 * in which case the request is passed as the next arg, or the request.
1424 * @param {*=} opt_request The request value, if arg1 was the extensionId.
1425 * @param {function(*): void=} opt_callback The callback function which
1426 * takes a JSON response object sent by the handler of the request.
1428 chrome
.extension
.sendRequest = function(opt_arg1
, opt_request
, opt_callback
) {};
1432 * @param {string} data
1434 chrome
.extension
.setUpdateUrlData = function(data
) {};
1437 /** @type {!ChromeEvent} */
1438 chrome
.extension
.onConnect
;
1441 /** @type {!ChromeEvent} */
1442 chrome
.extension
.onConnectExternal
;
1445 /** @type {!ChromeEvent} */
1446 chrome
.extension
.onMessage
;
1449 /** @type {!ChromeEvent} */
1450 chrome
.extension
.onRequest
;
1453 /** @type {!ChromeEvent} */
1454 chrome
.extension
.onRequestExternal
;
1458 * @see https://developer.chrome.com/extensions/runtime.html
1461 chrome
.runtime
= {};
1464 /** @type {!Object|undefined} */
1465 chrome
.runtime
.lastError
= {};
1469 * @type {string|undefined}
1471 chrome
.runtime
.lastError
.message
;
1474 /** @type {string} */
1479 * @param {function(!Window=): void} callback Callback function.
1481 chrome
.runtime
.getBackgroundPage = function(callback
) {};
1486 * Manifest information returned from chrome.runtime.getManifest. See
1487 * http://developer.chrome.com/extensions/manifest.html. Note that there are
1488 * several other fields not included here. They should be added to these externs
1492 chrome
.runtime
.Manifest = function() {};
1495 /** @type {string} */
1496 chrome
.runtime
.Manifest
.prototype.name
;
1499 /** @type {string} */
1500 chrome
.runtime
.Manifest
.prototype.version
;
1503 /** @type {number|undefined} */
1504 chrome
.runtime
.Manifest
.prototype.manifest_version
;
1507 /** @type {string|undefined} */
1508 chrome
.runtime
.Manifest
.prototype.description
;
1511 /** @type {!chrome.runtime.Manifest.Oauth2|undefined} */
1512 chrome
.runtime
.Manifest
.prototype.oauth2
;
1515 /** @type {!Array.<(string|!Object)>} */
1516 chrome
.runtime
.Manifest
.prototype.permissions
;
1521 * Oauth2 info in the manifest.
1522 * See http://developer.chrome.com/apps/app_identity.html#update_manifest.
1525 chrome
.runtime
.Manifest
.Oauth2 = function() {};
1528 /** @type {string} */
1529 chrome
.runtime
.Manifest
.Oauth2
.prototype.client_id
;
1532 /**@type {!Array.<string>} */
1533 chrome
.runtime
.Manifest
.Oauth2
.prototype.scopes
;
1537 * http://developer.chrome.com/extensions/runtime.html#method-getManifest
1538 * @return {!chrome.runtime.Manifest} The full manifest file of the app or
1541 chrome
.runtime
.getManifest = function() {};
1545 * @param {string} path A path to a resource within an extension expressed
1546 * relative to it's install directory.
1547 * @return {string} The fully-qualified URL to the resource.
1549 chrome
.runtime
.getURL = function(path
) {};
1553 * @param {string} url This may be used to clean up server-side data, do
1554 * analytics, and implement surveys. Maximum 255 characters.
1556 chrome
.runtime
.setUninstallUrl = function(url
) {};
1560 * Reloads the app or extension.
1562 chrome
.runtime
.reload = function() {};
1566 * @param {function(string, !Object=): void} callback Called with "throttled",
1567 * "no_update", or "update_available". If an update is available, the object
1568 * contains more information about the available update.
1570 chrome
.runtime
.requestUpdateCheck = function(callback
) {};
1574 * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's
1577 chrome
.runtime
.restart = function() {};
1581 * @param {string|!Object.<string>=} opt_extensionIdOrConnectInfo Either the
1582 * extensionId to connect to, in which case connectInfo params can be
1583 * passed in the next optional argument, or the connectInfo params.
1584 * @param {!Object.<string>=} opt_connectInfo The connectInfo object,
1585 * if arg1 was the extensionId to connect to.
1586 * @return {!Port} New port.
1588 chrome
.runtime
.connect = function(
1589 opt_extensionIdOrConnectInfo
, opt_connectInfo
) {};
1593 * @see http://developer.chrome.com/extensions/runtime.html#method-connectNative
1594 * @param {string} application Name of the registered native messaging host to
1595 * connect to, like 'com.google.your_product'.
1596 * @return {!Port} New port.
1598 chrome
.runtime
.connectNative = function(application
) {};
1602 * @param {string|*} extensionIdOrMessage Either the extensionId to send the
1603 * message to, in which case the message is passed as the next arg, or the
1605 * @param {(*|Object|function(*): void)=} opt_messageOrOptsOrCallback
1607 * The message, if arg1 was the extensionId.
1608 * The options for message sending, if arg1 was the message and this
1609 * argument is not a function.
1610 * The callback, if arg1 was the message and this argument is a function.
1611 * @param {(Object|function(*): void)=} opt_optsOrCallback
1612 * Either the options for message sending, if arg2 was the message,
1614 * @param {function(*): void=} opt_callback The callback function which
1615 * takes a JSON response object sent by the handler of the request.
1617 chrome
.runtime
.sendMessage = function(
1618 extensionIdOrMessage
, opt_messageOrOptsOrCallback
, opt_optsOrCallback
,
1623 * @see http://developer.chrome.com/extensions/runtime.html#method-sendNativeMessage
1624 * @param {string} application Name of the registered native messaging host to
1625 * connect to, like 'com.google.your_product'.
1626 * @param {Object} message The message that will be passed to the native
1628 * @param {function(*)=} opt_callback Called with the response message sent by
1629 * the native messaging host. If an error occurs while connecting to the
1630 * native messaging host, the callback will be called with no arguments and
1631 * chrome.runtime.lastError will be set to the error message.
1633 chrome
.runtime
.sendNativeMessage = function(
1634 application
, message
, opt_callback
) {};
1639 * @param {function(!Object)} callback
1641 chrome
.runtime
.getPlatformInfo = function(callback
) {};
1645 * @param {function(!DirectoryEntry)} callback
1647 chrome
.runtime
.getPackageDirectoryEntry = function(callback
) {};
1650 /** @type {!chrome.runtime.PortEvent} */
1651 chrome
.runtime
.onConnect
;
1654 /** @type {!chrome.runtime.PortEvent} */
1655 chrome
.runtime
.onConnectExternal
;
1658 /** @type {!ChromeObjectEvent} */
1659 chrome
.runtime
.onInstalled
;
1662 /** @type {!chrome.runtime.MessageSenderEvent} */
1663 chrome
.runtime
.onMessage
;
1666 /** @type {!chrome.runtime.MessageSenderEvent} */
1667 chrome
.runtime
.onMessageExternal
;
1670 /** @type {!ChromeEvent} */
1671 chrome
.runtime
.onStartup
;
1674 /** @type {!ChromeEvent} */
1675 chrome
.runtime
.onSuspend
;
1678 /** @type {!ChromeEvent} */
1679 chrome
.runtime
.onSuspendCanceled
;
1682 /** @type {!ChromeObjectEvent} */
1683 chrome
.runtime
.onUpdateAvailable
;
1686 /** @type {!ChromeStringEvent} */
1687 chrome
.runtime
.onRestartRequired
;
1692 * Event whose listeners take a Port parameter.
1695 chrome
.runtime
.PortEvent = function() {};
1699 * @param {function(!Port): void} callback Callback.
1701 chrome
.runtime
.PortEvent
.prototype.addListener = function(callback
) {};
1705 * @param {function(!Port): void} callback Callback.
1707 chrome
.runtime
.PortEvent
.prototype.removeListener = function(callback
) {};
1711 * @param {function(!Port): void} callback Callback.
1714 chrome
.runtime
.PortEvent
.prototype.hasListener = function(callback
) {};
1720 chrome
.runtime
.PortEvent
.prototype.hasListeners = function() {};
1725 * Event whose listeners take a MessageSender and additional parameters.
1726 * @see http://developer.chrome.com/dev/apps/runtime.html#event-onMessage
1729 chrome
.runtime
.MessageSenderEvent = function() {};
1733 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1734 * callback Callback.
1736 chrome
.runtime
.MessageSenderEvent
.prototype.addListener = function(callback
) {};
1740 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1741 * callback Callback.
1743 chrome
.runtime
.MessageSenderEvent
.prototype.removeListener = function(callback
)
1748 * @param {function(*, !MessageSender, function(*): void): (boolean|undefined)}
1749 * callback Callback.
1752 chrome
.runtime
.MessageSenderEvent
.prototype.hasListener = function(callback
) {};
1758 chrome
.runtime
.MessageSenderEvent
.prototype.hasListeners = function() {};
1763 * @see https://developer.chrome.com/extensions/tabs.html
1770 * code: (string|undefined),
1771 * file: (string|undefined),
1772 * allFrames: (boolean|undefined),
1773 * matchAboutBlank: (boolean|undefined),
1774 * runAt: (string|undefined)
1777 chrome
.tabs
.InjectDetails
;
1781 * @see https://developer.chrome.com/extensions/tabs#method-captureVisibleTab
1782 * @param {number|!chrome.types.ImageDetails|function(string):void}
1783 * windowIdOrOptionsOrCallback One of:
1784 * The target window.
1785 * An object defining details about the format and quality of an image, in
1786 * which case the window defaults to the current window.
1787 * A callback function which accepts the data URL string of a JPEG encoding
1788 * of the visible area of the captured tab.
1789 * @param {(!chrome.types.ImageDetails|function(string):void)=}
1790 * opt_optionsOrCallback Either an object defining details about the
1791 * format and quality of an image, or a callback function which accepts the
1792 * data URL string of a JPEG encoding of the visible area of the captured
1794 * @param {function(string):void=} opt_callback A callback function which
1795 * accepts the data URL string of a JPEG encoding of the visible area of the
1798 chrome
.tabs
.captureVisibleTab = function(windowIdOrOptionsOrCallback
,
1799 opt_optionsOrCallback
, opt_callback
) {};
1803 * @param {number} tabId Tab Id.
1804 * @param {{name: (string|undefined)}=} connectInfo Info Object.
1806 chrome
.tabs
.connect = function(tabId
, connectInfo
) {};
1811 * windowId: (number|undefined),
1812 * index: (number|undefined),
1813 * url: (string|undefined),
1814 * active: (boolean|undefined),
1815 * pinned: (boolean|undefined),
1816 * openerTabId: (number|undefined)
1819 chrome
.tabs
.CreateProperties
;
1823 * @param {!chrome.tabs.CreateProperties} createProperties Info object.
1824 * @param {function(!Tab): void=} opt_callback The callback function.
1826 chrome
.tabs
.create = function(createProperties
, opt_callback
) {};
1830 * @see https://developer.chrome.com/extensions/tabs#method-detectLanguage
1831 * @param {number|function(string): void} tabIdOrCallback The tab id, or a
1832 * callback function that will be invoked with the language of the active
1833 * tab in the current window.
1834 * @param {function(string): void=} opt_callback An optional callback function
1835 * that will be invoked with the language of the tab specified as first
1838 chrome
.tabs
.detectLanguage = function(tabIdOrCallback
, opt_callback
) {};
1842 * @see https://developer.chrome.com/extensions/tabs#method-executeScript
1843 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
1844 * Either the id of the tab in which to run the script, or an object
1845 * containing the details of the script to run, in which case the script
1846 * will be executed in the active tab of the current window.
1847 * @param {(!chrome.tabs.InjectDetails|function(!Array.<*>):void)=}
1848 * opt_detailsOrCallback Either an object containing the details of the
1849 * script to run, if the tab id was speficied as first argument, or a
1850 * callback that will be invoked with the result of the execution of the
1851 * script in every injected frame.
1852 * @param {function(!Array.<*>):void=} opt_callback A callback that will be
1853 * invoked with the result of the execution of the script in every
1856 chrome
.tabs
.executeScript = function(tabIdOrDetails
, opt_detailsOrCallback
,
1861 * @param {number} tabId Tab id.
1862 * @param {function(!Tab): void} callback Callback.
1864 chrome
.tabs
.get = function(tabId
, callback
) {};
1868 * Note (2014-05-21): Because this function is deprecated, the types of it's
1869 * parameters were not upgraded to make the first parameter optional and to mark
1870 * the Array and Tab in the callback as non-null.
1872 * @param {number?} windowId Window id.
1873 * @param {function(Array.<Tab>): void} callback Callback.
1874 * @deprecated Please use tabs.query {windowId: windowId}.
1876 chrome
.tabs
.getAllInWindow = function(windowId
, callback
) {};
1880 * @param {function(!Tab=): void} callback Callback.
1882 chrome
.tabs
.getCurrent = function(callback
) {};
1886 * Note (2014-05-21): Because this function is deprecated, the types of it's
1887 * parameters were not upgraded to make the first parameter optional and to mark
1888 * the Array and Tab in the callback as non-null.
1890 * @param {number?} windowId Window id.
1891 * @param {function(Tab): void} callback Callback.
1892 * @deprecated Please use tabs.query({active: true}).
1894 chrome
.tabs
.getSelected = function(windowId
, callback
) {};
1899 * windowId: (number|undefined),
1900 * tabs: (number|!Array.<number>)
1903 chrome
.tabs
.HighlightInfo
;
1907 * @param {!chrome.tabs.HighlightInfo} highlightInfo
1908 * @param {function(!Window): void} callback Callback function invoked
1909 * with each appropriate Window.
1911 chrome
.tabs
.highlight = function(highlightInfo
, callback
) {};
1915 * @link https://developer.chrome.com/extensions/tabs#method-insertCSS
1916 * @param {number|!chrome.tabs.InjectDetails} tabIdOrDetails
1917 * Either the id of the tab in which to run the script, or an object
1918 * containing the details of the CSS to insert, in which case the script
1919 * will be executed in the active tab of the current window.
1920 * @param {(!chrome.tabs.InjectDetails|function():void)=}
1921 * opt_detailsOrCallback Either an object containing the details of the
1922 * CSS to insert, if the tab id was speficied as first argument, or a
1923 * callback that will be invoked after the CSS has been injected.
1924 * @param {function():void=} opt_callback A callback that will be invoked after
1925 * the CSS has been injected.
1927 chrome
.tabs
.insertCSS = function(tabIdOrDetails
, opt_detailsOrCallback
,
1933 * windowId: (number|undefined),
1937 chrome
.tabs
.MoveProperties
;
1941 * @param {number|!Array.<number>} tabId Tab id or array of tab ids.
1942 * @param {!chrome.tabs.MoveProperties} moveProperties
1943 * @param {function((!Tab|!Array.<!Tab>)): void=} opt_callback Callback.
1945 chrome
.tabs
.move = function(tabId
, moveProperties
, opt_callback
) {};
1950 * active: (boolean|undefined),
1951 * pinned: (boolean|undefined),
1952 * highlighted: (boolean|undefined),
1953 * currentWindow: (boolean|undefined),
1954 * lastFocusedWindow: (boolean|undefined),
1955 * status: (string|undefined),
1956 * title: (string|undefined),
1957 * url: (string|undefined),
1958 * windowId: (number|undefined),
1959 * windowType: (string|undefined),
1960 * index: (number|undefined)
1963 chrome
.tabs
.QueryInfo
;
1967 * @param {!chrome.tabs.QueryInfo} queryInfo
1968 * @param {function(!Array.<!Tab>): void} callback Callback.
1970 chrome
.tabs
.query = function(queryInfo
, callback
) {};
1974 * @see https://developer.chrome.com/extensions/tabs#method-query
1975 * @param {number} tabId The ID of the tab which is to be duplicated.
1976 * @param {(function(!Tab=):void)=} opt_callback A callback to be invoked with
1977 * details about the duplicated tab.
1979 chrome
.tabs
.duplicate = function(tabId
, opt_callback
) {};
1984 * bypassCache: (boolean|undefined)
1987 chrome
.tabs
.ReloadProperties
;
1991 * @see https://developer.chrome.com/extensions/tabs#method-reload
1992 * @param {(number|!chrome.tabs.ReloadProperties|function():void)=}
1993 * opt_tabIdOrReloadPropertiesOrCallback One of:
1994 * The ID of the tab to reload; defaults to the selected tab of the current
1996 * An object specifying boolean flags to customize the reload operation.
1997 * A callback to be invoked when the reload is complete.
1998 * @param {(!chrome.tabs.ReloadProperties|function():void)=}
1999 * opt_reloadPropertiesOrCallback Either an object specifying boolean flags
2000 * to customize the reload operation, or a callback to be invoked when the
2001 * reload is complete, if no object needs to be specified.
2002 * @param {function():void=} opt_callback A callback to be invoked when the
2003 * reload is complete.
2005 chrome
.tabs
.reload = function(opt_tabIdOrReloadPropertiesOrCallback
,
2006 opt_reloadPropertiesOrCallback
, opt_callback
) {};
2010 * @param {number|!Array.<number>} tabIds A tab ID or an array of tab IDs.
2011 * @param {function(): void=} opt_callback Callback.
2013 chrome
.tabs
.remove = function(tabIds
, opt_callback
) {};
2017 * @param {number} tabId Tab id.
2018 * @param {*} request The request value of any type.
2019 * @param {function(*): void=} opt_callback The callback function which
2020 * takes a JSON response object sent by the handler of the request.
2022 chrome
.tabs
.sendMessage = function(tabId
, request
, opt_callback
) {};
2026 * @param {number} tabId Tab id.
2027 * @param {*} request The request value of any type.
2028 * @param {function(*): void=} opt_callback The callback function which
2029 * takes a JSON response object sent by the handler of the request.
2030 * @deprecated Please use runtime.sendMessage.
2032 chrome
.tabs
.sendRequest = function(tabId
, request
, opt_callback
) {};
2037 * url: (string|undefined),
2038 * active: (boolean|undefined),
2039 * highlighted: (boolean|undefined),
2040 * pinned: (boolean|undefined),
2041 * openerTabId: (number|undefined)
2044 chrome
.tabs
.UpdateProperties
;
2048 * @see https://developer.chrome.com/extensions/tabs#method-update
2049 * @param {number|!chrome.tabs.UpdateProperties} tabIdOrUpdateProperties
2050 * Either the id of the tab to update, or an object with new property
2051 * values, in which case the selected tab of the current window will be
2053 * @param {(!chrome.tabs.UpdateProperties|function(Tab):void)=}
2054 * opt_updatePropertiesOrCallback Either an object with new property values,
2055 * if the tabId was specified as first parameter, or an optional callback
2056 * that will be invoked with information about the tab being updated.
2057 * @param {function(!Tab=): void=} opt_callback An optional callback that will
2058 * be invoked with information about the tab being updated.
2060 chrome
.tabs
.update = function(tabIdOrUpdateProperties
,
2061 opt_updatePropertiesOrCallback
, opt_callback
) {};
2065 * @type {!ChromeEvent}
2066 * @deprecated Please use tabs.onActivated.
2068 chrome
.tabs
.onActiveChanged
;
2071 /** @type {!ChromeEvent} */
2072 chrome
.tabs
.onActivated
;
2075 /** @type {!ChromeEvent} */
2076 chrome
.tabs
.onAttached
;
2079 /** @type {!ChromeEvent} */
2080 chrome
.tabs
.onCreated
;
2083 /** @type {!ChromeEvent} */
2084 chrome
.tabs
.onDetached
;
2088 * @type {!ChromeEvent}
2089 * @deprecated Please use tabs.onHighlighted.
2091 chrome
.tabs
.onHighlightChanged
;
2095 * @type {!ChromeEvent}
2097 chrome
.tabs
.onHighlighted
;
2100 /** @type {!ChromeEvent} */
2101 chrome
.tabs
.onMoved
;
2104 /** @type {!ChromeEvent} */
2105 chrome
.tabs
.onRemoved
;
2108 /** @type {!ChromeEvent} */
2109 chrome
.tabs
.onUpdated
;
2112 /** @type {!ChromeEvent} */
2113 chrome
.tabs
.onReplaced
;
2116 // TODO(user): Remove once all usage has been confirmed to have ended.
2120 * @type {!ChromeEvent}
2121 * @deprecated Please use tabs.onActivated.
2123 chrome
.tabs
.onSelectionChanged
;
2128 * @see https://developer.chrome.com/extensions/windows.html
2130 chrome
.windows
= {};
2134 * @param {Object=} opt_createData May have many keys to specify parameters.
2136 * @param {function(ChromeWindow): void=} opt_callback Callback.
2138 chrome
.windows
.create = function(opt_createData
, opt_callback
) {};
2142 * @param {number} id Window id.
2143 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2144 * @param {function(!ChromeWindow): void=} opt_callback Callback when
2145 * opt_getInfo is an object.
2147 chrome
.windows
.get = function(id
, opt_getInfo
, opt_callback
) {};
2151 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2152 * @param {function(!Array.<!ChromeWindow>): void=} opt_callback Callback.
2154 chrome
.windows
.getAll = function(opt_getInfo
, opt_callback
) {};
2158 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2159 * @param {function(ChromeWindow): void=} opt_callback Callback.
2161 chrome
.windows
.getCurrent = function(opt_getInfo
, opt_callback
) { };
2165 * @param {Object=} opt_getInfo May have 'populate' key. Or the callback.
2166 * @param {function(ChromeWindow): void=} opt_callback Callback.
2168 chrome
.windows
.getLastFocused = function(opt_getInfo
, opt_callback
) { };
2172 * @param {number} tabId Tab Id.
2173 * @param {function(): void=} opt_callback Callback.
2175 chrome
.windows
.remove = function(tabId
, opt_callback
) {};
2179 * @param {number} tabId Tab Id.
2180 * @param {Object} updateProperties An object which may have many keys for
2182 * @param {function(): void=} opt_callback Callback.
2184 chrome
.windows
.update = function(tabId
, updateProperties
, opt_callback
) {};
2187 /** @type {!ChromeEvent} */
2188 chrome
.windows
.onCreated
;
2191 /** @type {!ChromeEvent} */
2192 chrome
.windows
.onFocusChanged
;
2195 /** @type {!ChromeEvent} */
2196 chrome
.windows
.onRemoved
;
2200 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_NONE
2203 chrome
.windows
.WINDOW_ID_NONE
;
2207 * @see https://developer.chrome.com/extensions/windows.html#property-WINDOW_ID_CURRENT
2210 chrome
.windows
.WINDOW_ID_CURRENT
;
2215 * @see https://developer.chrome.com/extensions/i18n.html
2221 * @param {function(Array.<string>): void} callback The callback function which
2222 * accepts an array of the accept languages of the browser, such as
2223 * 'en-US','en','zh-CN'.
2225 chrome
.i18n
.getAcceptLanguages = function(callback
) {};
2229 * @param {string} messageName
2230 * @param {(string|Array.<string>)=} opt_args
2233 chrome
.i18n
.getMessage = function(messageName
, opt_args
) {};
2239 chrome
.i18n
.getUILanguage = function() {};
2244 * @see https://developer.chrome.com/extensions/pageAction.html
2246 chrome
.pageAction
= {};
2250 * @param {number} tabId Tab Id.
2252 chrome
.pageAction
.hide = function(tabId
) {};
2256 * @param {Object} details An object which has 'tabId' and either
2257 * 'imageData' or 'path'.
2259 chrome
.pageAction
.setIcon = function(details
) {};
2263 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2265 chrome
.pageAction
.setPopup = function(details
) {};
2269 * @param {Object} details An object which has 'tabId' and 'title'.
2271 chrome
.pageAction
.setTitle = function(details
) {};
2275 * @param {number} tabId Tab Id.
2277 chrome
.pageAction
.show = function(tabId
) {};
2280 /** @type {!ChromeEvent} */
2281 chrome
.pageAction
.onClicked
;
2287 chrome
.browser
= {};
2291 * @param {{url: string}} details An object with a single 'url' key.
2292 * @param {function(): void} callback The callback function. If an error occurs
2293 * opening the URL, chrome.runtime.lastError will be set to the error message.
2295 chrome
.browser
.openTab = function(details
, callback
) {};
2300 * @see https://developer.chrome.com/extensions/browserAction.html
2302 chrome
.browserAction
= {};
2306 * @param {Object} details An object whose keys are 'color' and
2307 * optionally 'tabId'.
2309 chrome
.browserAction
.setBadgeBackgroundColor = function(details
) {};
2313 * @param {Object} details An object whose keys are 'text' and
2314 * optionally 'tabId'.
2316 chrome
.browserAction
.setBadgeText = function(details
) {};
2320 * @param {Object} details An object which may have 'imageData',
2321 * 'path', or 'tabId' as keys.
2323 chrome
.browserAction
.setIcon = function(details
) {};
2327 * @param {Object} details An object which may have 'popup' or 'tabId' as keys.
2329 chrome
.browserAction
.setPopup = function(details
) {};
2333 * @param {Object} details An object which has 'title' and optionally
2336 chrome
.browserAction
.setTitle = function(details
) {};
2339 /** @type {!ChromeEvent} */
2340 chrome
.browserAction
.onClicked
;
2344 * @param {number} tabId the ID of the tab on which to disable this action.
2346 chrome
.browserAction
.disable = function(tabId
) {};
2350 * @param {number} tabId the ID of the tab on which to enable this action.
2352 chrome
.browserAction
.enable = function(tabId
) {};
2357 * @see https://developer.chrome.com/extensions/bookmarks.html
2359 chrome
.bookmarks
= {};
2364 * parentId: (string|undefined),
2365 * index: (number|undefined),
2366 * url: (string|undefined),
2367 * title: (string|undefined)
2369 * @see https://developer.chrome.com/extensions/bookmarks#method-create
2371 chrome
.bookmarks
.CreateDetails
;
2376 * query: (string|undefined),
2377 * url: (string|undefined),
2378 * title: (string|undefined)
2380 * @see https://developer.chrome.com/extensions/bookmarks#method-search
2382 chrome
.bookmarks
.SearchDetails
;
2386 * @param {(string|Array.<string>)} idOrIdList
2387 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2388 * callback function which accepts an array of BookmarkTreeNode.
2389 * @return {Array.<BookmarkTreeNode>}
2391 chrome
.bookmarks
.get = function(idOrIdList
, callback
) {};
2395 * @param {string} id
2396 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2397 * callback function which accepts an array of BookmarkTreeNode.
2398 * @return {Array.<BookmarkTreeNode>}
2400 chrome
.bookmarks
.getChildren = function(id
, callback
) {};
2404 * @param {number} numberOfItems The number of items to return.
2405 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2406 * callback function which accepts an array of BookmarkTreeNode.
2407 * @return {Array.<BookmarkTreeNode>}
2409 chrome
.bookmarks
.getRecent = function(numberOfItems
, callback
) {};
2413 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2414 * callback function which accepts an array of BookmarkTreeNode.
2415 * @return {Array.<BookmarkTreeNode>}
2417 chrome
.bookmarks
.getTree = function(callback
) {};
2421 * @param {string} id The ID of the root of the subtree to retrieve.
2422 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2423 * callback function which accepts an array of BookmarkTreeNode.
2424 * @return {Array.<BookmarkTreeNode>}
2426 chrome
.bookmarks
.getSubTree = function(id
, callback
) {};
2430 * @param {string|!chrome.bookmarks.SearchDetails} query
2431 * @param {function(Array.<BookmarkTreeNode>): void} callback
2432 * @return {Array.<BookmarkTreeNode>}
2434 chrome
.bookmarks
.search = function(query
, callback
) {};
2438 * @param {chrome.bookmarks.CreateDetails} bookmark
2439 * @param {function(BookmarkTreeNode): void=} opt_callback The
2440 * callback function which accepts a BookmarkTreeNode object.
2442 chrome
.bookmarks
.create = function(bookmark
, opt_callback
) {};
2446 * @param {string} id
2447 * @param {Object} destination An object which has optional 'parentId' and
2449 * @param {function(BookmarkTreeNode): void=} opt_callback
2450 * The callback function which accepts a BookmarkTreeNode object.
2452 chrome
.bookmarks
.move = function(id
, destination
, opt_callback
) {};
2456 * @param {string} id
2457 * @param {Object} changes An object which may have 'title' as a key.
2458 * @param {function(BookmarkTreeNode): void=} opt_callback The
2459 * callback function which accepts a BookmarkTreeNode object.
2461 chrome
.bookmarks
.update = function(id
, changes
, opt_callback
) {};
2465 * @param {string} id
2466 * @param {function(): void=} opt_callback
2468 chrome
.bookmarks
.remove = function(id
, opt_callback
) {};
2472 * @param {string} id
2473 * @param {function(): void=} opt_callback
2475 chrome
.bookmarks
.removeTree = function(id
, opt_callback
) {};
2479 * @param {function(): void=} opt_callback
2481 chrome
.bookmarks
.import = function(opt_callback
) {};
2485 * @param {function(): void=} opt_callback
2487 chrome
.bookmarks
.export = function(opt_callback
) {};
2490 /** @type {!ChromeEvent} */
2491 chrome
.bookmarks
.onChanged
;
2494 /** @type {!ChromeEvent} */
2495 chrome
.bookmarks
.onChildrenReordered
;
2498 /** @type {!ChromeEvent} */
2499 chrome
.bookmarks
.onCreated
;
2502 /** @type {!ChromeEvent} */
2503 chrome
.bookmarks
.onImportBegan
;
2506 /** @type {!ChromeEvent} */
2507 chrome
.bookmarks
.onImportEnded
;
2510 /** @type {!ChromeEvent} */
2511 chrome
.bookmarks
.onMoved
;
2514 /** @type {!ChromeEvent} */
2515 chrome
.bookmarks
.onRemoved
;
2521 * description: string
2529 * @see https://developer.chrome.com/extensions/omnibox.html
2531 chrome
.omnibox
= {};
2536 chrome
.omnibox
.InputChangedEvent = function() {};
2540 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2542 chrome
.omnibox
.InputChangedEvent
.prototype.addListener = function(callback
) {};
2546 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2548 chrome
.omnibox
.InputChangedEvent
.prototype.removeListener
=
2549 function(callback
) {};
2553 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2556 chrome
.omnibox
.InputChangedEvent
.prototype.hasListener = function(callback
) {};
2559 /** @return {boolean} */
2560 chrome
.omnibox
.InputChangedEvent
.prototype.hasListeners = function() {};
2565 chrome
.omnibox
.InputEnteredEvent = function() {};
2568 /** @param {function(string, string): void} callback */
2569 chrome
.omnibox
.InputEnteredEvent
.prototype.addListener = function(callback
) {};
2572 /** @param {function(string, string): void} callback */
2573 chrome
.omnibox
.InputEnteredEvent
.prototype.removeListener
=
2574 function(callback
) {};
2578 * @param {function(string, string): void} callback
2581 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListener = function(callback
) {};
2584 /** @return {boolean} */
2585 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListeners = function() {};
2589 * @param {{description: string}} suggestion A partial SuggestResult object.
2591 chrome
.omnibox
.setDefaultSuggestion = function(suggestion
) {};
2594 /** @type {!ChromeEvent} */
2595 chrome
.omnibox
.onInputCancelled
;
2598 /** @type {!chrome.omnibox.InputChangedEvent} */
2599 chrome
.omnibox
.onInputChanged
;
2602 /** @type {!chrome.omnibox.InputEnteredEvent} */
2603 chrome
.omnibox
.onInputEntered
;
2606 /** @type {!ChromeEvent} */
2607 chrome
.omnibox
.onInputStarted
;
2612 * @see https://developer.chrome.com/extensions/dev/contextMenus.html
2614 chrome
.contextMenus
= {};
2619 * type: (string|undefined),
2620 * id: (string|undefined),
2621 * title: (string|undefined),
2622 * checked: (boolean|undefined),
2623 * contexts: (!Array.<string>|undefined),
2624 * onclick: (function(!Object, !Tab)|undefined),
2625 * parentId: (number|string|undefined),
2626 * documentUrlPatterns: (!Array.<string>|undefined),
2627 * targetUrlPatterns: (!Array.<string>|undefined),
2628 * enabled: (boolean|undefined)
2630 * @see https://developer.chrome.com/extensions/contextMenus#method-create
2632 chrome
.contextMenus
.CreateProperties
;
2637 * type: (string|undefined),
2638 * title: (string|undefined),
2639 * checked: (boolean|undefined),
2640 * contexts: (!Array.<string>|undefined),
2641 * onclick: (function(!Object, !Tab)|undefined),
2642 * parentId: (number|string|undefined),
2643 * documentUrlPatterns: (!Array.<string>|undefined),
2644 * targetUrlPatterns: (!Array.<string>|undefined),
2645 * enabled: (boolean|undefined)
2647 * @see https://developer.chrome.com/extensions/contextMenus#method-update
2649 chrome
.contextMenus
.UpdateProperties
;
2653 * @param {!chrome.contextMenus.CreateProperties} createProperties
2654 * @param {function()=} opt_callback
2655 * @return {(number|string)} The id of the newly created window.
2656 * @see https://developer.chrome.com/extensions/contextMenus#method-create
2658 chrome
.contextMenus
.create = function(createProperties
, opt_callback
) {};
2662 * @param {(number|string)} id
2663 * @param {!chrome.contextMenus.UpdateProperties} updateProperties
2664 * @param {function()=} opt_callback
2665 * @see https://developer.chrome.com/extensions/contextMenus#method-update
2667 chrome
.contextMenus
.update = function(id
, updateProperties
, opt_callback
) {};
2671 * @param {(number|string)} menuItemId
2672 * @param {function()=} opt_callback
2673 * @see https://developer.chrome.com/extensions/contextMenus#method-remove
2675 chrome
.contextMenus
.remove = function(menuItemId
, opt_callback
) {};
2679 * @param {function()=} opt_callback
2680 * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
2682 chrome
.contextMenus
.removeAll = function(opt_callback
) {};
2687 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
2689 chrome
.contextMenus
.ClickedEvent = function() {};
2693 * @param {function(!Object, !Tab=)} callback
2695 chrome
.contextMenus
.ClickedEvent
.prototype.addListener = function(callback
) {};
2699 * @param {function(!Object, !Tab=)} callback
2701 chrome
.contextMenus
.ClickedEvent
.prototype.removeListener
=
2702 function(callback
) {};
2706 * @param {function(!Object, !Tab=)} callback
2709 chrome
.contextMenus
.ClickedEvent
.prototype.hasListener = function(callback
) {};
2715 chrome
.contextMenus
.ClickedEvent
.prototype.hasListeners = function() {};
2719 * @type {!chrome.contextMenus.ClickedEvent}
2720 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
2722 chrome
.contextMenus
.onClicked
;
2727 * @see https://developer.chrome.com/extensions/dev/cookies.html
2729 chrome
.cookies
= {};
2733 * This typedef is used for the parameters to chrome.cookies.get,
2734 * chrome.cookies.remove, and for the parameter to remove's callback. These uses
2735 * all identify a single cookie uniquely without specifying its content, and the
2736 * objects are identical except for the the storeId being optional vs required.
2737 * If greater divergence occurs, then going to two typedefs is recommended.
2742 * storeId: (string|undefined)
2745 chrome
.cookies
.CookieIdentifier
;
2749 * @param {!chrome.cookies.CookieIdentifier} details
2750 * @param {function(Cookie=): void} callback
2752 chrome
.cookies
.get = function(details
, callback
) {};
2756 * @param {Object} details
2757 * @param {function(Array.<Cookie>): void} callback
2759 chrome
.cookies
.getAll = function(details
, callback
) {};
2763 * @param {function(Array.<CookieStore>): void} callback
2765 chrome
.cookies
.getAllCookieStores = function(callback
) {};
2769 * @param {!chrome.cookies.CookieIdentifier} details
2770 * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
2771 * removal failed for any reason, the parameter will be "null", and
2772 * "chrome.runtime.lastError" will be set.
2774 chrome
.cookies
.remove = function(details
, opt_callback
) {};
2780 * name: (string|undefined),
2781 * value: (string|undefined),
2782 * domain: (string|undefined),
2783 * path: (string|undefined),
2784 * secure: (boolean|undefined),
2785 * httpOnly: (boolean|undefined),
2786 * expirationDate: (number|undefined),
2787 * storeId: (string|undefined)
2790 chrome
.cookies
.CookieSetDetails
;
2794 * @param {!chrome.cookies.CookieSetDetails} details
2795 * @param {function(Cookie): void=} opt_callback If setting failed for any
2796 * reason, the parameter will be "null", and "chrome.runtime.lastError" will
2799 chrome
.cookies
.set = function(details
, opt_callback
) {};
2803 * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
2804 * @type {!ChromeEvent}
2806 chrome
.cookies
.onChanged
;
2811 function CookieChangeInfo() {}
2814 /** @type {boolean} */
2815 CookieChangeInfo
.prototype.removed
;
2818 /** @type {Cookie} */
2819 CookieChangeInfo
.prototype.cookie
;
2822 /** @type {string} */
2823 CookieChangeInfo
.prototype.cause
;
2827 chrome
.management
= {};
2832 * showConfirmDialog: (boolean|undefined)
2835 chrome
.management
.InstallOptions
;
2839 * @param {string} id
2840 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
2843 chrome
.management
.get = function(id
, opt_callback
) {};
2847 * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
2848 * callback function.
2849 * @return {!Array.<!ExtensionInfo>}
2851 chrome
.management
.getAll = function(opt_callback
) {};
2855 * @param {string} id The id of an already installed extension.
2856 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2858 chrome
.management
.getPermissionWarningsById = function(id
, opt_callback
) {};
2862 * @param {string} manifestStr Extension's manifest JSON string.
2863 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2865 chrome
.management
.getPermissionWarningsByManifest
=
2866 function(manifestStr
, opt_callback
) {};
2870 * @param {string} id The id of an already installed extension.
2871 * @param {function(): void=} opt_callback Optional callback function.
2873 chrome
.management
.launchApp = function(id
, opt_callback
) {};
2877 * @param {string} id The id of an already installed extension.
2878 * @param {boolean} enabled Whether this item should be enabled.
2879 * @param {function(): void=} opt_callback Optional callback function.
2881 chrome
.management
.setEnabled = function(id
, enabled
, opt_callback
) {};
2885 * @param {string} id The id of an already installed extension.
2886 * @param {(!chrome.management.InstallOptions|function(): void)=}
2887 * opt_optionsOrCallback An optional uninstall options object or an optional
2888 * callback function.
2889 * @param {function(): void=} opt_callback Optional callback function.
2891 chrome
.management
.uninstall
=
2892 function(id
, opt_optionsOrCallback
, opt_callback
) {};
2896 * @param {(!chrome.management.InstallOptions|function(): void)=}
2897 * opt_optionsOrCallback An optional uninstall options object or an optional
2898 * callback function.
2899 * @param {function(): void=} opt_callback An optional callback function.
2901 chrome
.management
.uninstallSelf
=
2902 function(opt_optionsOrCallback
, opt_callback
) {};
2906 * @param {string} id The id of an already installed extension.
2907 * @param {function(): void=} opt_callback Optional callback function.
2909 chrome
.management
.createAppShortcut = function(id
, opt_callback
) {};
2913 * @param {string} id The id of an already installed extension.
2914 * @param {string} launchType The LaunchType enum value to set. Make sure this
2915 * value is in ExtensionInfo.availableLaunchTypes because the available
2916 * launch types vary on different platforms and configurations.
2917 * @param {function(): void=} opt_callback Optional callback function.
2919 chrome
.management
.setLaunchType = function(id
, launchType
, opt_callback
) {};
2923 * @param {string} url The URL of a web page. The scheme of the URL can only be
2924 * "http" or "https".
2925 * @param {string} title The title of the generated app.
2926 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
2929 chrome
.management
.generateAppForLink = function(url
, title
, opt_callback
) {};
2932 /** @type {!ChromeExtensionInfoEvent} */
2933 chrome
.management
.onDisabled
;
2936 /** @type {!ChromeExtensionInfoEvent} */
2937 chrome
.management
.onEnabled
;
2940 /** @type {!ChromeExtensionInfoEvent} */
2941 chrome
.management
.onInstalled
;
2944 /** @type {!ChromeStringEvent} */
2945 chrome
.management
.onUninstalled
;
2950 * @see https://developer.chrome.com/extensions/idle.html
2956 * @param {number} thresholdSeconds Threshold in seconds, used to determine
2957 * when a machine is in the idle state.
2958 * @param {function(string): void} callback Callback to handle the state.
2960 chrome
.idle
.queryState = function(thresholdSeconds
, callback
) {};
2964 * @param {number} intervalInSeconds Threshold, in seconds, used to determine
2965 * when the system is in an idle state.
2967 chrome
.idle
.setDetectionInterval = function(intervalInSeconds
) {};
2970 /** @type {!ChromeEvent} */
2971 chrome
.idle
.onStateChanged
;
2975 * Chrome Text-to-Speech API.
2977 * @see https://developer.chrome.com/extensions/tts.html
2984 * An event from the TTS engine to communicate the status of an utterance.
2987 function TtsEvent() {}
2990 /** @type {string} */
2991 TtsEvent
.prototype.type
;
2994 /** @type {number} */
2995 TtsEvent
.prototype.charIndex
;
2998 /** @type {string} */
2999 TtsEvent
.prototype.errorMessage
;
3004 * A description of a voice available for speech synthesis.
3007 function TtsVoice() {}
3010 /** @type {string} */
3011 TtsVoice
.prototype.voiceName
;
3014 /** @type {string} */
3015 TtsVoice
.prototype.lang
;
3018 /** @type {string} */
3019 TtsVoice
.prototype.gender
;
3022 /** @type {string} */
3023 TtsVoice
.prototype.extensionId
;
3026 /** @type {Array.<string>} */
3027 TtsVoice
.prototype.eventTypes
;
3031 * Gets an array of all available voices.
3032 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
3035 chrome
.tts
.getVoices = function(opt_callback
) {};
3039 * Checks if the engine is currently speaking.
3040 * @param {function(boolean)=} opt_callback The callback function.
3042 chrome
.tts
.isSpeaking = function(opt_callback
) {};
3046 * Speaks text using a text-to-speech engine.
3047 * @param {string} utterance The text to speak, either plain text or a complete,
3048 * well-formed SSML document. Speech engines that do not support SSML will
3049 * strip away the tags and speak the text. The maximum length of the text is
3050 * 32,768 characters.
3051 * @param {Object=} opt_options The speech options.
3052 * @param {function()=} opt_callback Called right away, before speech finishes.
3054 chrome
.tts
.speak = function(utterance
, opt_options
, opt_callback
) {};
3058 * Stops any current speech.
3060 chrome
.tts
.stop = function() {};
3065 * @see https://developer.chrome.com/extensions/ttsEngine.html
3067 chrome
.ttsEngine
= {};
3070 /** @type {!ChromeEvent} */
3071 chrome
.ttsEngine
.onSpeak
;
3074 /** @type {!ChromeEvent} */
3075 chrome
.ttsEngine
.onStop
;
3080 * @see https://developer.chrome.com/extensions/contentSettings.html
3082 chrome
.contentSettings
= {};
3085 /** @type {!ContentSetting} */
3086 chrome
.contentSettings
.cookies
;
3089 /** @type {!ContentSetting} */
3090 chrome
.contentSettings
.images
;
3093 /** @type {!ContentSetting} */
3094 chrome
.contentSettings
.javascript
;
3097 /** @type {!ContentSetting} */
3098 chrome
.contentSettings
.plugins
;
3101 /** @type {!ContentSetting} */
3102 chrome
.contentSettings
.popups
;
3105 /** @type {!ContentSetting} */
3106 chrome
.contentSettings
.notifications
;
3111 * @see https://developer.chrome.com/extensions/fileBrowserHandler
3113 chrome
.fileBrowserHandler
= {};
3118 * suggestedName: string,
3119 * allowedFileExtensions: (!Array.<string>|undefined)
3122 chrome
.fileBrowserHandler
.SelectFileSelectionParams
;
3126 * Prompts user to select file path under which file should be saved.
3127 * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3128 * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3129 * Parameters that will be used while selecting the file.
3130 * @param {function(!Object)} callback Function called upon completion.
3132 chrome
.fileBrowserHandler
.selectFile = function(selectionParams
, callback
) {};
3137 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3139 chrome
.fileBrowserHandler
.ExecuteEvent = function() {};
3143 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3145 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.addListener = function(
3150 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3152 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.removeListener = function(
3157 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3160 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.hasListener = function(
3167 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.hasListeners = function() {};
3171 * Fired when file system action is executed from ChromeOS file browser.
3172 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3173 * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3175 chrome
.fileBrowserHandler
.onExecute
;
3180 * @see https://developer.chrome.com/extensions/gcm
3186 * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3189 chrome
.gcm
.MAX_MESSAGE_SIZE
;
3193 * Registers the application with GCM. The registration ID will be returned by
3194 * the callback. If register is called again with the same list of senderIds,
3195 * the same registration ID will be returned.
3196 * @see https://developer.chrome.com/extensions/gcm#method-register
3197 * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
3198 * send messages to the application.
3199 * @param {function(string): void} callback Function called when
3200 * registration completes with registration ID as argument.
3202 chrome
.gcm
.register = function(senderIds
, callback
) {};
3206 * Unregisters the application from GCM.
3207 * @see https://developer.chrome.com/extensions/gcm#method-unregister
3208 * @param {function(): void} callback Called when unregistration is done.
3210 chrome
.gcm
.unregister = function(callback
) {};
3214 * Sends an upstream message using GCM.
3215 * @see https://developer.chrome.com/extensions/gcm#method-send
3216 * @param {!chrome.gcm.Message} message Message to be sent.
3217 * @param {function(string): void} callback Called with message ID.
3219 chrome
.gcm
.send = function(message
, callback
) {};
3225 * destinationId: string,
3226 * messageId: string,
3227 * timeToLive: (number|undefined),
3228 * data: !Object.<string, string>
3235 * An event, fired when a message is received through GCM.
3236 * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3237 * @type {!chrome.gcm.OnMessageEvent}
3239 chrome
.gcm
.onMessage
;
3243 * An event, fired when GCM server had to delete messages to the application
3244 * from its queue in order to manage its size.
3245 * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3246 * @type {!ChromeEvent}
3248 chrome
.gcm
.onMessagesDeleted
;
3252 * An event indicating problems with sending messages.
3253 * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3254 * @type {!chrome.gcm.OnSendErrorEvent}
3256 chrome
.gcm
.onSendError
;
3263 chrome
.gcm
.OnMessageEvent = function() {};
3267 * @param {function(!Object): void} callback Callback.
3269 chrome
.gcm
.OnMessageEvent
.prototype.addListener = function(callback
) {};
3273 * @param {function(!Object): void} callback Callback.
3275 chrome
.gcm
.OnMessageEvent
.prototype.removeListener = function(callback
) {};
3279 * @param {function(!Object): void} callback Callback.
3282 chrome
.gcm
.OnMessageEvent
.prototype.hasListener = function(callback
) {};
3288 chrome
.gcm
.OnMessageEvent
.prototype.hasListeners = function() {};
3295 chrome
.gcm
.OnSendErrorEvent = function() {};
3299 * @param {function(!Object): void} callback Callback.
3301 chrome
.gcm
.OnSendErrorEvent
.prototype.addListener = function(callback
) {};
3305 * @param {function(!Object): void} callback Callback.
3307 chrome
.gcm
.OnSendErrorEvent
.prototype.removeListener = function(callback
) {};
3311 * @param {function(!Object): void} callback Callback.
3314 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListener = function(callback
) {};
3320 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListeners = function() {};
3325 * @see https://developer.chrome.com/extensions/history.html
3327 chrome
.history
= {};
3331 * @param {Object.<string, string>} details Object with a 'url' key.
3333 chrome
.history
.addUrl = function(details
) {};
3337 * @param {function(): void} callback Callback function.
3339 chrome
.history
.deleteAll = function(callback
) {};
3343 * @param {Object.<string, string>} range Object with 'startTime'
3344 * and 'endTime' keys.
3345 * @param {function(): void} callback Callback function.
3347 chrome
.history
.deleteRange = function(range
, callback
) {};
3351 * @param {Object.<string, string>} details Object with a 'url' key.
3353 chrome
.history
.deleteUrl = function(details
) {};
3357 * @param {Object.<string, string>} details Object with a 'url' key.
3358 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
3359 * @return {!Array.<!VisitItem>}
3361 chrome
.history
.getVisits = function(details
, callback
) {};
3365 * @param {Object.<string, string>} query Object with a 'text' (string)
3366 * key and optional 'startTime' (number), 'endTime' (number) and
3367 * 'maxResults' keys.
3368 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
3369 * @return {!Array.<!HistoryItem>}
3371 chrome
.history
.search = function(query
, callback
) {};
3374 /** @type {!ChromeEvent} */
3375 chrome
.history
.onVisitRemoved
;
3378 /** @type {!ChromeEvent} */
3379 chrome
.history
.onVisited
;
3384 * @see http://developer.chrome.com/apps/identity.html
3385 * TODO: replace TokenDetails, InvalidTokenDetails and
3386 * WebAuthFlowDetails with Object.
3388 chrome
.identity
= {};
3392 * @param {(chrome.identity.TokenDetails|function(string=): void)}
3393 * detailsOrCallback Token options or a callback function if no options are
3395 * @param {function(string=): void=} opt_callback A callback function if options
3398 chrome
.identity
.getAuthToken = function(detailsOrCallback
, opt_callback
) {};
3401 /** @typedef {{interactive: (boolean|undefined)}} */
3402 chrome
.identity
.TokenDetails
;
3406 * @param {chrome.identity.InvalidTokenDetails} details
3407 * @param {function(): void} callback
3409 chrome
.identity
.removeCachedAuthToken = function(details
, callback
) {};
3412 /** @typedef {{token: string}} */
3413 chrome
.identity
.InvalidTokenDetails
;
3417 * @param {chrome.identity.WebAuthFlowDetails} details
3418 * @param {function(string=): void} callback
3420 chrome
.identity
.launchWebAuthFlow = function(details
, callback
) {};
3423 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
3424 chrome
.identity
.WebAuthFlowDetails
;
3427 /** @param {!function(!Object=):void} callback */
3428 chrome
.identity
.getProfileUserInfo = function(callback
) {};
3431 /** @type {!ChromeEvent} */
3432 chrome
.identity
.onSignInChanged
;
3437 * @see https://developer.chrome.com/extensions/input.ime.html
3443 chrome
.input
.ime
= {};
3448 * The OnKeyEvent event takes an extra argument.
3451 function ChromeInputImeOnKeyEventEvent() {}
3455 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3457 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
3459 ChromeInputImeOnKeyEventEvent
.prototype.addListener
=
3460 function(callback
, opt_extraInfoSpec
) {};
3464 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3467 ChromeInputImeOnKeyEventEvent
.prototype.removeListener = function(callback
) {};
3471 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3474 ChromeInputImeOnKeyEventEvent
.prototype.hasListener = function(callback
) {};
3478 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3481 ChromeInputImeOnKeyEventEvent
.prototype.hasListeners = function(callback
) {};
3485 * @param {!Object.<string,number>} parameters An object with a
3486 * 'contextID' (number) key.
3487 * @param {function(boolean): void} callback Callback function.
3489 chrome
.input
.ime
.clearComposition = function(parameters
, callback
) {};
3493 * @param {!Object.<string,(string|number)>} parameters An object with
3494 * 'contextID' (number) and 'text' (string) keys.
3495 * @param {function(boolean): void=} opt_callback Callback function.
3497 chrome
.input
.ime
.commitText = function(parameters
, opt_callback
) {};
3501 * @param {!Object.<string,(string|number)>} parameters An object with
3502 * 'contextID' (number) and 'text' (string) keys.
3503 * @param {function(boolean): void=} opt_callback Callback function.
3505 chrome
.input
.ime
.deleteSurroundingText = function(parameters
, opt_callback
) {};
3509 * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
3510 * parameters An object with 'engineID' (string) and 'properties'
3512 * @param {function(boolean): void=} opt_callback Callback function.
3514 chrome
.input
.ime
.setCandidateWindowProperties
=
3515 function(parameters
, opt_callback
) {};
3519 * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
3520 * parameters An object with 'contextID' (number) and 'candidates'
3521 * (array of object) keys.
3522 * @param {function(boolean): void=} opt_callback Callback function.
3524 chrome
.input
.ime
.setCandidates = function(parameters
, opt_callback
) {};
3528 * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
3529 * parameters An object with 'contextID' (number), 'text' (string),
3530 * 'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
3531 * and 'segments' (array of object) keys.
3532 * @param {function(boolean): void=} opt_callback Callback function.
3534 chrome
.input
.ime
.setComposition = function(parameters
, opt_callback
) {};
3538 * @param {!Object.<string,number>} parameters An object with
3539 * 'contextID' (number) and 'candidateID' (number) keys.
3540 * @param {function(boolean): void=} opt_callback Callback function.
3542 chrome
.input
.ime
.setCursorPosition = function(parameters
, opt_callback
) {};
3546 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3547 * parameters An object with 'engineID' (string) and 'items'
3548 * (array of object) keys.
3549 * @param {function(): void=} opt_callback Callback function.
3551 chrome
.input
.ime
.setMenuItems = function(parameters
, opt_callback
) {};
3555 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3556 * parameters An object with 'engineID' (string) and 'items'
3557 * (array of object) keys.
3558 * @param {function(): void=} opt_callback Callback function.
3560 chrome
.input
.ime
.updateMenuItems = function(parameters
, opt_callback
) {};
3564 * @param {string} requestId Request id of the event that was handled. This
3565 * should come from keyEvent.requestId.
3566 * @param {boolean} response True if the keystroke was handled, false if not.
3568 chrome
.input
.ime
.keyEventHandled = function(requestId
, response
) {};
3571 /** @type {!ChromeEvent} */
3572 chrome
.input
.ime
.onActivate
;
3575 /** @type {!ChromeEvent} */
3576 chrome
.input
.ime
.onBlur
;
3579 /** @type {!ChromeEvent} */
3580 chrome
.input
.ime
.onCandidateClicked
;
3583 /** @type {!ChromeEvent} */
3584 chrome
.input
.ime
.onDeactivated
;
3587 /** @type {!ChromeEvent} */
3588 chrome
.input
.ime
.onFocus
;
3591 /** @type {!ChromeEvent} */
3592 chrome
.input
.ime
.onInputContextUpdate
;
3595 /** @type {!ChromeInputImeOnKeyEventEvent} */
3596 chrome
.input
.ime
.onKeyEvent
;
3599 /** @type {!ChromeEvent} */
3600 chrome
.input
.ime
.onMenuItemActivated
;
3603 /** @type {!ChromeEvent} */
3604 chrome
.input
.ime
.onReset
;
3607 /** @type {!ChromeEvent} */
3608 chrome
.input
.ime
.onSurroundingTextChanged
;
3613 * @see http://developer.chrome.com/apps/mediaGalleries
3616 chrome
.mediaGalleries
= {};
3620 * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
3621 * detailsOrCallback A details object for whether the request should be
3622 * interactive if permissions haven't been granted yet or the callback.
3623 * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
3624 * no details were supplied as arg1.
3626 chrome
.mediaGalleries
.getMediaFileSystems = function(
3627 detailsOrCallback
, opt_callback
) {};
3631 * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
3633 chrome
.mediaGalleries
.addUserSelectedFolder = function(callback
) {};
3635 chrome
.mediaGalleries
.startMediaScan = function() {};
3637 chrome
.mediaGalleries
.cancelMediaScan = function() {};
3641 * @param {function(!Array.<!FileSystem>)} callback Callback function.
3643 chrome
.mediaGalleries
.addScanResults = function(callback
) {};
3649 * galleryId: string,
3650 * deviceId: (string|undefined),
3651 * isRemovable: boolean,
3652 * isMediaDevice: boolean,
3653 * isAvailable: boolean
3656 chrome
.mediaGalleries
.MediaFileSystemMetadata
;
3660 * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
3661 * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
3663 chrome
.mediaGalleries
.getMediaFileSystemMetadata = function(mediaFileSystem
) {};
3667 * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
3668 * callback Callback function.
3670 chrome
.mediaGalleries
.getAllMediaFileSystemMetadata = function(callback
) {};
3676 * height: (number|undefined),
3677 * width: (number|undefined),
3678 * duration: (number|undefined),
3679 * rotation: (number|undefined),
3680 * album: (string|undefined),
3681 * artist: (string|undefined),
3682 * comment: (string|undefined),
3683 * copyright: (string|undefined),
3684 * disc: (number|undefined),
3685 * genre: (string|undefined),
3686 * language: (string|undefined),
3687 * title: (string|undefined),
3688 * track: (number|undefined)
3691 chrome
.mediaGalleries
.MetaData
;
3695 * @param {!Blob} mediaFile The media file for which to get metadata.
3696 * @param {{metadataType: (string|undefined)}|
3697 * function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
3698 * for the metadata to retrieve or the callback to invoke with the metadata.
3699 * The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
3700 * 'all' if the metadataType is omitted.
3701 * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
3702 * were passed as arg2, the callback to invoke with the metadata.
3704 chrome
.mediaGalleries
.getMetadata = function(
3705 mediaFile
, optionsOrCallback
, opt_callback
) {};
3711 * galleryCount: (number|undefined),
3712 * audioCount: (number|undefined),
3713 * imageCount: (number|undefined),
3714 * videoCount: (number|undefined)
3717 chrome
.mediaGalleries
.OnScanProgressDetails
;
3722 * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
3726 chrome
.mediaGalleries
.ScanProgressEvent = function() {};
3729 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3730 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.addListener
=
3731 function(callback
) {};
3734 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3735 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.removeListener
=
3736 function(callback
) {};
3740 * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
3743 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListener
=
3744 function(callback
) {};
3747 /** @return {boolean} */
3748 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListeners = function() {};
3751 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
3752 chrome
.mediaGalleries
.onScanProgress
;
3757 * @see https://developer.chrome.com/extensions/pageCapture.html
3759 chrome
.pageCapture
= {};
3763 * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
3764 * @param {function(Blob=): void} callback Callback function.
3766 chrome
.pageCapture
.saveAsMHTML = function(details
, callback
) {};
3771 * @see https://developer.chrome.com/extensions/permissions.html
3773 chrome
.permissions
= {};
3778 * permissions: (Array.<string>|undefined),
3779 * origins: (Array.<string>|undefined)
3781 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
3783 chrome
.permissions
.Permissions
;
3787 * @param {!chrome.permissions.Permissions} permissions
3788 * @param {function(boolean): void} callback Callback function.
3790 chrome
.permissions
.contains = function(permissions
, callback
) {};
3794 * @param {function(!chrome.permissions.Permissions): void} callback
3795 * Callback function.
3797 chrome
.permissions
.getAll = function(callback
) {};
3801 * @param {!chrome.permissions.Permissions} permissions
3802 * @param {function(boolean): void=} opt_callback Callback function.
3804 chrome
.permissions
.remove = function(permissions
, opt_callback
) {};
3808 * @param {!chrome.permissions.Permissions} permissions
3809 * @param {function(boolean): void=} opt_callback Callback function.
3811 chrome
.permissions
.request = function(permissions
, opt_callback
) {};
3814 /** @type {!ChromeEvent} */
3815 chrome
.permissions
.onAdded
;
3818 /** @type {!ChromeEvent} */
3819 chrome
.permissions
.onRemoved
;
3823 * @see http://developer.chrome.com/dev/extensions/power.html
3829 * @param {string} level A string describing the degree to which power
3830 * management should be disabled, should be either "system" or "display".
3832 chrome
.power
.requestKeepAwake = function(level
) {};
3836 * Releases a request previously made via requestKeepAwake().
3838 chrome
.power
.releaseKeepAwake = function() {};
3843 * @see https://developer.chrome.com/extensions/privacy.html
3845 chrome
.privacy
= {};
3848 /** @type {!Object.<string,!ChromeSetting>} */
3849 chrome
.privacy
.network
;
3852 /** @type {!Object.<string,!ChromeSetting>} */
3853 chrome
.privacy
.services
;
3856 /** @type {!Object.<string,!ChromeSetting>} */
3857 chrome
.privacy
.websites
;
3862 * @see https://developer.chrome.com/extensions/proxy.html
3867 /** @type {!Object.<string,!ChromeSetting>} */
3868 chrome
.proxy
.settings
;
3871 /** @type {!ChromeEvent} */
3872 chrome
.proxy
.onProxyError
;
3877 * @see http://developer.chrome.com/apps/socket.html
3886 chrome
.socket
.CreateInfo = function() {};
3889 /** @type {number} */
3890 chrome
.socket
.CreateInfo
.prototype.socketId
;
3897 chrome
.socket
.ReadInfo = function() {};
3900 /** @type {number} */
3901 chrome
.socket
.ReadInfo
.prototype.resultCode
;
3904 /** @type {!ArrayBuffer} */
3905 chrome
.socket
.ReadInfo
.prototype.data
;
3912 chrome
.socket
.WriteInfo = function() {};
3915 /** @type {number} */
3916 chrome
.socket
.WriteInfo
.prototype.bytesWritten
;
3923 chrome
.socket
.RecvFromInfo = function() {};
3926 /** @type {number} */
3927 chrome
.socket
.RecvFromInfo
.prototype.resultCode
;
3930 /** @type {!ArrayBuffer} */
3931 chrome
.socket
.RecvFromInfo
.prototype.data
;
3934 /** @type {string} */
3935 chrome
.socket
.RecvFromInfo
.prototype.address
;
3938 /** @type {number} */
3939 chrome
.socket
.RecvFromInfo
.prototype.port
;
3946 chrome
.socket
.AcceptInfo = function() {};
3949 /** @type {number} */
3950 chrome
.socket
.AcceptInfo
.prototype.resultCode
;
3953 /** @type {(number|undefined)} */
3954 chrome
.socket
.AcceptInfo
.prototype.socketId
;
3961 chrome
.socket
.SocketInfo = function() {};
3964 /** @type {string} */
3965 chrome
.socket
.SocketInfo
.prototype.socketType
;
3968 /** @type {boolean} */
3969 chrome
.socket
.SocketInfo
.prototype.connected
;
3972 /** @type {(string|undefined)} */
3973 chrome
.socket
.SocketInfo
.prototype.peerAddress
;
3976 /** @type {(number|undefined)} */
3977 chrome
.socket
.SocketInfo
.prototype.peerPort
;
3980 /** @type {(string|undefined)} */
3981 chrome
.socket
.SocketInfo
.prototype.localAddress
;
3984 /** @type {(number|undefined)} */
3985 chrome
.socket
.SocketInfo
.prototype.localPort
;
3992 chrome
.socket
.NetworkAdapterInfo = function() {};
3995 /** @type {string} */
3996 chrome
.socket
.NetworkAdapterInfo
.prototype.name
;
3999 /** @type {string} */
4000 chrome
.socket
.NetworkAdapterInfo
.prototype.address
;
4004 * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4005 * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4006 * socket options or callback.
4007 * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4008 * socket has been created.
4010 chrome
.socket
.create = function(type
, optionsOrCallback
, opt_callback
) {};
4014 * @param {number} socketId The id of the socket to destroy.
4016 chrome
.socket
.destroy = function(socketId
) {};
4020 * @param {number} socketId The id of the socket.
4021 * @param {string} hostname The hostname or IP address of the remote machine.
4022 * @param {number} port The port of the remote machine.
4023 * @param {function(number)} callback Called when the connection attempt is
4026 chrome
.socket
.connect = function(socketId
, hostname
, port
, callback
) {};
4030 * @param {number} socketId The id of the socket.
4031 * @param {string} address The address of the local machine.
4032 * @param {number} port The port of the local machine.
4033 * @param {function(number)} callback Called when the bind attempt is complete.
4035 chrome
.socket
.bind = function(socketId
, address
, port
, callback
) {};
4039 * @param {number} socketId The id of the socket to disconnect.
4041 chrome
.socket
.disconnect = function(socketId
) {};
4045 * @param {number} socketId The id of the socket to read from.
4046 * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4047 * read buffer size or the callback.
4048 * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4049 * that was available to be read without blocking.
4051 chrome
.socket
.read = function(socketId
, bufferSizeOrCallback
, opt_callback
) {};
4055 * @param {number} socketId The id of the socket to write to.
4056 * @param {!ArrayBuffer} data The data to write.
4057 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4058 * operation completes without blocking or an error occurs.
4060 chrome
.socket
.write = function(socketId
, data
, callback
) {};
4064 * @param {number} socketId The id of the socket to read from.
4065 * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4066 * The read buffer size or the callback.
4067 * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4068 * that was available to be read without blocking.
4070 chrome
.socket
.recvFrom = function(socketId
, bufferSizeOrCallback
,
4075 * @param {number} socketId The id of the socket to write to.
4076 * @param {!ArrayBuffer} data The data to write.
4077 * @param {string} address The address of the remote machine.
4078 * @param {number} port The port of the remote machine.
4079 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4080 * operation completes without blocking or an error occurs.
4082 chrome
.socket
.sendTo = function(socketId
, data
, address
, port
, callback
) {};
4086 * @param {number} socketId The id of the socket to listen on.
4087 * @param {string} address The address of the local machine to listen on. Use
4088 * '0' to listen on all addresses.
4089 * @param {number} port The port of the local machine.
4090 * @param {(number|function(number))} backlogOrCallback The length of the
4091 * socket's listen queue or the callback.
4092 * @param {function(number)=} opt_callback Called when the listen operation
4095 chrome
.socket
.listen
=
4096 function(socketId
, address
, port
, backlogOrCallback
, opt_callback
) {};
4100 * @param {number} socketId The id of the socket to accept a connection on.
4101 * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4102 * socket is accepted.
4104 chrome
.socket
.accept = function(socketId
, callback
) {};
4108 * @param {number} socketId The id of the socket to listen on.
4109 * @param {boolean} enable If true, enable keep-alive functionality.
4110 * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4111 * between the last packet received and the first keepalive probe (default
4112 * is 0) or the callback
4113 * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4116 chrome
.socket
.setKeepAlive = function(socketId
, enable
, delayOrCallback
,
4121 * @param {number} socketId The id of the socket to listen on.
4122 * @param {boolean} noDelay If true, disables Nagle's algorithm.
4123 * @param {function(boolean)} callback Called when the setNoDelay attempt is
4126 chrome
.socket
.setNoDelay = function(socketId
, noDelay
, callback
) {};
4130 * @param {number} socketId The id of the socket.
4131 * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4134 chrome
.socket
.getInfo = function(socketId
, callback
) {};
4138 * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
4139 * when local adapter information is available.
4141 chrome
.socket
.getNetworkList = function(callback
) {};
4145 * @param {number} socketId The id of the socket.
4146 * @param {string} address The group address to join. Domain names are not
4148 * @param {function(number)} callback Called when the join operation is done.
4150 chrome
.socket
.joinGroup = function(socketId
, address
, callback
) {};
4154 * @param {number} socketId The id of the socket.
4155 * @param {string} address The group address to leave. Domain names are not
4157 * @param {function(number)} callback Called when the leave operation is done.
4159 chrome
.socket
.leaveGroup = function(socketId
, address
, callback
) {};
4163 * @param {number} socketId The id of the socket.
4164 * @param {number} ttl The time-to-live value.
4165 * @param {function(number)} callback Called when the configuration operation is
4168 chrome
.socket
.setMulticastTimeToLive = function(socketId
, ttl
, callback
) {};
4172 * @param {number} socketId The id of the socket.
4173 * @param {boolean} enabled True to enable loopback mode.
4174 * @param {function(number)} callback Called when the configuration operation is
4177 chrome
.socket
.setMulticastLoopbackMode = function(socketId
, enabled
,
4182 * @param {number} socketId The id of the socket.
4183 * @param {function(!Array.<string>)} callback Called with an array of string
4186 chrome
.socket
.getJoinedGroups = function(socketId
, callback
) {};
4191 * @see https://developer.chrome.com/extensions/storage.html
4193 chrome
.storage
= {};
4196 /** @type {!StorageArea} */
4197 chrome
.storage
.sync
;
4200 /** @type {!StorageArea} */
4201 chrome
.storage
.local
;
4204 /** @type {!StorageChangeEvent} */
4205 chrome
.storage
.onChanged
;
4214 * @see http://developer.chrome.com/apps/system_display.html
4216 chrome
.system
.display
= {};
4219 /** @type {!ChromeEvent} */
4220 chrome
.system
.display
.onDisplayChanged
;
4227 chrome
.system
.display
.Bounds = function() {};
4230 /** @type {number} */
4231 chrome
.system
.display
.Bounds
.prototype.left
;
4234 /** @type {number} */
4235 chrome
.system
.display
.Bounds
.prototype.top
;
4238 /** @type {number} */
4239 chrome
.system
.display
.Bounds
.prototype.width
;
4242 /** @type {number} */
4243 chrome
.system
.display
.Bounds
.prototype.height
;
4248 * left: (number|undefined),
4249 * top: (number|undefined),
4250 * right: (number|undefined),
4251 * bottom: (number|undefined)
4254 chrome
.system
.display
.Insets
;
4261 chrome
.system
.display
.DisplayInfo = function() {};
4264 /** @type {string} */
4265 chrome
.system
.display
.DisplayInfo
.prototype.id
;
4268 /** @type {string} */
4269 chrome
.system
.display
.DisplayInfo
.prototype.name
;
4272 /** @type {string} */
4273 chrome
.system
.display
.DisplayInfo
.prototype.mirroringSourceId
;
4276 /** @type {boolean} */
4277 chrome
.system
.display
.DisplayInfo
.prototype.isPrimary
;
4280 /** @type {boolean} */
4281 chrome
.system
.display
.DisplayInfo
.prototype.isInternal
;
4284 /** @type {boolean} */
4285 chrome
.system
.display
.DisplayInfo
.prototype.isEnabled
;
4288 /** @type {number} */
4289 chrome
.system
.display
.DisplayInfo
.prototype.dpiX
;
4292 /** @type {number} */
4293 chrome
.system
.display
.DisplayInfo
.prototype.dpiY
;
4296 /** @type {number} */
4297 chrome
.system
.display
.DisplayInfo
.prototype.rotation
;
4300 /** @type {!chrome.system.display.Bounds} */
4301 chrome
.system
.display
.DisplayInfo
.prototype.bounds
;
4304 /** @type {!chrome.system.display.Insets} */
4305 chrome
.system
.display
.DisplayInfo
.prototype.overscan
;
4308 /** @type {!chrome.system.display.Bounds} */
4309 chrome
.system
.display
.DisplayInfo
.prototype.workArea
;
4314 * mirroringSourceId: (string|undefined),
4315 * isPrimary: (boolean|undefined),
4316 * overscan: (!chrome.system.display.Insets|undefined),
4317 * rotation: (number|undefined),
4318 * boundsOriginX: (number|undefined),
4319 * boundsOriginY: (number|undefined)
4322 chrome
.system
.display
.SettableDisplayInfo
;
4330 * format: (string|undefined),
4331 * quality: (number|undefined)
4334 chrome
.types
.ImageDetails
;
4338 * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
4339 * callback Called with an array of objects representing display info.
4341 chrome
.system
.display
.getInfo = function(callback
) {};
4345 * @param {string} id The display's unique identifier.
4346 * @param {!chrome.system.display.SettableDisplayInfo} info The information
4347 * about display properties that should be changed.
4348 * @param {function()=} opt_callback The callback to execute when the display
4349 * info has been changed.
4351 chrome
.system
.display
.setDisplayProperties
=
4352 function(id
, info
, opt_callback
) {};
4357 * @see https://developer.chrome.com/extensions/types.html
4359 chrome
.chromeSetting
= {};
4362 /** @type {!ChromeEvent} */
4363 chrome
.chromeSetting
.onChange
;
4368 * @see https://developer.chrome.com/extensions/webNavigation.html
4370 chrome
.webNavigation
= {};
4374 * @param {Object} details Object with a 'tabId' (number) key.
4375 * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
4376 * Callback function.
4378 chrome
.webNavigation
.getAllFrames = function(details
, callback
) {};
4382 * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
4384 * @param {function(Object.<string, (boolean|string)>)} callback
4385 * Callback function.
4387 chrome
.webNavigation
.getFrame = function(details
, callback
) {};
4390 /** @type {!ChromeEvent} */
4391 chrome
.webNavigation
.onBeforeNavigate
;
4394 /** @type {!ChromeEvent} */
4395 chrome
.webNavigation
.onCommitted
;
4398 /** @type {!ChromeEvent} */
4399 chrome
.webNavigation
.onDOMContentLoaded
;
4402 /** @type {!ChromeEvent} */
4403 chrome
.webNavigation
.onCompleted
;
4406 /** @type {!ChromeEvent} */
4407 chrome
.webNavigation
.onErrorOccurred
;
4410 /** @type {!ChromeEvent} */
4411 chrome
.webNavigation
.onCreatedNavigationTarget
;
4414 /** @type {!ChromeEvent} */
4415 chrome
.webNavigation
.onReferenceFragmentUpdated
;
4418 /** @type {!ChromeEvent} */
4419 chrome
.webNavigation
.onTabReplaced
;
4422 /** @type {!ChromeEvent} */
4423 chrome
.webNavigation
.onHistoryStateUpdated
;
4428 * Most event listeners for WebRequest take extra arguments.
4429 * @see https://developer.chrome.com/extensions/webRequest.html.
4432 function WebRequestEvent() {}
4436 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4438 * @param {!RequestFilter} filter A set of filters that restrict
4439 * the events that will be sent to this listener.
4440 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
4441 * that should be passed to the listener function.
4443 WebRequestEvent
.prototype.addListener
=
4444 function(listener
, filter
, opt_extraInfoSpec
) {};
4448 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4451 WebRequestEvent
.prototype.removeListener = function(listener
) {};
4455 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4458 WebRequestEvent
.prototype.hasListener = function(listener
) {};
4462 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4465 WebRequestEvent
.prototype.hasListeners = function(listener
) {};
4470 * The onErrorOccurred event takes one less parameter than the others.
4471 * @see https://developer.chrome.com/extensions/webRequest.html.
4474 function WebRequestOnErrorOccurredEvent() {}
4478 * @param {function(!Object): void} listener Listener function.
4479 * @param {!RequestFilter} filter A set of filters that restrict
4480 * the events that will be sent to this listener.
4482 WebRequestOnErrorOccurredEvent
.prototype.addListener
=
4483 function(listener
, filter
) {};
4487 * @param {function(!Object): void} listener Listener function.
4489 WebRequestOnErrorOccurredEvent
.prototype.removeListener = function(listener
) {};
4493 * @param {function(!Object): void} listener Listener function.
4495 WebRequestOnErrorOccurredEvent
.prototype.hasListener = function(listener
) {};
4499 * @param {function(!Object): void} listener Listener function.
4501 WebRequestOnErrorOccurredEvent
.prototype.hasListeners = function(listener
) {};
4506 * @see https://developer.chrome.com/extensions/webRequest.html
4508 chrome
.webRequest
= {};
4512 * @param {function(): void=} opt_callback Callback function.
4514 chrome
.webRequest
.handlerBehaviorChanged = function(opt_callback
) {};
4517 /** @type {!WebRequestEvent} */
4518 chrome
.webRequest
.onAuthRequired
;
4521 /** @type {!WebRequestEvent} */
4522 chrome
.webRequest
.onBeforeRedirect
;
4525 /** @type {!WebRequestEvent} */
4526 chrome
.webRequest
.onBeforeRequest
;
4529 /** @type {!WebRequestEvent} */
4530 chrome
.webRequest
.onBeforeSendHeaders
;
4533 /** @type {!WebRequestEvent} */
4534 chrome
.webRequest
.onCompleted
;
4537 /** @type {!WebRequestOnErrorOccurredEvent} */
4538 chrome
.webRequest
.onErrorOccurred
;
4541 /** @type {!WebRequestEvent} */
4542 chrome
.webRequest
.onHeadersReceived
;
4545 /** @type {!WebRequestEvent} */
4546 chrome
.webRequest
.onResponseStarted
;
4549 /** @type {!WebRequestEvent} */
4550 chrome
.webRequest
.onSendHeaders
;
4558 * @see https://developer.chrome.com/extensions/management.html
4561 function ExtensionInfo() {}
4564 /** @type {string} */
4565 ExtensionInfo
.prototype.id
;
4568 /** @type {string} */
4569 ExtensionInfo
.prototype.name
;
4572 /** @type {string} */
4573 ExtensionInfo
.prototype.description
;
4576 /** @type {string} */
4577 ExtensionInfo
.prototype.version
;
4580 /** @type {boolean} */
4581 ExtensionInfo
.prototype.mayDisable
;
4584 /** @type {boolean} */
4585 ExtensionInfo
.prototype.enabled
;
4588 /** @type {string|undefined} */
4589 ExtensionInfo
.prototype.disabledReason
;
4592 /** @type {boolean} */
4593 ExtensionInfo
.prototype.isApp
;
4596 /** @type {string|undefined} */
4597 ExtensionInfo
.prototype.appLaunchUrl
;
4600 /** @type {string|undefined} */
4601 ExtensionInfo
.prototype.homepageUrl
;
4604 /** @type {string|undefined} */
4605 ExtensionInfo
.prototype.updateUrl
;
4608 /** @type {boolean} */
4609 ExtensionInfo
.prototype.offlineEnabled
;
4612 /** @type {string} */
4613 ExtensionInfo
.prototype.optionsUrl
;
4616 /** @type {!Array.<!IconInfo>|undefined} */
4617 ExtensionInfo
.prototype.icons
;
4620 /** @type {!Array.<string>} */
4621 ExtensionInfo
.prototype.permissions
;
4624 /** @type {!Array.<string>} */
4625 ExtensionInfo
.prototype.hostPermissions
;
4628 /** @type {string} */
4629 ExtensionInfo
.prototype.installType
;
4632 /** @type {string|undefined} */
4633 ExtensionInfo
.prototype.launchType
;
4636 /** @type {!Array.<string>|undefined} */
4637 ExtensionInfo
.prototype.availableLaunchTypes
;
4642 * @see https://developer.chrome.com/extensions/management.html
4645 function IconInfo() {}
4648 /** @type {number} */
4649 IconInfo
.prototype.size
;
4652 /** @type {string} */
4653 IconInfo
.prototype.url
;
4658 * @see https://developer.chrome.com/extensions/tabs
4664 // TODO: Make this field optional once dependent projects have been updated.
4671 /** @type {number} */
4672 Tab
.prototype.index
;
4675 /** @type {number} */
4676 Tab
.prototype.windowId
;
4679 // TODO: Make this field optional once dependent projects have been updated.
4683 Tab
.prototype.openerTabId
;
4686 /** @type {boolean} */
4687 Tab
.prototype.highlighted
;
4690 /** @type {boolean} */
4691 Tab
.prototype.active
;
4694 /** @type {boolean} */
4695 Tab
.prototype.pinned
;
4698 // TODO: Make this field optional once dependent projects have been updated.
4705 // TODO: Make this field optional once dependent projects have been updated.
4709 Tab
.prototype.title
;
4712 // TODO: Make this field optional once dependent projects have been updated.
4716 Tab
.prototype.favIconUrl
;
4719 // TODO: Make this field optional once dependent projects have been updated.
4723 Tab
.prototype.status
;
4726 /** @type {boolean} */
4727 Tab
.prototype.incognito
;
4730 /** @type {number|undefined} */
4731 Tab
.prototype.width
;
4734 /** @type {number|undefined} */
4735 Tab
.prototype.height
;
4738 /** @type {number|undefined} */
4739 Tab
.prototype.sessionId
;
4744 * @see https://developer.chrome.com/extensions/windows.html
4747 function ChromeWindow() {}
4750 /** @type {number} */
4751 ChromeWindow
.prototype.id
;
4754 /** @type {boolean} */
4755 ChromeWindow
.prototype.focused
;
4758 /** @type {number} */
4759 ChromeWindow
.prototype.top
;
4762 /** @type {number} */
4763 ChromeWindow
.prototype.left
;
4766 /** @type {number} */
4767 ChromeWindow
.prototype.width
;
4770 /** @type {number} */
4771 ChromeWindow
.prototype.height
;
4774 /** @type {Array.<Tab>} */
4775 ChromeWindow
.prototype.tabs
;
4778 /** @type {boolean} */
4779 ChromeWindow
.prototype.incognito
;
4782 /** @type {string} */
4783 ChromeWindow
.prototype.type
;
4786 /** @type {string} */
4787 ChromeWindow
.prototype.state
;
4790 /** @type {boolean} */
4791 ChromeWindow
.prototype.alwaysOnTop
;
4796 * @see https://developer.chrome.com/extensions/events.html
4799 function ChromeEvent() {}
4802 /** @param {!Function} callback */
4803 ChromeEvent
.prototype.addListener = function(callback
) {};
4806 /** @param {!Function} callback */
4807 ChromeEvent
.prototype.removeListener = function(callback
) {};
4811 * @param {!Function} callback
4814 ChromeEvent
.prototype.hasListener = function(callback
) {};
4817 /** @return {boolean} */
4818 ChromeEvent
.prototype.hasListeners = function() {};
4823 * Event whose listeners take a string parameter.
4826 function ChromeStringEvent() {}
4829 /** @param {function(string): void} callback */
4830 ChromeStringEvent
.prototype.addListener = function(callback
) {};
4833 /** @param {function(string): void} callback */
4834 ChromeStringEvent
.prototype.removeListener = function(callback
) {};
4838 * @param {function(string): void} callback
4841 ChromeStringEvent
.prototype.hasListener = function(callback
) {};
4844 /** @return {boolean} */
4845 ChromeStringEvent
.prototype.hasListeners = function() {};
4850 * Event whose listeners take a boolean parameter.
4854 function ChromeBooleanEvent() {}
4858 * @param {function(boolean): void} callback
4860 ChromeBooleanEvent
.prototype.addListener = function(callback
) {};
4864 * @param {function(boolean): void} callback
4866 ChromeBooleanEvent
.prototype.removeListener = function(callback
) {};
4870 * @param {function(boolean): void} callback
4873 ChromeBooleanEvent
.prototype.hasListener = function(callback
) {};
4879 ChromeBooleanEvent
.prototype.hasListeners = function() {};
4884 * Event whose listeners take a number parameter.
4888 function ChromeNumberEvent() {}
4892 * @param {function(number): void} callback
4894 ChromeNumberEvent
.prototype.addListener = function(callback
) {};
4898 * @param {function(number): void} callback
4900 ChromeNumberEvent
.prototype.removeListener = function(callback
) {};
4904 * @param {function(number): void} callback
4907 ChromeNumberEvent
.prototype.hasListener = function(callback
) {};
4913 ChromeNumberEvent
.prototype.hasListeners = function() {};
4918 * Event whose listeners take an Object parameter.
4921 function ChromeObjectEvent() {}
4925 * @param {function(!Object): void} callback Callback.
4927 ChromeObjectEvent
.prototype.addListener = function(callback
) {};
4931 * @param {function(!Object): void} callback Callback.
4933 ChromeObjectEvent
.prototype.removeListener = function(callback
) {};
4937 * @param {function(!Object): void} callback Callback.
4940 ChromeObjectEvent
.prototype.hasListener = function(callback
) {};
4946 ChromeObjectEvent
.prototype.hasListeners = function() {};
4951 * Event whose listeners take an ExtensionInfo parameter.
4954 function ChromeExtensionInfoEvent() {}
4957 /** @param {function(!ExtensionInfo): void} callback */
4958 ChromeExtensionInfoEvent
.prototype.addListener = function(callback
) {};
4961 /** @param {function(!ExtensionInfo): void} callback */
4962 ChromeExtensionInfoEvent
.prototype.removeListener = function(callback
) {};
4966 * @param {function(!ExtensionInfo): void} callback
4969 ChromeExtensionInfoEvent
.prototype.hasListener = function(callback
) {};
4972 /** @return {boolean} */
4973 ChromeExtensionInfoEvent
.prototype.hasListeners = function() {};
4978 * Event whose listeners take a string array parameter.
4981 function ChromeStringArrayEvent() {}
4984 /** @param {function(!Array.<string>): void} callback */
4985 ChromeStringArrayEvent
.prototype.addListener = function(callback
) {};
4988 /** @param {function(!Array.<string>): void} callback */
4989 ChromeStringArrayEvent
.prototype.removeListener = function(callback
) {};
4993 * @param {function(!Array.<string>): void} callback
4996 ChromeStringArrayEvent
.prototype.hasListener = function(callback
) {};
4999 /** @return {boolean} */
5000 ChromeStringArrayEvent
.prototype.hasListeners = function() {};
5005 * Event whose listeners take two strings as parameters.
5008 function ChromeStringStringEvent() {}
5011 /** @param {function(string, string): void} callback */
5012 ChromeStringStringEvent
.prototype.addListener = function(callback
) {};
5015 /** @param {function(string, string): void} callback */
5016 ChromeStringStringEvent
.prototype.removeListener = function(callback
) {};
5020 * @param {function(string, string): void} callback
5023 ChromeStringStringEvent
.prototype.hasListener = function(callback
) {};
5026 /** @return {boolean} */
5027 ChromeStringStringEvent
.prototype.hasListeners = function() {};
5031 * @see http://developer.chrome.com/extensions/pushMessaging.html
5034 chrome
.pushMessaging
= {};
5038 * @type {!chrome.pushMessaging.PushMessageEvent}
5040 chrome
.pushMessaging
.onMessage
;
5044 * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
5045 * interactiveOrCallback Either a flag(optional), if set to true, user will
5046 * be asked to log in if they are not already logged in, or, when he flag is
5047 * not given, the callback.
5048 * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
5051 chrome
.pushMessaging
.getChannelId
=
5052 function(interactiveOrCallback
, opt_callback
) {};
5057 * Event whose listeners take a chrome.pushMessaging.Message parameter.
5060 chrome
.pushMessaging
.PushMessageEvent = function() {};
5064 * @param {function(!chrome.pushMessaging.Message): void} callback
5066 chrome
.pushMessaging
.PushMessageEvent
.prototype.addListener
=
5067 function(callback
) {};
5071 * @param {function(!chrome.pushMessaging.Message): void} callback
5073 chrome
.pushMessaging
.PushMessageEvent
.prototype.removeListener
=
5074 function(callback
) {};
5078 * @param {function(!chrome.pushMessaging.Message): void} callback
5081 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListener
=
5082 function(callback
) {};
5088 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListeners = function() {};
5093 * @see http://developer.chrome.com/apps/runtime.html#type-Port
5099 /** @type {string} */
5100 Port
.prototype.name
;
5103 /** @type {!ChromeEvent} */
5104 Port
.prototype.onDisconnect
;
5107 /** @type {!ChromeEvent} */
5108 Port
.prototype.onMessage
;
5111 /** @type {MessageSender} */
5112 Port
.prototype.sender
;
5116 * @param {Object.<string>} obj Message object.
5118 Port
.prototype.postMessage = function(obj
) {};
5122 * Note: as of 2012-04-12, this function is no longer documented on
5123 * the public web pages, but there are still existing usages.
5125 Port
.prototype.disconnect = function() {};
5130 * @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
5133 function MessageSender() {}
5136 /** @type {!Tab|undefined} */
5137 MessageSender
.prototype.tab
;
5140 /** @type {string|undefined} */
5141 MessageSender
.prototype.id
;
5144 /** @type {string|undefined} */
5145 MessageSender
.prototype.url
;
5148 /** @type {string|undefined} */
5149 MessageSender
.prototype.tlsChannelId
;
5154 * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
5157 function BookmarkTreeNode() {}
5160 /** @type {string} */
5161 BookmarkTreeNode
.prototype.id
;
5164 /** @type {string|undefined} */
5165 BookmarkTreeNode
.prototype.parentId
;
5168 /** @type {number|undefined} */
5169 BookmarkTreeNode
.prototype.index
;
5172 /** @type {string|undefined} */
5173 BookmarkTreeNode
.prototype.url
;
5176 /** @type {string} */
5177 BookmarkTreeNode
.prototype.title
;
5180 /** @type {number|undefined} */
5181 BookmarkTreeNode
.prototype.dateAdded
;
5184 /** @type {number|undefined} */
5185 BookmarkTreeNode
.prototype.dateGroupModified
;
5188 /** @type {string|undefined} */
5189 BookmarkTreeNode
.prototype.unmodifiable
;
5192 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
5193 BookmarkTreeNode
.prototype.children
;
5198 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
5201 function Cookie() {}
5204 /** @type {string} */
5205 Cookie
.prototype.name
;
5208 /** @type {string} */
5209 Cookie
.prototype.value
;
5212 /** @type {string} */
5213 Cookie
.prototype.domain
;
5216 /** @type {boolean} */
5217 Cookie
.prototype.hostOnly
;
5220 /** @type {string} */
5221 Cookie
.prototype.path
;
5224 /** @type {boolean} */
5225 Cookie
.prototype.secure
;
5228 /** @type {boolean} */
5229 Cookie
.prototype.httpOnly
;
5232 /** @type {boolean} */
5233 Cookie
.prototype.session
;
5236 /** @type {number} */
5237 Cookie
.prototype.expirationDate
;
5240 /** @type {string} */
5241 Cookie
.prototype.storeId
;
5246 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
5249 function CookieStore() {}
5252 /** @type {string} */
5253 CookieStore
.prototype.id
;
5256 /** @type {Array.<number>} */
5257 CookieStore
.prototype.tabIds
;
5262 * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
5265 function OnClickData() {}
5268 /** @type {number} */
5269 OnClickData
.prototype.menuItemId
;
5272 /** @type {number} */
5273 OnClickData
.prototype.parentMenuItemId
;
5276 /** @type {string} */
5277 OnClickData
.prototype.mediaType
;
5280 /** @type {string} */
5281 OnClickData
.prototype.linkUrl
;
5284 /** @type {string} */
5285 OnClickData
.prototype.srcUrl
;
5288 /** @type {string} */
5289 OnClickData
.prototype.pageUrl
;
5292 /** @type {string} */
5293 OnClickData
.prototype.frameUrl
;
5296 /** @type {string} */
5297 OnClickData
.prototype.selectionText
;
5300 /** @type {string} */
5301 OnClickData
.prototype.editable
;
5306 * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
5309 function Debuggee() {}
5312 /** @type {number} */
5313 Debuggee
.prototype.tabId
;
5318 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
5321 function ResourceIdentifier() {}
5324 /** @type {string} */
5325 ResourceIdentifier
.prototype.id
;
5328 /** @type {string} */
5329 ResourceIdentifier
.prototype.description
;
5334 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
5337 function ContentSetting() {}
5341 * @param {!Object.<string,string>} details Settings details.
5342 * @param {function(): void=} opt_callback Callback function.
5344 ContentSetting
.prototype.clear = function(details
, opt_callback
) {};
5348 * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
5350 * @param {function(): void} callback Callback function.
5352 ContentSetting
.prototype.get = function(details
, callback
) {};
5356 * @param {function(): void} callback Callback function.
5358 ContentSetting
.prototype.getResourceIdentifiers = function(callback
) {};
5362 * @param {!Object.<string,(string|ResourceIdentifier)>} details
5364 * @param {function(): void=} opt_callback Callback function.
5366 ContentSetting
.prototype.set = function(details
, opt_callback
) {};
5371 * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
5374 function HistoryItem() {}
5377 /** @type {string} */
5378 HistoryItem
.prototype.id
;
5381 /** @type {string} */
5382 HistoryItem
.prototype.url
;
5385 /** @type {string} */
5386 HistoryItem
.prototype.title
;
5389 /** @type {number} */
5390 HistoryItem
.prototype.lastVisitTime
;
5393 /** @type {number} */
5394 HistoryItem
.prototype.visitCount
;
5397 /** @type {number} */
5398 HistoryItem
.prototype.typedCount
;
5403 * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
5406 function VisitItem() {}
5409 /** @type {string} */
5410 VisitItem
.prototype.id
;
5413 /** @type {string} */
5414 VisitItem
.prototype.visitId
;
5417 /** @type {number} */
5418 VisitItem
.prototype.visitTime
;
5421 /** @type {string} */
5422 VisitItem
.prototype.referringVisitId
;
5425 /** @type {string} */
5426 VisitItem
.prototype.transition
;
5431 * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
5434 function FileHandlerExecuteEventDetails() {}
5437 /** @type {!Array.<!FileEntry>} */
5438 FileHandlerExecuteEventDetails
.prototype.entries
;
5441 /** @type {number|undefined} */
5442 FileHandlerExecuteEventDetails
.prototype.tab_id
;
5447 * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
5450 function ChromeKeyboardEvent() {}
5453 /** @type {string} */
5454 ChromeKeyboardEvent
.prototype.type
;
5457 /** @type {string} */
5458 ChromeKeyboardEvent
.prototype.requestId
;
5461 /** @type {string|undefined} */
5462 ChromeKeyboardEvent
.prototype.extensionId
;
5465 /** @type {string} */
5466 ChromeKeyboardEvent
.prototype.key
;
5469 /** @type {string} */
5470 ChromeKeyboardEvent
.prototype.code
;
5473 /** @type {number|undefined} */
5474 ChromeKeyboardEvent
.prototype.keyCode
;
5477 /** @type {boolean|undefined} */
5478 ChromeKeyboardEvent
.prototype.altKey
;
5481 /** @type {boolean|undefined} */
5482 ChromeKeyboardEvent
.prototype.ctrlKey
;
5485 /** @type {boolean|undefined} */
5486 ChromeKeyboardEvent
.prototype.shiftKey
;
5489 /** @type {boolean|undefined} */
5490 ChromeKeyboardEvent
.prototype.capsLock
;
5495 * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
5498 function InputContext() {}
5501 /** @type {number} */
5502 InputContext
.prototype.contextID
;
5505 /** @type {string} */
5506 InputContext
.prototype.type
;
5511 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
5514 function ProxyServer() {}
5517 /** @type {string} */
5518 ProxyServer
.prototype.scheme
;
5521 /** @type {string} */
5522 ProxyServer
.prototype.host
;
5525 /** @type {number} */
5526 ProxyServer
.prototype.port
;
5531 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
5534 function ProxyRules() {}
5537 /** @type {ProxyServer} */
5538 ProxyRules
.prototype.singleProxy
;
5541 /** @type {ProxyServer} */
5542 ProxyRules
.prototype.proxyForHttp
;
5545 /** @type {ProxyServer} */
5546 ProxyRules
.prototype.proxyForHttps
;
5549 /** @type {ProxyServer} */
5550 ProxyRules
.prototype.proxyForFtp
;
5553 /** @type {ProxyServer} */
5554 ProxyRules
.prototype.fallbackProxy
;
5557 /** @type {!Array.<string>} */
5558 ProxyRules
.prototype.bypassList
;
5563 * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
5566 function PacScript() {}
5569 /** @type {string} */
5570 PacScript
.prototype.url
;
5573 /** @type {string} */
5574 PacScript
.prototype.data
;
5577 /** @type {boolean} */
5578 PacScript
.prototype.mandatory
;
5583 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
5586 function ProxyConfig() {}
5589 /** @type {ProxyRules} */
5590 ProxyConfig
.prototype.rules
;
5593 /** @type {PacScript} */
5594 ProxyConfig
.prototype.pacScript
;
5597 /** @type {string} */
5598 ProxyConfig
.prototype.mode
;
5603 * The event listener for Storage receives an Object mapping each
5604 * key that changed to its corresponding StorageChange for that item.
5606 * @see https://developer.chrome.com/extensions/storage.html
5609 function StorageChangeEvent() {}
5613 * @param {function(!Object.<string, !StorageChange>, string)} callback
5614 * Listener will receive an object that maps each key to its StorageChange,
5615 * and the namespace ("sync" or "local") of the storage area the changes
5618 StorageChangeEvent
.prototype.addListener = function(callback
) {};
5621 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5622 StorageChangeEvent
.prototype.removeListener = function(callback
) {};
5625 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5626 StorageChangeEvent
.prototype.hasListener = function(callback
) {};
5629 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
5630 StorageChangeEvent
.prototype.hasListeners = function(callback
) {};
5635 * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
5638 function StorageChange() {}
5642 StorageChange
.prototype.oldValue
;
5646 StorageChange
.prototype.newValue
;
5651 * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
5654 function StorageArea() {}
5658 * Removes all items from storage.
5659 * @param {function(): void=} opt_callback Callback function.
5661 StorageArea
.prototype.clear = function(opt_callback
) {};
5665 * @param {(string|!Array.<string>|!Object|null)=} opt_keys
5666 * A single key to get, list of keys to get, or a dictionary
5667 * specifying default values (see description of the
5668 * object). An empty list or object will return an empty
5669 * result object. Pass in null to get the entire contents of storage.
5670 * @param {function(Object)=} opt_callback Callback with storage items, or null
5673 StorageArea
.prototype.get = function(opt_keys
, opt_callback
) {};
5677 * @param {(string|!Array.<string>)} keys
5678 * A single key or a list of keys for items to remove.
5679 * @param {function()=} opt_callback Callback.
5681 StorageArea
.prototype.remove = function(keys
, opt_callback
) {};
5685 * @param {!Object.<string>} keys
5686 * Object specifying items to augment storage
5687 * with. Values that cannot be serialized (functions, etc) will be ignored.
5688 * @param {function()=} opt_callback Callback.
5690 StorageArea
.prototype.set = function(keys
, opt_callback
) { };
5694 * @param {(string|!Array.<string>|null)=} opt_keys
5695 * A single key or list of keys to get the total usage for. An empty list
5696 * will return 0. Pass in null to get the total usage of all of storage.
5697 * @param {function(number)=} opt_callback
5698 * Callback with the amount of space being used by storage.
5700 StorageArea
.prototype.getBytesInUse = function(opt_keys
, opt_callback
) { };
5705 * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
5708 function ChromeSetting() {}
5712 * @param {Object} details Object with a 'scope' (string) key.
5713 * @param {function(): void=} opt_callback Callback function.
5715 ChromeSetting
.prototype.clear = function(details
, opt_callback
) {};
5719 * @param {Object} details Object with an 'incognito' (boolean) key.
5720 * @param {function(Object.<string, *>): void} callback Callback function.
5722 ChromeSetting
.prototype.get = function(details
, callback
) {};
5726 * @param {Object} details Object with a 'value' (*) key and an optional
5727 * 'scope' (string) key.
5728 * @param {function(): void=} opt_callback Callback function.
5730 ChromeSetting
.prototype.set = function(details
, opt_callback
) {};
5735 * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
5738 function RequestFilter() {}
5741 /** @type {!Array.<string>} */
5742 RequestFilter
.prototype.urls
;
5745 /** @type {!Array.<string>} */
5746 RequestFilter
.prototype.types
;
5749 /** @type {number} */
5750 RequestFilter
.prototype.tabId
;
5753 /** @type {number} */
5754 RequestFilter
.prototype.windowId
;
5759 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
5762 function HttpHeader() {}
5765 /** @type {string} */
5766 HttpHeader
.prototype.name
;
5769 /** @type {string} */
5770 HttpHeader
.prototype.value
;
5773 /** @type {!Array.<number>} */
5774 HttpHeader
.prototype.binaryValue
;
5778 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
5779 * @typedef {Array.<!HttpHeader>}
5787 * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
5790 function BlockingResponse() {}
5793 /** @type {boolean} */
5794 BlockingResponse
.prototype.cancel
;
5797 /** @type {string} */
5798 BlockingResponse
.prototype.redirectUrl
;
5801 /** @type {!HttpHeaders_} */
5802 BlockingResponse
.prototype.requestHeaders
;
5805 /** @type {!HttpHeaders_} */
5806 BlockingResponse
.prototype.responseHeaders
;
5809 /** @type {Object.<string,string>} */
5810 BlockingResponse
.prototype.authCredentials
;
5815 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
5818 chrome
.pushMessaging
.Message = function() {};
5824 chrome
.pushMessaging
.Message
.prototype.subchannelId
;
5830 chrome
.pushMessaging
.Message
.prototype.payload
;
5835 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
5838 chrome
.pushMessaging
.ChannelIdResult = function() {};
5844 chrome
.pushMessaging
.ChannelIdResult
.prototype.channelId
;
5848 * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
5849 * defined in {@code javascript/externs/fileapi.js}.
5851 * @see http://developer.chrome.com/apps/fileSystem.html
5853 chrome
.fileSystem
= {};
5857 * @param {!Entry} entry The entry to get the display path for. The entry can
5858 * originally be obtained through
5859 * {@code chrome.fileSystem.chooseEntry} or
5860 * {@code chrome.fileSystem.restoreEntry}.
5861 * @param {function(string)} callback A success callback.
5862 * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
5864 chrome
.fileSystem
.getDisplayPath = function(entry
, callback
) {};
5868 * @param {!Entry} entry The entry to get a writable entry for.
5869 * @param {function(!Entry)} callback A success callback.
5870 * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
5872 chrome
.fileSystem
.getWritableEntry = function(entry
, callback
) {};
5876 * @param {!Entry} entry The entry to query writability.
5877 * @param {function(boolean)} callback A success callback.
5878 * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
5880 chrome
.fileSystem
.isWritableEntry = function(entry
, callback
) {};
5885 * description: (string|undefined),
5886 * mimeTypes: (!Array.<string>|undefined),
5887 * extensions: (!Array.<string>|undefined)
5889 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5891 chrome
.fileSystem
.AcceptsOption
;
5896 * type: (string|undefined),
5897 * suggestedName: (string|undefined),
5898 * accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
5899 * acceptsAllTypes: (boolean|undefined),
5900 * acceptsMultiple: (boolean|undefined)
5902 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5904 chrome
.fileSystem
.ChooseEntryOptions
;
5908 * @param {!chrome.fileSystem.ChooseEntryOptions|
5909 * function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
5910 * options for the file prompt or the callback.
5911 * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
5912 * callback, if arg1 is options.
5913 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
5915 chrome
.fileSystem
.chooseEntry = function(optionsOrCallback
, opt_callback
) {};
5919 * @param {string} id The ID of the file entry to restore.
5920 * @param {function(!Entry)} callback A success callback.
5921 * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
5923 chrome
.fileSystem
.restoreEntry = function(id
, callback
) {};
5927 * @param {string} id The ID of the file entry to query restorability.
5928 * @param {function(boolean)} callback A success callback.
5929 * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
5931 chrome
.fileSystem
.isRestorable = function(id
, callback
) {};
5935 * @param {!Entry} entry The entry to regain access to.
5936 * @return {string} The ID that can be passed to restoreEntry to regain access
5937 * to the given file entry.
5938 * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
5940 chrome
.fileSystem
.retainEntry = function(entry
) {};
5945 * @see https://developer.chrome.com/apps/syncFileSystem
5947 chrome
.syncFileSystem
= {};
5951 * Returns a syncable filesystem backed by Google Drive. The returned
5952 * DOMFileSystem instance can be operated on in the same way as
5953 * the Temporary and Persistant file systems (see
5954 * http://www.w3.org/TR/file-system-api/), except that the filesystem
5955 * object returned for Sync FileSystem does NOT support directory
5956 * operations (yet). You can get a list of file entries by reading
5957 * the root directory (by creating a new DirectoryReader),
5958 * but cannot create a new directory in it.
5960 * <p>Calling this multiple times from the same app will return the same
5961 * handle to the same file system.
5963 * <p>Note this call can fail. For example, if the user is not signed in
5964 * to Chrome or if there is no network operation. To handle these errors
5965 * it is important chrome.runtime.lastError is checked in the callback.
5967 * @param {function(!FileSystem)} callback A callback type for
5968 * requestFileSystem.
5969 * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
5971 chrome
.syncFileSystem
.requestFileSystem = function(callback
) {};
5975 * Sets the default conflict resolution policy for the 'syncable' file
5976 * storage for the app. By default it is set to 'last_write_win'.
5977 * When conflict resolution policy is set to 'last_write_win' conflicts
5978 * for existing files are automatically resolved next time the file is updated.
5979 * {@code callback} can be optionally given to know if the request has
5982 * @param {string} policy Any of 'last_write_win' or 'manual'
5983 * @param {function()=} opt_callback
5985 * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
5987 chrome
.syncFileSystem
.setConflictResolutionPolicy
=
5988 function(policy
, opt_callback
) {};
5992 * Gets the current conflict resolution policy.
5994 * @param {function(string)} callback Accepting any of 'last_write_win'
5996 * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
5998 chrome
.syncFileSystem
.getConflictResolutionPolicy = function(callback
) {};
6002 * Returns the current usage and quota in bytes for the 'syncable' file
6003 * storage for the app.
6005 * @param {!FileSystem} fileSystem
6006 * @param {function(!Object)} callback Taking an object substantially similar
6007 * to {@code {'usageBytes': number, quotaBytes: number}}.
6008 * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
6010 chrome
.syncFileSystem
.getUsageAndQuota = function(fileSystem
, callback
) {};
6014 * Returns the FileStatus for the given fileEntry. The status value can be
6015 * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
6016 * happens when the service's conflict resolution policy is set to 'manual'.
6018 * @param {!Entry} fileEntry
6019 * @param {function(string)} callback Called with any of 'synced', 'pending'
6022 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
6024 chrome
.syncFileSystem
.getFileStatus = function(fileEntry
, callback
) {};
6028 * Returns each FileStatus for the given fileEntry array. Typically called
6029 * with the result from dirReader.readEntries().
6031 * @param {!Array.<!FileEntry>} fileEntries
6032 * @param {function(!Array.<!Object>)} callback Each object will look like:
6033 * {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
6035 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
6037 chrome
.syncFileSystem
.getFileStatuses = function(fileEntries
, callback
) {};
6043 * <p>Returns the current sync backend status.
6045 * @param {function(string)} callback Arg is any of 'initializing', 'running',
6046 * 'authentication_required', 'temporary_unavailable', or 'disabled'.
6048 * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
6050 chrome
.syncFileSystem
.getServiceStatus = function(callback
) {};
6054 * Fired when an error or other status change has happened in the sync
6055 * backend (for example, when the sync is temporarily disabled due
6056 * to network or authentication error).
6058 * @type {!ChromeObjectEvent}
6060 * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
6062 chrome
.syncFileSystem
.onServiceStatusChanged
;
6066 * Fired when a file has been updated by the background sync service.
6068 * @type {!ChromeObjectEvent}
6070 * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
6072 chrome
.syncFileSystem
.onFileStatusChanged
;
6077 * @see http://developer.chrome.com/extensions/alarms.html
6083 * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
6084 * is fired. If there is another alarm with the same name (or no name if none is
6085 * specified), it will be cancelled and replaced by this alarm.
6086 * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
6087 * the name to identify this alarm or the info used to create the alarm. If
6088 * no name is passed, the empty string is used to identify the alarm.
6089 * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
6090 * as arg1, the info used to create the alarm.
6091 * @see http://developer.chrome.com/extensions/alarms.html#method-create
6093 chrome
.alarms
.create = function(nameOrAlarmCreateInfo
, opt_alarmInfo
) {};
6097 * Retrieves details about the specified alarm.
6098 * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
6099 * of the alarm to get or the callback to invoke with the alarm. If no name
6100 * is passed, the empty string is used to get the alarm.
6101 * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
6102 * as arg1, the callback to invoke with the alarm.
6103 * @see http://developer.chrome.com/extensions/alarms.html#method-get
6105 chrome
.alarms
.get = function(nameOrCallback
, opt_callback
) {};
6109 * Gets an array of all the alarms.
6110 * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
6111 * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
6113 chrome
.alarms
.getAll = function(callback
) {};
6117 * Clears the alarm with the given name.
6118 * @param {string=} opt_name
6119 * @see http://developer.chrome.com/extensions/alarms.html#method-clear
6121 chrome
.alarms
.clear = function(opt_name
) {};
6125 * Clears all alarms.
6126 * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
6128 chrome
.alarms
.clearAll = function() {};
6132 * Fired when an alarm has elapsed. Useful for event pages.
6133 * @type {!chrome.alarms.AlarmEvent}
6134 * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
6136 chrome
.alarms
.onAlarm
;
6143 chrome
.alarms
.AlarmEvent = function() {};
6147 * @param {function(!chrome.alarms.Alarm): void} callback
6149 chrome
.alarms
.AlarmEvent
.prototype.addListener = function(callback
) {};
6153 * @param {function(!chrome.alarms.Alarm): void} callback
6155 chrome
.alarms
.AlarmEvent
.prototype.removeListener = function(callback
) {};
6159 * @param {function(!chrome.alarms.Alarm): void} callback
6162 chrome
.alarms
.AlarmEvent
.prototype.hasListener = function(callback
) {};
6168 chrome
.alarms
.AlarmEvent
.prototype.hasListeners = function() {};
6174 * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
6176 chrome
.alarms
.Alarm = function() {};
6180 * Name of this alarm.
6183 chrome
.alarms
.Alarm
.prototype.name
;
6187 * Time at which this alarm was scheduled to fire, in milliseconds past the
6188 * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
6189 * delayed an arbitrary amount beyond this.
6192 chrome
.alarms
.Alarm
.prototype.scheduledTime
;
6196 * If not null, the alarm is a repeating alarm and will fire again in
6197 * periodInMinutes minutes.
6200 chrome
.alarms
.Alarm
.prototype.periodInMinutes
;
6205 * when: (number|undefined),
6206 * delayInMinutes: (number|undefined),
6207 * periodInMinutes: (number|undefined)
6209 * @see http://developer.chrome.com/extensions/alarms.html#method-create
6211 chrome
.alarms
.AlarmCreateInfo
;
6215 * @see https://developer.chrome.com/apps/hid
6226 * @see https://developer.chrome.com/apps/hid#method-getDevices
6228 chrome
.hid
.HidGetDevicesOptions
;
6233 * usagePage: number,
6235 * reportIds: !Array.<number>
6237 * @see https://developer.chrome.com/apps/hid#method-getDevices
6239 chrome
.hid
.HidDeviceUsage
;
6246 * productId: number,
6247 * collections: !Array.<!chrome.hid.HidDeviceUsage>,
6248 * maxInputReportSize: number,
6249 * maxOutputReportSize: number,
6250 * maxFeatureReportSize: number
6252 * @see https://developer.chrome.com/apps/hid#method-getDevices
6254 chrome
.hid
.HidDeviceInfo
;
6259 * connectionId: number
6261 * @see https://developer.chrome.com/apps/hid#method-connect
6263 chrome
.hid
.HidConnectInfo
;
6267 * @see https://developer.chrome.com/apps/hid#method-getDevices
6268 * Enumerates all the connected HID devices specified by the
6269 * vendorId/productId/interfaceId tuple.
6270 * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
6271 * for on target devices.
6272 * @param {function(!Array.<!Object>)} callback Invoked with a list of
6273 * |HidDeviceInfo|s on complete.
6275 chrome
.hid
.getDevices = function(options
, callback
) {};
6279 * @see https://developer.chrome.com/apps/hid#method-connect
6280 * Opens a connection to a HID device for communication.
6281 * @param {number} deviceId The ID of the device to open.
6282 * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
6283 * connection succeeds, or undefined if it fails.
6285 chrome
.hid
.connect = function(deviceId
, callback
) {};
6289 * @see https://developer.chrome.com/apps/hid#method-disconnect
6290 * Disconnects from a device.
6291 * @param {number} connectionId The connection to close.
6292 * @param {function()=} opt_callback The callback to invoke once the connection
6295 chrome
.hid
.disconnect = function(connectionId
, opt_callback
) {};
6299 * @see https://developer.chrome.com/apps/hid#method-receive
6300 * Receives an input report from an HID device.
6301 * @param {number} connectionId The connection from which to receive the report.
6302 * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
6303 * the received report.
6305 chrome
.hid
.receive = function(connectionId
, callback
) {};
6309 * @see https://developer.chrome.com/apps/hid#method-send
6310 * Sends an output report to an HID device.
6311 * @param {number} connectionId The connection to which to send the report.
6312 * @param {number} reportId The report ID to use, or 0 if none.
6313 * @param {!ArrayBuffer} data The report data.
6314 * @param {function()} callback The callback to invoke once the write is
6317 chrome
.hid
.send = function(connectionId
, reportId
, data
, callback
) {};
6321 * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
6322 * Receives a feature report from the device.
6323 * @param {number} connectionId The connection from which to read the feature
6325 * @param {number} reportId The report ID to use, or 0 if none.
6326 * @param {number} size The size of the feature report to receive.
6327 * @param {function(!ArrayBuffer)} callback The callback to invoke with the
6330 chrome
.hid
.receiveFeatureReport
=
6331 function(connectionId
, reportId
, size
, callback
) {};
6335 * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
6336 * Sends a feature report to the device.
6337 * @param {number} connectionId The connection to which to send the feature
6339 * @param {number} reportId The report ID to use, or 0 if none.
6340 * @param {!ArrayBuffer} data The report data.
6341 * @param {function()} callback The callback to invoke once the write is
6344 chrome
.hid
.sendFeatureReport
=
6345 function(connectionId
, reportId
, data
, callback
) {};
6349 * @see http://developer.chrome.com/extensions/notifications.html
6352 chrome
.notifications
= {};
6358 * iconUrl: (string|undefined)
6360 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6362 chrome
.notifications
.NotificationButton
;
6370 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6372 chrome
.notifications
.NotificationItem
;
6377 * type: (string|undefined),
6378 * iconUrl: (string|undefined),
6379 * title: (string|undefined),
6380 * message: (string|undefined),
6381 * contextMessage: (string|undefined),
6382 * priority: (number|undefined),
6383 * eventTime: (number|undefined),
6384 * buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
6385 * imageUrl: (string|undefined),
6386 * items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
6387 * progress: (number|undefined),
6388 * isClickable: (boolean|undefined)
6390 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6392 chrome
.notifications
.NotificationOptions
;
6396 * @typedef {function(boolean): void}
6397 * @see http://developer.chrome.com/extensions/notifications.html#method-update
6398 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
6400 chrome
.notifications
.BooleanCallback
;
6404 * @typedef {function(!Object): void}
6405 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
6407 chrome
.notifications
.ObjectCallback
;
6411 * @typedef {function(string, boolean): void}
6412 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6414 chrome
.notifications
.ClosedCallback
;
6418 * @typedef {function(string, number): void}
6419 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6421 chrome
.notifications
.ButtonCallback
;
6425 * @param {string} notificationId
6426 * @param {!chrome.notifications.NotificationOptions} options
6427 * @param {function(string): void} callback
6428 * @see http://developer.chrome.com/extensions/notifications.html#method-create
6430 chrome
.notifications
.create = function(notificationId
, options
, callback
) {};
6434 * @param {string} notificationId
6435 * @param {!chrome.notifications.NotificationOptions} options
6436 * @param {!chrome.notifications.BooleanCallback} callback
6437 * @see http://developer.chrome.com/extensions/notifications.html#method-update
6439 chrome
.notifications
.update = function(notificationId
, options
, callback
) {};
6443 * @param {string} notificationId
6444 * @param {!chrome.notifications.BooleanCallback} callback
6445 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
6447 chrome
.notifications
.clear = function(notificationId
, callback
) {};
6451 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
6452 * @param {!chrome.notifications.ObjectCallback} callback
6454 chrome
.notifications
.getAll = function(callback
) {};
6458 * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
6459 * @param {function(string): void} callback takes 'granted' or 'denied'
6461 chrome
.notifications
.getPermissionLevel = function(callback
) {};
6465 * @type {!chrome.notifications.ClosedEvent}
6466 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6468 chrome
.notifications
.onClosed
;
6472 * The user clicked a non-button area of the notification. Callback receives a
6474 * @type {!ChromeStringEvent}
6475 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
6477 chrome
.notifications
.onClicked
;
6481 * @type {!chrome.notifications.ButtonClickedEvent}
6482 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6484 chrome
.notifications
.onButtonClicked
;
6488 * Indicates permission level change. Callback should expect 'granted' or
6490 * @type {!ChromeStringEvent}
6491 * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
6493 chrome
.notifications
.onPermissionLevelChanged
;
6497 * @type {!ChromeEvent}
6498 * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
6500 chrome
.notifications
.onShowSettings
;
6506 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6508 chrome
.notifications
.ClosedEvent = function() {};
6512 * @param {!chrome.notifications.ClosedCallback} callback
6514 chrome
.notifications
.ClosedEvent
.prototype.addListener = function(callback
) {};
6518 * @param {!chrome.notifications.ClosedCallback} callback
6520 chrome
.notifications
.ClosedEvent
.prototype.removeListener
=
6521 function(callback
) {};
6525 * @param {!chrome.notifications.ClosedCallback} callback
6528 chrome
.notifications
.ClosedEvent
.prototype.hasListener = function(callback
) {};
6534 chrome
.notifications
.ClosedEvent
.prototype.hasListeners = function() {};
6540 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6542 chrome
.notifications
.ButtonClickedEvent = function() {};
6546 * @param {!chrome.notifications.ButtonCallback} callback
6548 chrome
.notifications
.ButtonClickedEvent
.prototype.addListener
=
6549 function(callback
) {};
6553 * @param {!chrome.notifications.ButtonCallback} callback
6555 chrome
.notifications
.ButtonClickedEvent
.prototype.removeListener
=
6556 function(callback
) {};
6560 * @param {!chrome.notifications.ButtonCallback} callback
6563 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListener
=
6564 function(callback
) {};
6570 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListeners = function() {};
6575 * @see http://developer.chrome.com/apps/system_storage.html
6577 chrome
.system
.storage
= {};
6582 chrome
.system
.storage
.StorageUnitInfo = function() {};
6585 /** @type {string} */
6586 chrome
.system
.storage
.StorageUnitInfo
.id
;
6589 /** @type {string} */
6590 chrome
.system
.storage
.StorageUnitInfo
.name
;
6593 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
6594 chrome
.system
.storage
.StorageUnitInfo
.type
;
6597 /** @type {number} */
6598 chrome
.system
.storage
.StorageUnitInfo
.capacity
;
6603 * Event whose listeners take a StorageUnitInfoEvent parameter.
6606 chrome
.system
.storage
.StorageUnitInfoEvent = function() {};
6609 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
6610 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.addListener
=
6611 function(callback
) {};
6614 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
6615 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.removeListener
=
6616 function(callback
) {};
6620 * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
6623 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListener
=
6624 function(callback
) {};
6627 /** @return {boolean} */
6628 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListeners
=
6632 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
6633 chrome
.system
.storage
.onAttached
;
6636 /** @type {!ChromeStringEvent} */
6637 chrome
.system
.storage
.onDetached
;
6641 * Gets the storage information from the system.
6642 * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
6644 chrome
.system
.storage
.getInfo = function(callback
) {};
6648 * Ejects a removable storage device.
6649 * @param {string} id The transient device ID from StorageUnitInfo.
6650 * @param {function(string)} callback Callback function where the value
6651 * is any of: "success", "in_use", "no_such_device", "failure"
6653 chrome
.system
.storage
.ejectDevice = function(id
, callback
) {};
6657 * Gets the available capacity of a specified storage device.
6658 * @param {string} id The transient device ID from StorageUnitInfo.
6659 * @param {function(Object.<string, number>)} callback A callback function that
6660 * accepts an object with {@code id} and {@code availableCapacity} fields.
6662 chrome
.system
.storage
.getAvailableCapacity = function(id
, callback
) {};
6666 * @see http://developer.chrome.com/apps/usb.html
6674 chrome
.usb
.Device
= function Device() {};
6677 /** @type {number} */
6678 chrome
.usb
.Device
.prototype.device
;
6681 /** @type {number} */
6682 chrome
.usb
.Device
.prototype.vendorId
;
6685 /** @type {number} */
6686 chrome
.usb
.Device
.prototype.productId
;
6691 chrome
.usb
.ConnectionHandle
= function ConnectionHandle() {};
6694 /** @type {number} */
6695 chrome
.usb
.ConnectionHandle
.prototype.handle
;
6698 /** @type {number} */
6699 chrome
.usb
.ConnectionHandle
.prototype.vendorId
;
6702 /** @type {number} */
6703 chrome
.usb
.ConnectionHandle
.prototype.productId
;
6708 * direction: string,
6710 * length: (number|undefined),
6711 * data: (!ArrayBuffer|undefined)
6714 chrome
.usb
.GenericTransferInfo
;
6719 * direction: string,
6720 * recipient: string,
6721 * requestType: string,
6725 * length: (number|undefined),
6726 * data: (!ArrayBuffer|undefined)
6729 chrome
.usb
.ControlTransferInfo
;
6734 chrome
.usb
.TransferResultInfo = function() {};
6737 /** @type {number|undefined} */
6738 chrome
.usb
.TransferResultInfo
.prototype.resultCode
;
6741 /** @type {!ArrayBuffer|undefined} */
6742 chrome
.usb
.TransferResultInfo
.prototype.data
;
6748 * productId: number,
6749 * interfaceId: (number|undefined)
6752 chrome
.usb
.FindDevicesOptions
;
6756 * @see http://developer.chrome.com/apps/usb.html#method-getDevices
6757 * @param {!Object} options The properties to search for on target devices.
6758 * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
6759 * of |Device|s on complete.
6761 chrome
.usb
.getDevices = function(options
, callback
) {};
6765 * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
6766 * @param {!chrome.usb.Device} device The device to request access to.
6767 * @param {number} interfaceId
6768 * @param {function(boolean)} callback
6770 chrome
.usb
.requestAccess = function(device
, interfaceId
, callback
) {};
6774 * @see http://developer.chrome.com/apps/usb.html#method-openDevice
6775 * @param {!chrome.usb.Device} device The device to open.
6776 * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
6777 * created ConnectionHandle on complete.
6779 chrome
.usb
.openDevice = function(device
, callback
) {};
6783 * @see http://developer.chrome.com/apps/usb.html#method-findDevices
6784 * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
6785 * on target devices.
6786 * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
6787 * with the opened ConnectionHandle on complete.
6789 chrome
.usb
.findDevices = function(options
, callback
) {};
6793 * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
6794 * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
6795 * @param {function()=} opt_callback The callback to invoke once the device is
6798 chrome
.usb
.closeDevice = function(handle
, opt_callback
) {};
6802 * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
6803 * @param {!chrome.usb.ConnectionHandle} handle The device from which the
6804 * interfaces should be listed.
6805 * @param {function(!Array.<!Object>)} callback
6806 * The callback to invoke when the interfaces are enumerated.
6808 chrome
.usb
.listInterfaces = function(handle
, callback
) {};
6812 * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
6813 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6814 * interface is to be claimed.
6815 * @param {number} interfaceNumber
6816 * @param {function()} callback The callback to invoke once the interface is
6819 chrome
.usb
.claimInterface = function(handle
, interfaceNumber
, callback
) {};
6823 * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
6824 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6825 * interface is to be released.
6826 * @param {number} interfaceNumber
6827 * @param {function()} callback The callback to invoke once the interface is
6830 chrome
.usb
.releaseInterface = function(handle
, interfaceNumber
, callback
) {};
6834 * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
6835 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
6836 * interface settings are to be set.
6837 * @param {number} interfaceNumber
6838 * @param {number} alternateSetting The alternate setting to set.
6839 * @param {function()} callback The callback to invoke once the interface
6842 chrome
.usb
.setInterfaceAlternateSetting = function(
6843 handle
, interfaceNumber
, alternateSetting
, callback
) {};
6847 * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
6848 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6850 * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
6852 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6853 * transfer has completed.
6855 chrome
.usb
.controlTransfer = function(handle
, transferInfo
, callback
) {};
6859 * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
6860 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
6862 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
6863 * transfer. See GenericTransferInfo.
6864 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6865 * transfer has completed.
6867 chrome
.usb
.bulkTransfer = function(handle
, transferInfo
, callback
) {};
6871 * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
6872 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6874 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
6875 * transfer. See GenericTransferInfo.
6876 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6877 * transfer has completed.
6879 chrome
.usb
.interruptTransfer = function(handle
, transferInfo
, callback
) {};
6883 * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
6884 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
6886 * @param {!Object} transferInfo The parameters to the transfer. See
6887 * IsochronousTransferInfo.
6888 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
6889 * transfer has been completed.
6891 chrome
.usb
.isochronousTransfer = function(handle
, transferInfo
, callback
) {};
6895 * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
6896 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
6897 * @param {function(boolean)} callback Invoked once the device is reset with a
6898 * boolean indicating whether the reset completed successfully.
6900 chrome
.usb
.resetDevice = function(handle
, callback
) {};
6905 * @see https://developer.chrome.com/apps/webstore
6907 chrome
.webstore
= {};
6911 * @param {string|function()|function(string)=}
6912 * opt_urlOrSuccessCallbackOrFailureCallback Either the URL to install or
6913 * the succcess callback taking no arg or the failure callback taking an
6915 * @param {function()|function(string)=} opt_successCallbackOrFailureCallback
6916 * Either the succcess callback taking no arg or the failure callback
6917 * taking an error string arg.
6918 * @param {function(string)=} opt_failureCallback The failure callback.
6920 chrome
.webstore
.install = function(
6921 opt_urlOrSuccessCallbackOrFailureCallback
,
6922 opt_successCallbackOrFailureCallback
,
6923 opt_failureCallback
) {};
6926 /** @type {!ChromeStringEvent} */
6927 chrome
.webstore
.onInstallStageChanged
;
6930 /** @type {!ChromeNumberEvent} */
6931 chrome
.webstore
.onDownloadProgress
;
6934 ////////////////////////////////////////////////////////////////////////////////
6935 /////////////////////////// Chrome Private APIs ////////////////////////////////
6936 ////////////////////////////////////////////////////////////////////////////////
6940 chrome
.screenlockPrivate
= {};
6944 * @param {string} message Displayed on the unlock screen.
6946 chrome
.screenlockPrivate
.showMessage = function(message
) {};
6950 * @param {function(boolean)} callback
6952 chrome
.screenlockPrivate
.getLocked = function(callback
) {};
6956 * @param {boolean} locked If true and the screen is unlocked, locks the screen.
6957 * If false and the screen is locked, unlocks the screen.
6959 chrome
.screenlockPrivate
.setLocked = function(locked
) {};
6962 /** @type {!ChromeBooleanEvent} */
6963 chrome
.screenlockPrivate
.onChanged
;
6969 chrome
.musicManagerPrivate
= {};
6973 * @param {function(string): void} callback
6975 chrome
.musicManagerPrivate
.getDeviceId = function(callback
) {};
6981 chrome
.mediaGalleriesPrivate
= {};
6985 * @typedef {function({deviceId: string, deviceName: string}): void}
6987 chrome
.mediaGalleriesPrivate
.DeviceCallback
;
6991 * @typedef {function({galleryId: string}): void}
6993 chrome
.mediaGalleriesPrivate
.GalleryChangeCallback
;
6997 * @typedef {function({galleryId: string, success: boolean}): void}
6999 chrome
.mediaGalleriesPrivate
.AddGalleryWatchCallback
;
7003 * @param {string} galleryId
7004 * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
7006 chrome
.mediaGalleriesPrivate
.addGalleryWatch = function(galleryId
, callback
) {};
7010 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
7011 * @deprecated Use {chrome.system.storage.onAttach}.
7013 chrome
.mediaGalleriesPrivate
.onDeviceAttached
;
7017 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
7018 * @deprecated Use {chrome.system.storage.onDetach}.
7020 chrome
.mediaGalleriesPrivate
.onDeviceDetached
;
7024 * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
7026 chrome
.mediaGalleriesPrivate
.onGalleryChanged
;
7032 * @deprecated Use {chrome.system.storage.DeviceEvent}.
7034 chrome
.mediaGalleriesPrivate
.DeviceEvent = function() {};
7038 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7039 * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
7041 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.addListener
=
7042 function(callback
) {};
7046 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7047 * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
7049 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.removeListener
=
7050 function(callback
) {};
7054 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7055 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
7057 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListener
=
7058 function(callback
) {};
7063 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
7065 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListeners
=
7066 function(callback
) {};
7073 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent = function() {};
7077 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7079 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.addListener
=
7080 function(callback
) {};
7084 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7086 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.removeListener
=
7087 function(callback
) {};
7091 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7093 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListener
=
7094 function(callback
) {};
7100 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListeners
=
7105 * WARNING(2014/08/04): This API is still under active initial development and
7106 * unstable and has a number of issues:
7108 * 1. The types NetworkProperties and ManagedNetworkProperties are not defined
7109 * in the docs; that is, there is no list of fields and their types.
7110 * Therefore, these types are treated as bags-of-objects, rather than types.
7111 * 2. According to Steven Bennetts, NetworkProperties *should* be a
7112 * bag-of-properties as it's a map containing ONC properties and the ONC
7113 * properties do not follow the JS field naming conventions; specifically,
7114 * the properties start with an uppercase letter, and at least one property
7115 * is in all uppercase.
7116 * 3. The deviceSsid and deviceBssid fields of VerticationProperties are listed
7117 * as being required while their description mentions "Only set if" which
7118 * sound optional. The dev team was unclear whether they are required or
7120 * 4. Some parameters to some functions are marked as being in the Beta channel
7121 * only (for example, the networkGuid parameter to getCaptivePortalStatus).
7123 * Because of the above issues, this API should not be used as an example for
7124 * other APIs added to this file. Please contact mednik@ for questions on and
7125 * maintenance for this API.
7127 * @see https://developer.chrome.com/extensions/networkingPrivate
7129 chrome
.networkingPrivate
= {};
7134 * certificate: string,
7135 * publicKey: string,
7137 * signedData: string,
7138 * deviceSerial: string,
7139 * deviceSsid: string,
7140 * deviceBssid: string
7143 chrome
.networkingPrivate
.VerificationProperties
;
7148 * networkType: string,
7149 * visible: (boolean|undefined),
7150 * configured: (boolean|undefined),
7151 * limit: (number|undefined)
7154 chrome
.networkingPrivate
.NetworkFilter
;
7158 * @param {string} guid
7159 * @param {function(!Object)} callback
7161 chrome
.networkingPrivate
.getProperties = function(guid
, callback
) {};
7165 * @param {string} guid
7166 * @param {function(!Object)} callback
7168 chrome
.networkingPrivate
.getManagedProperties = function(guid
, callback
) {};
7172 * @param {string} guid
7173 * @param {function(!Object)} callback
7175 chrome
.networkingPrivate
.getState = function(guid
, callback
) {};
7179 * @param {string} guid
7180 * @param {!Object} properties
7181 * @param {function()} callback
7183 chrome
.networkingPrivate
.setProperties = function(guid
, properties
, callback
) {
7188 * @param {boolean} shared
7189 * @param {!Object} properties
7190 * @param {function(string)} callback Returns guid of the configured
7193 chrome
.networkingPrivate
.createNetwork
=
7194 function(shared
, properties
, callback
) {};
7198 * @param {!chrome.networkingPrivate.NetworkFilter} filter
7199 * @param {function(!Array.<!Object>)=} opt_callback
7201 chrome
.networkingPrivate
.getNetworks = function(filter
, opt_callback
) {};
7205 * @param {string} type
7206 * @param {function(!Array.<!Object>)=} opt_callback
7208 chrome
.networkingPrivate
.getVisibleNetworks = function(type
, opt_callback
) {};
7211 /** @param {function(!Array.<string>)=} opt_callback */
7212 chrome
.networkingPrivate
.getEnabledNetworkTypes = function(opt_callback
) {};
7215 /** @param {string} networkType */
7216 chrome
.networkingPrivate
.enableNetworkType = function(networkType
) {};
7219 /** @param {string} networkType */
7220 chrome
.networkingPrivate
.disableNetworkType = function(networkType
) {};
7224 * Requests that the networking subsystem scan for new networks and update the
7225 * list returned by getVisibleNetworks.
7227 chrome
.networkingPrivate
.requestNetworkScan = function() {};
7231 * @param {string} guid
7232 * @param {function()=} opt_callback
7234 chrome
.networkingPrivate
.startConnect = function(guid
, opt_callback
) {};
7238 * @param {string} guid
7239 * @param {function()=} opt_callback
7241 chrome
.networkingPrivate
.startDisconnect = function(guid
, opt_callback
) {};
7245 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7246 * @param {function(boolean)} callback
7248 chrome
.networkingPrivate
.verifyDestination
=
7249 function(verificationInfo
, callback
) {};
7253 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7254 * @param {string} guid
7255 * @param {function(string)} callback
7257 chrome
.networkingPrivate
.verifyAndEncryptCredentials
=
7258 function(verificationInfo
, guid
, callback
) {};
7262 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7263 * @param {string} data
7264 * @param {function(string)} callback
7266 chrome
.networkingPrivate
.verifyAndEncryptData
=
7267 function(verificationInfo
, data
, callback
) {};
7271 * @param {string} ipOrMacAddress
7272 * @param {boolean} enabled
7273 * @param {function(string)} callback
7275 chrome
.networkingPrivate
.setWifiTDLSEnabledState
=
7276 function(ipOrMacAddress
, enabled
, callback
) {};
7280 * @param {string} ipOrMacAddress
7281 * @param {function(string)} callback
7283 chrome
.networkingPrivate
.getWifiTDLSStatus
=
7284 function(ipOrMacAddress
, callback
) {};
7288 * @param {string} guid
7289 * @param {function(string)} callback
7291 chrome
.networkingPrivate
.getCaptivePortalStatus = function(guid
, callback
) {};
7294 /** @type {!ChromeStringArrayEvent} */
7295 chrome
.networkingPrivate
.onNetworksChanged
;
7298 /** @type {!ChromeStringArrayEvent} */
7299 chrome
.networkingPrivate
.onNetworkListChanged
;
7302 /** @type {!ChromeStringStringEvent} */
7303 chrome
.networkingPrivate
.onPortalDetectionCompleted
;
7307 * WARNING(2014/08/14): This API is still under active initial development and
7308 * unstable. The types are not well defined or documented, and this API
7309 * definition here should not be used as an example for other APIs added to this
7310 * file. Please contact mednik@ for questions on and maintenance for this API.
7312 * @see http://goo.gl/afV8wB
7318 * Data type sent to the event handler of chrome.mdns.onServiceList.
7319 * TODO: This one event handler data type is being made a typedef
7320 * as an experiment. This allows us to create these objects in tests to pass
7321 * to the handlers which isn't possible by using the object form.
7323 * serviceName: string,
7324 * serviceHostPort: string,
7325 * ipAddress: string,
7326 * serviceData: !Array.<string>}}
7328 chrome
.mdns
.MdnsService
;
7333 * Event whose listeners take an array of MdnsService parameter.
7336 chrome
.mdns
.ServiceListEvent = function() {};
7340 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
7341 * @param {!Object=} opt_filter
7343 chrome
.mdns
.ServiceListEvent
.prototype.addListener
=
7344 function(callback
, opt_filter
) {};
7347 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
7348 chrome
.mdns
.ServiceListEvent
.prototype.removeListener = function(callback
) {};
7352 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
7355 chrome
.mdns
.ServiceListEvent
.prototype.hasListener = function(callback
) {};
7358 /** @return {boolean} */
7359 chrome
.mdns
.ServiceListEvent
.prototype.hasListeners = function() {};
7362 /** @type {!chrome.mdns.ServiceListEvent} */
7363 chrome
.mdns
.onServiceList
;
7368 * @see http://goo.gl/79p5h5
7370 chrome
.gcdPrivate
= {};
7374 * Represents a GCD device discovered locally or registered to a given user.
7375 * deviceId: Opaque device identifier to be passed to API.
7376 * setupType: How this device was discovered.
7377 * cloudId: Cloud identifier string.
7378 * deviceName: Device human readable name.
7379 * deviceType: Device type (camera, printer, etc).
7380 * deviceDescription: Device human readable description.
7383 * setupType: string,
7384 * cloudId: (string|undefined),
7385 * deviceType: string,
7386 * deviceName: string,
7387 * deviceDescription: string
7390 chrome
.gcdPrivate
.Device
;
7395 chrome
.gcdPrivate
.ConfirmationInfo = function() {};
7398 /** @type {string} */
7399 chrome
.gcdPrivate
.ConfirmationInfo
.prototype.type
;
7402 /** @type {string|undefined} */
7403 chrome
.gcdPrivate
.ConfirmationInfo
.prototype.code
;
7407 * Returns the list of cloud devices visible locally or available in the
7408 * cloud for user account.
7409 * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
7411 chrome
.gcdPrivate
.getCloudDeviceList = function(callback
) {};
7415 * Queries network for local devices. Triggers onDeviceStateChanged and
7416 * onDeviceRemoved events. Call this function *only* after registering for
7417 * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
7419 chrome
.gcdPrivate
.queryForNewLocalDevices = function() {};
7423 * Cache the WiFi password in the browser process for use during
7424 * provisioning. This is done to allow the gathering of the wifi password to
7425 * not be done while connected to the device's network. Callback is called
7426 * with true if wifi password was cached and false if it was unavailable.
7427 * @param {string} ssid
7428 * @param {function(boolean): void} callback
7430 chrome
.gcdPrivate
.prefetchWifiPassword = function(ssid
, callback
) {};
7434 * Establish the session.
7435 * @param {string} ipAddress
7436 * @param {number} port
7437 * @param {function(number, string, !chrome.gcdPrivate.ConfirmationInfo): void}
7438 * callback Called when the session is established or on error. 1st param,
7439 * |sessionId|, is the session ID (identifies the session for future calls).
7440 * 2nd param, |status|, is the status (success or type of error). 3rd param,
7441 * |confirmationInfo|, is the info about how the device handles
7444 chrome
.gcdPrivate
.establishSession = function(ipAddress
, port
, callback
) {};
7448 * Confirm that the code is correct. Device will still need to confirm. |code|
7449 * must be present and must match the code from the device, even when the code
7450 * is supplied in the |ConfirmationInfo| object.
7451 * @param {number} sessionId
7452 * @param {string} code
7453 * @param {function(string): void} callback
7455 chrome
.gcdPrivate
.confirmCode = function(sessionId
, code
, callback
) {};
7459 * Send an encrypted message to the device. If the message is a setup message
7460 * with a wifi ssid specified but no password, the password cached from
7461 * prefetchWifiPassword() will be used and the call will fail if it's not
7462 * available. For open networks use an empty string as the password.
7463 * @param {number} sessionId
7464 * @param {string} api The API path.
7465 * @param {!Object} input The input message to be sent over the encrypted
7467 * @param {function(string, ?Object): void} callback
7469 chrome
.gcdPrivate
.sendMessage = function(sessionId
, api
, input
, callback
) {};
7473 * Terminate the session with the device.
7474 * @param {number} sessionId
7476 chrome
.gcdPrivate
.terminateSession = function(sessionId
) {};
7480 * Returns command definitions.
7481 * @param {string} deviceId The device to get command definitions for.
7482 * @param {function(!Object): void} callback The result callback.
7484 chrome
.gcdPrivate
.getCommandDefinitions = function(deviceId
, callback
) {};
7488 * Creates and sends a new command.
7489 * @param {string} deviceId The device to send the command to.
7490 * @param {number} expireInMs The number of milliseconds since now before the
7491 * command expires. An expired command should not be executed by the device.
7492 * Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
7493 * inclusive. All values outside that range will be replaced by 30 days.
7494 * @param {!Object} command Described at
7495 * https://developers.google.com/cloud-devices/v1/reference/commands.
7496 * @param {function(!Object): void} callback The result callback.
7498 chrome
.gcdPrivate
.insertCommand = function(
7499 deviceId
, expireInMs
, command
, callback
) {};
7503 * Returns a particular command.
7504 * @param {string} commandId Unique command ID.
7505 * @param {function(!Object): void} callback The result callback.
7507 chrome
.gcdPrivate
.getCommand = function(commandId
, callback
) {};
7511 * Cancels a command.
7512 * @param {string} commandId Unique command ID.
7513 * @param {function(!Object): void} callback The result callback.
7515 chrome
.gcdPrivate
.cancelCommand = function(commandId
, callback
) {};
7519 * Lists all commands in order of creation.
7520 * @param {string} deviceId The device to send the command to.
7521 * @param {string} byUser List all the commands issued by the user. Special
7522 * value 'me' can be used to list by the current user.
7523 * @param {string} state Command state.
7524 * @param {function(!Array.<!Object>): void} callback The result callback.
7526 chrome
.gcdPrivate
.getCommandsList = function(
7527 deviceId
, byUser
, state
, callback
) {};
7532 * Event whose listeners take a chrome.gcdPrivate.Device.
7535 chrome
.gcdPrivate
.DeviceEvent = function() {};
7538 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7539 chrome
.gcdPrivate
.DeviceEvent
.prototype.addListener = function(callback
) {};
7542 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7543 chrome
.gcdPrivate
.DeviceEvent
.prototype.removeListener = function(callback
) {};
7547 * @param {function(!chrome.gcdPrivate.Device): void} callback
7550 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListener = function(callback
) {};
7553 /** @return {boolean} */
7554 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListeners = function() {};
7558 * Fires when a device's state changes. When a listener is first added, this
7559 * event fires for all known devices on the network. Afterwards, it will fire
7560 * with device status updates.
7561 * @type {!chrome.gcdPrivate.DeviceEvent}
7563 chrome
.gcdPrivate
.onDeviceStateChanged
;
7567 * Fires when a given device disappears.
7568 * |deviceId| The device that has disappeared.
7569 * @type {!ChromeStringEvent}
7571 chrome
.gcdPrivate
.onDeviceRemoved
;
7576 * @see http://goo.gl/bKHibo
7578 chrome
.bluetoothPrivate
= {};
7583 chrome
.bluetoothPrivate
.PairingEvent = function() {};
7586 /** @type {string} */
7587 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pairing
;
7590 /** @type {!chrome.bluetooth.Device} */
7591 chrome
.bluetoothPrivate
.PairingEvent
.prototype.device
;
7594 /** @type {string|undefined} */
7595 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pincode
;
7598 /** @type {number|undefined} */
7599 chrome
.bluetoothPrivate
.PairingEvent
.prototype.passkey
;
7602 /** @type {number|undefined} */
7603 chrome
.bluetoothPrivate
.PairingEvent
.prototype.enteredKey
;
7608 * name: (string|undefined),
7609 * powered: (boolean|undefined),
7610 * discoverable: (boolean|undefined)
7613 chrome
.bluetoothPrivate
.NewAdapterState
;
7618 * device: !chrome.bluetooth.Device,
7619 * response: (string|undefined),
7620 * pincode: (string|undefined),
7621 * passkey: (number|undefined),
7622 * enteredKey: (number|undefined)
7625 chrome
.bluetoothPrivate
.SetPairingResponseOptions
;
7629 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
7630 * @param {function()} callback
7632 chrome
.bluetoothPrivate
.setAdapterState = function(adapterState
, callback
) {};
7636 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
7637 * @param {function()} callback
7639 chrome
.bluetoothPrivate
.setPairingResponse = function(options
, callback
) {};
7644 * Event whose listeners take a PairingEvent parameter.
7647 chrome
.bluetoothPrivate
.PairingEventEvent = function() {};
7650 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
7651 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.addListener
=
7652 function(callback
) {};
7655 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
7656 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.removeListener
=
7657 function(callback
) {};
7661 * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
7664 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListener
=
7665 function(callback
) {};
7668 /** @return {boolean} */
7669 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListeners
=
7673 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
7674 chrome
.bluetoothPrivate
.onPairing
;