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
= {};
2307 * tabId: (number|undefined)
2310 chrome
.browserAction
.Tab
;
2314 * @typedef {Array<number>}
2315 * @see https://developer.chrome.com/extensions/browserAction#type-ColorArray
2317 chrome
.browserAction
.ColorArray
;
2322 * imageData: (!ImageData|!Object.<number, !ImageData>|undefined),
2323 * path: (string|!Object.<number, string>|undefined),
2324 * tabId: (number|undefined)
2327 chrome
.browserAction
.SetIconImageData
;
2333 * tabId: (number|undefined)
2335 * @see https://developer.chrome.com/extensions/browserAction#method-setTitle
2337 chrome
.browserAction
.setTitle = function(details
) {};
2341 * @param {!chrome.browserAction.Tab} details
2342 * @param {function(string): void} callback
2343 * @see https://developer.chrome.com/extensions/browserAction#method-getTitle
2345 chrome
.browserAction
.getTitle = function(details
, callback
) {};
2349 * @param {!chrome.browserAction.SetIconImageData} details
2350 * @param {function(): void=} opt_callback
2351 * @see https://developer.chrome.com/extensions/browserAction#method-setIcon
2353 chrome
.browserAction
.setIcon = function(details
, opt_callback
) {};
2358 * tabId: (number|undefined),
2361 * @see https://developer.chrome.com/extensions/browserAction#method-setPopup
2363 chrome
.browserAction
.setPopup = function(details
) {};
2367 * @param {!chrome.browserAction.Tab} details
2368 * @param {function(string): void} callback
2369 * @see https://developer.chrome.com/extensions/browserAction#method-getPopup
2371 chrome
.browserAction
.getPopup = function(details
, callback
) {};
2377 * tabId: (number|undefined)
2379 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeText
2381 chrome
.browserAction
.setBadgeText = function(details
) {};
2385 * @param {!chrome.browserAction.Tab} details
2386 * @param {function(string): void} callback
2387 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeText
2389 chrome
.browserAction
.getBadgeText = function(details
, callback
) {};
2394 * color: (string|chrome.browserAction.ColorArray),
2395 * tabId: (number|undefined)
2397 * @see https://developer.chrome.com/extensions/browserAction#method-setBadgeBackgroundColor
2399 chrome
.browserAction
.setBadgeBackgroundColor = function(details
) {};
2403 * @param {!chrome.browserAction.Tab} details
2404 * @param {function(chrome.browserAction.ColorArray): void} callback
2405 * @see https://developer.chrome.com/extensions/browserAction#method-getBadgeBackgroundColor
2407 chrome
.browserAction
.getBadgeBackgroundColor = function(details
, callback
) {};
2411 * @param {number=} opt_tabId
2412 * @see https://developer.chrome.com/extensions/browserAction#method-enable
2414 chrome
.browserAction
.enable = function(opt_tabId
) {};
2418 * @param {number=} opt_tabId
2419 * @see https://developer.chrome.com/extensions/browserAction#method-disable
2421 chrome
.browserAction
.disable = function(opt_tabId
) {};
2427 chrome
.browserAction
.BrowserActionTabEvent = function() {};
2431 * @param {function(!Tab): void} callback
2433 chrome
.browserAction
.BrowserActionTabEvent
.prototype.addListener
=
2434 function(callback
) {};
2438 * @param {function(!Tab): void} callback
2440 chrome
.browserAction
.BrowserActionTabEvent
.prototype.removeListener
=
2441 function(callback
) {};
2445 * @param {function(!Tab): void} callback
2448 chrome
.browserAction
.BrowserActionTabEvent
.prototype.hasListener
=
2449 function(callback
) {};
2452 /** @return {boolean} */
2453 chrome
.browserAction
.BrowserActionTabEvent
.prototype.hasListeners
=
2458 * @type {!chrome.browserAction.BrowserActionTabEvent}
2459 * @see https://developer.chrome.com/extensions/browserAction#event-onClicked
2461 chrome
.browserAction
.onClicked
;
2466 * @see https://developer.chrome.com/extensions/bookmarks.html
2468 chrome
.bookmarks
= {};
2473 * parentId: (string|undefined),
2474 * index: (number|undefined),
2475 * url: (string|undefined),
2476 * title: (string|undefined)
2478 * @see https://developer.chrome.com/extensions/bookmarks#method-create
2480 chrome
.bookmarks
.CreateDetails
;
2485 * query: (string|undefined),
2486 * url: (string|undefined),
2487 * title: (string|undefined)
2489 * @see https://developer.chrome.com/extensions/bookmarks#method-search
2491 chrome
.bookmarks
.SearchDetails
;
2495 * @param {(string|Array.<string>)} idOrIdList
2496 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2497 * callback function which accepts an array of BookmarkTreeNode.
2498 * @return {Array.<BookmarkTreeNode>}
2500 chrome
.bookmarks
.get = function(idOrIdList
, callback
) {};
2504 * @param {string} id
2505 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2506 * callback function which accepts an array of BookmarkTreeNode.
2507 * @return {Array.<BookmarkTreeNode>}
2509 chrome
.bookmarks
.getChildren = function(id
, callback
) {};
2513 * @param {number} numberOfItems The number of items to return.
2514 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2515 * callback function which accepts an array of BookmarkTreeNode.
2516 * @return {Array.<BookmarkTreeNode>}
2518 chrome
.bookmarks
.getRecent = function(numberOfItems
, callback
) {};
2522 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2523 * callback function which accepts an array of BookmarkTreeNode.
2524 * @return {Array.<BookmarkTreeNode>}
2526 chrome
.bookmarks
.getTree = function(callback
) {};
2530 * @param {string} id The ID of the root of the subtree to retrieve.
2531 * @param {function(Array.<BookmarkTreeNode>): void} callback The
2532 * callback function which accepts an array of BookmarkTreeNode.
2533 * @return {Array.<BookmarkTreeNode>}
2535 chrome
.bookmarks
.getSubTree = function(id
, callback
) {};
2539 * @param {string|!chrome.bookmarks.SearchDetails} query
2540 * @param {function(Array.<BookmarkTreeNode>): void} callback
2541 * @return {Array.<BookmarkTreeNode>}
2543 chrome
.bookmarks
.search = function(query
, callback
) {};
2547 * @param {chrome.bookmarks.CreateDetails} bookmark
2548 * @param {function(BookmarkTreeNode): void=} opt_callback The
2549 * callback function which accepts a BookmarkTreeNode object.
2551 chrome
.bookmarks
.create = function(bookmark
, opt_callback
) {};
2555 * @param {string} id
2556 * @param {Object} destination An object which has optional 'parentId' and
2558 * @param {function(BookmarkTreeNode): void=} opt_callback
2559 * The callback function which accepts a BookmarkTreeNode object.
2561 chrome
.bookmarks
.move = function(id
, destination
, opt_callback
) {};
2565 * @param {string} id
2566 * @param {Object} changes An object which may have 'title' as a key.
2567 * @param {function(BookmarkTreeNode): void=} opt_callback The
2568 * callback function which accepts a BookmarkTreeNode object.
2570 chrome
.bookmarks
.update = function(id
, changes
, opt_callback
) {};
2574 * @param {string} id
2575 * @param {function(): void=} opt_callback
2577 chrome
.bookmarks
.remove = function(id
, opt_callback
) {};
2581 * @param {string} id
2582 * @param {function(): void=} opt_callback
2584 chrome
.bookmarks
.removeTree = function(id
, opt_callback
) {};
2588 * @param {function(): void=} opt_callback
2590 chrome
.bookmarks
.import = function(opt_callback
) {};
2594 * @param {function(): void=} opt_callback
2596 chrome
.bookmarks
.export = function(opt_callback
) {};
2599 /** @type {!ChromeEvent} */
2600 chrome
.bookmarks
.onChanged
;
2603 /** @type {!ChromeEvent} */
2604 chrome
.bookmarks
.onChildrenReordered
;
2607 /** @type {!ChromeEvent} */
2608 chrome
.bookmarks
.onCreated
;
2611 /** @type {!ChromeEvent} */
2612 chrome
.bookmarks
.onImportBegan
;
2615 /** @type {!ChromeEvent} */
2616 chrome
.bookmarks
.onImportEnded
;
2619 /** @type {!ChromeEvent} */
2620 chrome
.bookmarks
.onMoved
;
2623 /** @type {!ChromeEvent} */
2624 chrome
.bookmarks
.onRemoved
;
2630 * description: string
2638 * @see https://developer.chrome.com/extensions/omnibox.html
2640 chrome
.omnibox
= {};
2645 chrome
.omnibox
.InputChangedEvent = function() {};
2649 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2651 chrome
.omnibox
.InputChangedEvent
.prototype.addListener = function(callback
) {};
2655 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2657 chrome
.omnibox
.InputChangedEvent
.prototype.removeListener
=
2658 function(callback
) {};
2662 * @param {function(string, function(!Array.<!SuggestResult>)): void} callback
2665 chrome
.omnibox
.InputChangedEvent
.prototype.hasListener = function(callback
) {};
2668 /** @return {boolean} */
2669 chrome
.omnibox
.InputChangedEvent
.prototype.hasListeners = function() {};
2674 chrome
.omnibox
.InputEnteredEvent = function() {};
2677 /** @param {function(string, string): void} callback */
2678 chrome
.omnibox
.InputEnteredEvent
.prototype.addListener = function(callback
) {};
2681 /** @param {function(string, string): void} callback */
2682 chrome
.omnibox
.InputEnteredEvent
.prototype.removeListener
=
2683 function(callback
) {};
2687 * @param {function(string, string): void} callback
2690 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListener = function(callback
) {};
2693 /** @return {boolean} */
2694 chrome
.omnibox
.InputEnteredEvent
.prototype.hasListeners = function() {};
2698 * @param {{description: string}} suggestion A partial SuggestResult object.
2700 chrome
.omnibox
.setDefaultSuggestion = function(suggestion
) {};
2703 /** @type {!ChromeEvent} */
2704 chrome
.omnibox
.onInputCancelled
;
2707 /** @type {!chrome.omnibox.InputChangedEvent} */
2708 chrome
.omnibox
.onInputChanged
;
2711 /** @type {!chrome.omnibox.InputEnteredEvent} */
2712 chrome
.omnibox
.onInputEntered
;
2715 /** @type {!ChromeEvent} */
2716 chrome
.omnibox
.onInputStarted
;
2721 * @see https://developer.chrome.com/extensions/dev/contextMenus.html
2723 chrome
.contextMenus
= {};
2728 * type: (string|undefined),
2729 * id: (string|undefined),
2730 * title: (string|undefined),
2731 * checked: (boolean|undefined),
2732 * contexts: (!Array.<string>|undefined),
2733 * onclick: (function(!Object, !Tab)|undefined),
2734 * parentId: (number|string|undefined),
2735 * documentUrlPatterns: (!Array.<string>|undefined),
2736 * targetUrlPatterns: (!Array.<string>|undefined),
2737 * enabled: (boolean|undefined)
2739 * @see https://developer.chrome.com/extensions/contextMenus#method-create
2741 chrome
.contextMenus
.CreateProperties
;
2746 * type: (string|undefined),
2747 * title: (string|undefined),
2748 * checked: (boolean|undefined),
2749 * contexts: (!Array.<string>|undefined),
2750 * onclick: (function(!Object, !Tab)|undefined),
2751 * parentId: (number|string|undefined),
2752 * documentUrlPatterns: (!Array.<string>|undefined),
2753 * targetUrlPatterns: (!Array.<string>|undefined),
2754 * enabled: (boolean|undefined)
2756 * @see https://developer.chrome.com/extensions/contextMenus#method-update
2758 chrome
.contextMenus
.UpdateProperties
;
2762 * @param {!chrome.contextMenus.CreateProperties} createProperties
2763 * @param {function()=} opt_callback
2764 * @return {(number|string)} The id of the newly created window.
2765 * @see https://developer.chrome.com/extensions/contextMenus#method-create
2767 chrome
.contextMenus
.create = function(createProperties
, opt_callback
) {};
2771 * @param {(number|string)} id
2772 * @param {!chrome.contextMenus.UpdateProperties} updateProperties
2773 * @param {function()=} opt_callback
2774 * @see https://developer.chrome.com/extensions/contextMenus#method-update
2776 chrome
.contextMenus
.update = function(id
, updateProperties
, opt_callback
) {};
2780 * @param {(number|string)} menuItemId
2781 * @param {function()=} opt_callback
2782 * @see https://developer.chrome.com/extensions/contextMenus#method-remove
2784 chrome
.contextMenus
.remove = function(menuItemId
, opt_callback
) {};
2788 * @param {function()=} opt_callback
2789 * @see https://developer.chrome.com/extensions/contextMenus#method-removeAll
2791 chrome
.contextMenus
.removeAll = function(opt_callback
) {};
2796 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
2798 chrome
.contextMenus
.ClickedEvent = function() {};
2802 * @param {function(!Object, !Tab=)} callback
2804 chrome
.contextMenus
.ClickedEvent
.prototype.addListener = function(callback
) {};
2808 * @param {function(!Object, !Tab=)} callback
2810 chrome
.contextMenus
.ClickedEvent
.prototype.removeListener
=
2811 function(callback
) {};
2815 * @param {function(!Object, !Tab=)} callback
2818 chrome
.contextMenus
.ClickedEvent
.prototype.hasListener = function(callback
) {};
2824 chrome
.contextMenus
.ClickedEvent
.prototype.hasListeners = function() {};
2828 * @type {!chrome.contextMenus.ClickedEvent}
2829 * @see https://developer.chrome.com/extensions/contextMenus#event-onClicked
2831 chrome
.contextMenus
.onClicked
;
2836 * @see https://developer.chrome.com/extensions/dev/cookies.html
2838 chrome
.cookies
= {};
2842 * This typedef is used for the parameters to chrome.cookies.get,
2843 * chrome.cookies.remove, and for the parameter to remove's callback. These uses
2844 * all identify a single cookie uniquely without specifying its content, and the
2845 * objects are identical except for the the storeId being optional vs required.
2846 * If greater divergence occurs, then going to two typedefs is recommended.
2851 * storeId: (string|undefined)
2854 chrome
.cookies
.CookieIdentifier
;
2858 * @param {!chrome.cookies.CookieIdentifier} details
2859 * @param {function(Cookie=): void} callback
2861 chrome
.cookies
.get = function(details
, callback
) {};
2865 * @param {Object} details
2866 * @param {function(Array.<Cookie>): void} callback
2868 chrome
.cookies
.getAll = function(details
, callback
) {};
2872 * @param {function(Array.<CookieStore>): void} callback
2874 chrome
.cookies
.getAllCookieStores = function(callback
) {};
2878 * @param {!chrome.cookies.CookieIdentifier} details
2879 * @param {function(chrome.cookies.CookieIdentifier): void=} opt_callback If
2880 * removal failed for any reason, the parameter will be "null", and
2881 * "chrome.runtime.lastError" will be set.
2883 chrome
.cookies
.remove = function(details
, opt_callback
) {};
2889 * name: (string|undefined),
2890 * value: (string|undefined),
2891 * domain: (string|undefined),
2892 * path: (string|undefined),
2893 * secure: (boolean|undefined),
2894 * httpOnly: (boolean|undefined),
2895 * expirationDate: (number|undefined),
2896 * storeId: (string|undefined)
2899 chrome
.cookies
.CookieSetDetails
;
2903 * @param {!chrome.cookies.CookieSetDetails} details
2904 * @param {function(Cookie): void=} opt_callback If setting failed for any
2905 * reason, the parameter will be "null", and "chrome.runtime.lastError" will
2908 chrome
.cookies
.set = function(details
, opt_callback
) {};
2912 * @see https://developer.chrome.com/extensions/cookies.html#event-onChanged
2913 * @type {!ChromeEvent}
2915 chrome
.cookies
.onChanged
;
2920 function CookieChangeInfo() {}
2923 /** @type {boolean} */
2924 CookieChangeInfo
.prototype.removed
;
2927 /** @type {Cookie} */
2928 CookieChangeInfo
.prototype.cookie
;
2931 /** @type {string} */
2932 CookieChangeInfo
.prototype.cause
;
2936 chrome
.management
= {};
2941 * showConfirmDialog: (boolean|undefined)
2944 chrome
.management
.InstallOptions
;
2948 * @param {string} id
2949 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
2952 chrome
.management
.get = function(id
, opt_callback
) {};
2956 * @param {function(!Array.<!ExtensionInfo>): void=} opt_callback Optional
2957 * callback function.
2958 * @return {!Array.<!ExtensionInfo>}
2960 chrome
.management
.getAll = function(opt_callback
) {};
2964 * @param {string} id The id of an already installed extension.
2965 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2967 chrome
.management
.getPermissionWarningsById = function(id
, opt_callback
) {};
2971 * @param {string} manifestStr Extension's manifest JSON string.
2972 * @param {function(!Array.<string>)=} opt_callback Optional callback function.
2974 chrome
.management
.getPermissionWarningsByManifest
=
2975 function(manifestStr
, opt_callback
) {};
2979 * @param {string} id The id of an already installed extension.
2980 * @param {function(): void=} opt_callback Optional callback function.
2982 chrome
.management
.launchApp = function(id
, opt_callback
) {};
2986 * @param {string} id The id of an already installed extension.
2987 * @param {boolean} enabled Whether this item should be enabled.
2988 * @param {function(): void=} opt_callback Optional callback function.
2990 chrome
.management
.setEnabled = function(id
, enabled
, opt_callback
) {};
2994 * @param {string} id The id of an already installed extension.
2995 * @param {(!chrome.management.InstallOptions|function(): void)=}
2996 * opt_optionsOrCallback An optional uninstall options object or an optional
2997 * callback function.
2998 * @param {function(): void=} opt_callback Optional callback function.
3000 chrome
.management
.uninstall
=
3001 function(id
, opt_optionsOrCallback
, opt_callback
) {};
3005 * @param {(!chrome.management.InstallOptions|function(): void)=}
3006 * opt_optionsOrCallback An optional uninstall options object or an optional
3007 * callback function.
3008 * @param {function(): void=} opt_callback An optional callback function.
3010 chrome
.management
.uninstallSelf
=
3011 function(opt_optionsOrCallback
, opt_callback
) {};
3015 * @param {string} id The id of an already installed extension.
3016 * @param {function(): void=} opt_callback Optional callback function.
3018 chrome
.management
.createAppShortcut = function(id
, opt_callback
) {};
3022 * @param {string} id The id of an already installed extension.
3023 * @param {string} launchType The LaunchType enum value to set. Make sure this
3024 * value is in ExtensionInfo.availableLaunchTypes because the available
3025 * launch types vary on different platforms and configurations.
3026 * @param {function(): void=} opt_callback Optional callback function.
3028 chrome
.management
.setLaunchType = function(id
, launchType
, opt_callback
) {};
3032 * @param {string} url The URL of a web page. The scheme of the URL can only be
3033 * "http" or "https".
3034 * @param {string} title The title of the generated app.
3035 * @param {function(!ExtensionInfo): void=} opt_callback Optional callback
3038 chrome
.management
.generateAppForLink = function(url
, title
, opt_callback
) {};
3041 /** @type {!ChromeExtensionInfoEvent} */
3042 chrome
.management
.onDisabled
;
3045 /** @type {!ChromeExtensionInfoEvent} */
3046 chrome
.management
.onEnabled
;
3049 /** @type {!ChromeExtensionInfoEvent} */
3050 chrome
.management
.onInstalled
;
3053 /** @type {!ChromeStringEvent} */
3054 chrome
.management
.onUninstalled
;
3059 * @see https://developer.chrome.com/extensions/idle.html
3065 * @param {number} thresholdSeconds Threshold in seconds, used to determine
3066 * when a machine is in the idle state.
3067 * @param {function(string): void} callback Callback to handle the state.
3069 chrome
.idle
.queryState = function(thresholdSeconds
, callback
) {};
3073 * @param {number} intervalInSeconds Threshold, in seconds, used to determine
3074 * when the system is in an idle state.
3076 chrome
.idle
.setDetectionInterval = function(intervalInSeconds
) {};
3079 /** @type {!ChromeEvent} */
3080 chrome
.idle
.onStateChanged
;
3084 * Chrome Text-to-Speech API.
3086 * @see https://developer.chrome.com/extensions/tts.html
3093 * An event from the TTS engine to communicate the status of an utterance.
3096 function TtsEvent() {}
3099 /** @type {string} */
3100 TtsEvent
.prototype.type
;
3103 /** @type {number} */
3104 TtsEvent
.prototype.charIndex
;
3107 /** @type {string} */
3108 TtsEvent
.prototype.errorMessage
;
3113 * A description of a voice available for speech synthesis.
3116 function TtsVoice() {}
3119 /** @type {string} */
3120 TtsVoice
.prototype.voiceName
;
3123 /** @type {string} */
3124 TtsVoice
.prototype.lang
;
3127 /** @type {string} */
3128 TtsVoice
.prototype.gender
;
3131 /** @type {string} */
3132 TtsVoice
.prototype.extensionId
;
3135 /** @type {Array.<string>} */
3136 TtsVoice
.prototype.eventTypes
;
3140 * Gets an array of all available voices.
3141 * @param {function(Array.<TtsVoice>)=} opt_callback An optional callback
3144 chrome
.tts
.getVoices = function(opt_callback
) {};
3148 * Checks if the engine is currently speaking.
3149 * @param {function(boolean)=} opt_callback The callback function.
3151 chrome
.tts
.isSpeaking = function(opt_callback
) {};
3155 * Speaks text using a text-to-speech engine.
3156 * @param {string} utterance The text to speak, either plain text or a complete,
3157 * well-formed SSML document. Speech engines that do not support SSML will
3158 * strip away the tags and speak the text. The maximum length of the text is
3159 * 32,768 characters.
3160 * @param {Object=} opt_options The speech options.
3161 * @param {function()=} opt_callback Called right away, before speech finishes.
3163 chrome
.tts
.speak = function(utterance
, opt_options
, opt_callback
) {};
3167 * Stops any current speech.
3169 chrome
.tts
.stop = function() {};
3174 * @see https://developer.chrome.com/extensions/ttsEngine.html
3176 chrome
.ttsEngine
= {};
3179 /** @type {!ChromeEvent} */
3180 chrome
.ttsEngine
.onSpeak
;
3183 /** @type {!ChromeEvent} */
3184 chrome
.ttsEngine
.onStop
;
3189 * @see https://developer.chrome.com/extensions/contentSettings.html
3191 chrome
.contentSettings
= {};
3194 /** @type {!ContentSetting} */
3195 chrome
.contentSettings
.cookies
;
3198 /** @type {!ContentSetting} */
3199 chrome
.contentSettings
.images
;
3202 /** @type {!ContentSetting} */
3203 chrome
.contentSettings
.javascript
;
3206 /** @type {!ContentSetting} */
3207 chrome
.contentSettings
.plugins
;
3210 /** @type {!ContentSetting} */
3211 chrome
.contentSettings
.popups
;
3214 /** @type {!ContentSetting} */
3215 chrome
.contentSettings
.notifications
;
3220 * @see https://developer.chrome.com/extensions/fileBrowserHandler
3222 chrome
.fileBrowserHandler
= {};
3227 * suggestedName: string,
3228 * allowedFileExtensions: (!Array.<string>|undefined)
3231 chrome
.fileBrowserHandler
.SelectFileSelectionParams
;
3235 * Prompts user to select file path under which file should be saved.
3236 * @see https://developer.chrome.com/extensions/fileBrowserHandler#method-selectFile
3237 * @param {!chrome.fileBrowserHandler.SelectFileSelectionParams} selectionParams
3238 * Parameters that will be used while selecting the file.
3239 * @param {function(!Object)} callback Function called upon completion.
3241 chrome
.fileBrowserHandler
.selectFile = function(selectionParams
, callback
) {};
3246 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3248 chrome
.fileBrowserHandler
.ExecuteEvent = function() {};
3252 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3254 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.addListener = function(
3259 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3261 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.removeListener = function(
3266 * @param {function(string, !FileHandlerExecuteEventDetails)} callback
3269 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.hasListener = function(
3276 chrome
.fileBrowserHandler
.ExecuteEvent
.prototype.hasListeners = function() {};
3280 * Fired when file system action is executed from ChromeOS file browser.
3281 * @see https://developer.chrome.com/extensions/fileBrowserHandler#event-onExecute
3282 * @type {!chrome.fileBrowserHandler.ExecuteEvent}
3284 chrome
.fileBrowserHandler
.onExecute
;
3289 * @see https://developer.chrome.com/extensions/gcm
3295 * @see https://developer.chrome.com/extensions/gcm#property-MAX_MESSAGE_SIZE
3298 chrome
.gcm
.MAX_MESSAGE_SIZE
;
3302 * Registers the application with GCM. The registration ID will be returned by
3303 * the callback. If register is called again with the same list of senderIds,
3304 * the same registration ID will be returned.
3305 * @see https://developer.chrome.com/extensions/gcm#method-register
3306 * @param {!Array.<string>} senderIds A list of server IDs that are allowed to
3307 * send messages to the application.
3308 * @param {function(string): void} callback Function called when
3309 * registration completes with registration ID as argument.
3311 chrome
.gcm
.register = function(senderIds
, callback
) {};
3315 * Unregisters the application from GCM.
3316 * @see https://developer.chrome.com/extensions/gcm#method-unregister
3317 * @param {function(): void} callback Called when unregistration is done.
3319 chrome
.gcm
.unregister = function(callback
) {};
3323 * Sends an upstream message using GCM.
3324 * @see https://developer.chrome.com/extensions/gcm#method-send
3325 * @param {!chrome.gcm.Message} message Message to be sent.
3326 * @param {function(string): void} callback Called with message ID.
3328 chrome
.gcm
.send = function(message
, callback
) {};
3334 * destinationId: string,
3335 * messageId: string,
3336 * timeToLive: (number|undefined),
3337 * data: !Object.<string, string>
3344 * An event, fired when a message is received through GCM.
3345 * @see https://developer.chrome.com/extensions/gcm#event-onMessage
3346 * @type {!chrome.gcm.OnMessageEvent}
3348 chrome
.gcm
.onMessage
;
3352 * An event, fired when GCM server had to delete messages to the application
3353 * from its queue in order to manage its size.
3354 * @see https://developer.chrome.com/extensions/gcm#event-onMessagesDeleted
3355 * @type {!ChromeEvent}
3357 chrome
.gcm
.onMessagesDeleted
;
3361 * An event indicating problems with sending messages.
3362 * @see https://developer.chrome.com/extensions/gcm#event-onSendError
3363 * @type {!chrome.gcm.OnSendErrorEvent}
3365 chrome
.gcm
.onSendError
;
3372 chrome
.gcm
.OnMessageEvent = function() {};
3376 * @param {function(!Object): void} callback Callback.
3378 chrome
.gcm
.OnMessageEvent
.prototype.addListener = function(callback
) {};
3382 * @param {function(!Object): void} callback Callback.
3384 chrome
.gcm
.OnMessageEvent
.prototype.removeListener = function(callback
) {};
3388 * @param {function(!Object): void} callback Callback.
3391 chrome
.gcm
.OnMessageEvent
.prototype.hasListener = function(callback
) {};
3397 chrome
.gcm
.OnMessageEvent
.prototype.hasListeners = function() {};
3404 chrome
.gcm
.OnSendErrorEvent = function() {};
3408 * @param {function(!Object): void} callback Callback.
3410 chrome
.gcm
.OnSendErrorEvent
.prototype.addListener = function(callback
) {};
3414 * @param {function(!Object): void} callback Callback.
3416 chrome
.gcm
.OnSendErrorEvent
.prototype.removeListener = function(callback
) {};
3420 * @param {function(!Object): void} callback Callback.
3423 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListener = function(callback
) {};
3429 chrome
.gcm
.OnSendErrorEvent
.prototype.hasListeners = function() {};
3434 * @see https://developer.chrome.com/extensions/history.html
3436 chrome
.history
= {};
3440 * @param {Object.<string, string>} details Object with a 'url' key.
3442 chrome
.history
.addUrl = function(details
) {};
3446 * @param {function(): void} callback Callback function.
3448 chrome
.history
.deleteAll = function(callback
) {};
3452 * @param {Object.<string, string>} range Object with 'startTime'
3453 * and 'endTime' keys.
3454 * @param {function(): void} callback Callback function.
3456 chrome
.history
.deleteRange = function(range
, callback
) {};
3460 * @param {Object.<string, string>} details Object with a 'url' key.
3462 chrome
.history
.deleteUrl = function(details
) {};
3466 * @param {Object.<string, string>} details Object with a 'url' key.
3467 * @param {function(!Array.<!VisitItem>): void} callback Callback function.
3468 * @return {!Array.<!VisitItem>}
3470 chrome
.history
.getVisits = function(details
, callback
) {};
3474 * @param {Object.<string, string>} query Object with a 'text' (string)
3475 * key and optional 'startTime' (number), 'endTime' (number) and
3476 * 'maxResults' keys.
3477 * @param {function(!Array.<!HistoryItem>): void} callback Callback function.
3478 * @return {!Array.<!HistoryItem>}
3480 chrome
.history
.search = function(query
, callback
) {};
3483 /** @type {!ChromeEvent} */
3484 chrome
.history
.onVisitRemoved
;
3487 /** @type {!ChromeEvent} */
3488 chrome
.history
.onVisited
;
3493 * @see http://developer.chrome.com/apps/identity.html
3494 * TODO: replace TokenDetails, InvalidTokenDetails and
3495 * WebAuthFlowDetails with Object.
3497 chrome
.identity
= {};
3501 * @param {(chrome.identity.TokenDetails|function(string=): void)}
3502 * detailsOrCallback Token options or a callback function if no options are
3504 * @param {function(string=): void=} opt_callback A callback function if options
3507 chrome
.identity
.getAuthToken = function(detailsOrCallback
, opt_callback
) {};
3510 /** @typedef {{interactive: (boolean|undefined)}} */
3511 chrome
.identity
.TokenDetails
;
3515 * @param {chrome.identity.InvalidTokenDetails} details
3516 * @param {function(): void} callback
3518 chrome
.identity
.removeCachedAuthToken = function(details
, callback
) {};
3521 /** @typedef {{token: string}} */
3522 chrome
.identity
.InvalidTokenDetails
;
3526 * @param {chrome.identity.WebAuthFlowDetails} details
3527 * @param {function(string=): void} callback
3529 chrome
.identity
.launchWebAuthFlow = function(details
, callback
) {};
3532 /** @typedef {{url: string, interactive: (boolean|undefined)}} */
3533 chrome
.identity
.WebAuthFlowDetails
;
3536 /** @param {!function(!Object=):void} callback */
3537 chrome
.identity
.getProfileUserInfo = function(callback
) {};
3540 /** @type {!ChromeEvent} */
3541 chrome
.identity
.onSignInChanged
;
3546 * @see https://developer.chrome.com/extensions/input.ime.html
3552 chrome
.input
.ime
= {};
3557 * The OnKeyEvent event takes an extra argument.
3560 function ChromeInputImeOnKeyEventEvent() {}
3564 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3566 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information.
3568 ChromeInputImeOnKeyEventEvent
.prototype.addListener
=
3569 function(callback
, opt_extraInfoSpec
) {};
3573 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3576 ChromeInputImeOnKeyEventEvent
.prototype.removeListener = function(callback
) {};
3580 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3583 ChromeInputImeOnKeyEventEvent
.prototype.hasListener = function(callback
) {};
3587 * @param {function(string, !ChromeKeyboardEvent): (boolean|undefined)} callback
3590 ChromeInputImeOnKeyEventEvent
.prototype.hasListeners = function(callback
) {};
3594 * @param {!Object.<string,number>} parameters An object with a
3595 * 'contextID' (number) key.
3596 * @param {function(boolean): void} callback Callback function.
3598 chrome
.input
.ime
.clearComposition = function(parameters
, callback
) {};
3602 * @param {!Object.<string,(string|number)>} parameters An object with
3603 * 'contextID' (number) and 'text' (string) keys.
3604 * @param {function(boolean): void=} opt_callback Callback function.
3606 chrome
.input
.ime
.commitText = function(parameters
, opt_callback
) {};
3610 * @param {!Object.<string,(string|number)>} parameters An object with
3611 * 'contextID' (number) and 'text' (string) keys.
3612 * @param {function(boolean): void=} opt_callback Callback function.
3614 chrome
.input
.ime
.deleteSurroundingText = function(parameters
, opt_callback
) {};
3618 * @param {!Object.<string,(number|Object.<string,(string|number|boolean)>)>}
3619 * parameters An object with 'engineID' (string) and 'properties'
3621 * @param {function(boolean): void=} opt_callback Callback function.
3623 chrome
.input
.ime
.setCandidateWindowProperties
=
3624 function(parameters
, opt_callback
) {};
3628 * @param {!Object.<string,(number|Object.<string,(string|number)>)>}
3629 * parameters An object with 'contextID' (number) and 'candidates'
3630 * (array of object) keys.
3631 * @param {function(boolean): void=} opt_callback Callback function.
3633 chrome
.input
.ime
.setCandidates = function(parameters
, opt_callback
) {};
3637 * @param {!Object.<string,(string|number|Object.<string,(string|number)>)>}
3638 * parameters An object with 'contextID' (number), 'text' (string),
3639 * 'selectionStart (number), 'selectionEnd' (number), 'cursor' (number),
3640 * and 'segments' (array of object) keys.
3641 * @param {function(boolean): void=} opt_callback Callback function.
3643 chrome
.input
.ime
.setComposition = function(parameters
, opt_callback
) {};
3647 * @param {!Object.<string,number>} parameters An object with
3648 * 'contextID' (number) and 'candidateID' (number) keys.
3649 * @param {function(boolean): void=} opt_callback Callback function.
3651 chrome
.input
.ime
.setCursorPosition = function(parameters
, opt_callback
) {};
3655 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3656 * parameters An object with 'engineID' (string) and 'items'
3657 * (array of object) keys.
3658 * @param {function(): void=} opt_callback Callback function.
3660 chrome
.input
.ime
.setMenuItems = function(parameters
, opt_callback
) {};
3664 * @param {!Object.<string,(string|Array.<Object.<string,(string|boolean)>>)>}
3665 * parameters An object with 'engineID' (string) and 'items'
3666 * (array of object) keys.
3667 * @param {function(): void=} opt_callback Callback function.
3669 chrome
.input
.ime
.updateMenuItems = function(parameters
, opt_callback
) {};
3673 * @param {string} requestId Request id of the event that was handled. This
3674 * should come from keyEvent.requestId.
3675 * @param {boolean} response True if the keystroke was handled, false if not.
3677 chrome
.input
.ime
.keyEventHandled = function(requestId
, response
) {};
3680 /** @type {!ChromeEvent} */
3681 chrome
.input
.ime
.onActivate
;
3684 /** @type {!ChromeEvent} */
3685 chrome
.input
.ime
.onBlur
;
3688 /** @type {!ChromeEvent} */
3689 chrome
.input
.ime
.onCandidateClicked
;
3692 /** @type {!ChromeEvent} */
3693 chrome
.input
.ime
.onDeactivated
;
3696 /** @type {!ChromeEvent} */
3697 chrome
.input
.ime
.onFocus
;
3700 /** @type {!ChromeEvent} */
3701 chrome
.input
.ime
.onInputContextUpdate
;
3704 /** @type {!ChromeInputImeOnKeyEventEvent} */
3705 chrome
.input
.ime
.onKeyEvent
;
3708 /** @type {!ChromeEvent} */
3709 chrome
.input
.ime
.onMenuItemActivated
;
3712 /** @type {!ChromeEvent} */
3713 chrome
.input
.ime
.onReset
;
3716 /** @type {!ChromeEvent} */
3717 chrome
.input
.ime
.onSurroundingTextChanged
;
3722 * @see http://developer.chrome.com/apps/mediaGalleries
3725 chrome
.mediaGalleries
= {};
3729 * @param {{interactive: (string|undefined)}|function(!Array.<!FileSystem>)}
3730 * detailsOrCallback A details object for whether the request should be
3731 * interactive if permissions haven't been granted yet or the callback.
3732 * @param {function(!Array.<!FileSystem>)=} opt_callback A success callback if
3733 * no details were supplied as arg1.
3735 chrome
.mediaGalleries
.getMediaFileSystems = function(
3736 detailsOrCallback
, opt_callback
) {};
3740 * @param {function(!Array.<!FileSystem>, string)} callback Callback function.
3742 chrome
.mediaGalleries
.addUserSelectedFolder = function(callback
) {};
3744 chrome
.mediaGalleries
.startMediaScan = function() {};
3746 chrome
.mediaGalleries
.cancelMediaScan = function() {};
3750 * @param {function(!Array.<!FileSystem>)} callback Callback function.
3752 chrome
.mediaGalleries
.addScanResults = function(callback
) {};
3758 * galleryId: string,
3759 * deviceId: (string|undefined),
3760 * isRemovable: boolean,
3761 * isMediaDevice: boolean,
3762 * isAvailable: boolean
3765 chrome
.mediaGalleries
.MediaFileSystemMetadata
;
3769 * @param {!FileSystem} mediaFileSystem The file system to get metadata for.
3770 * @return {!chrome.mediaGalleries.MediaFileSystemMetadata}
3772 chrome
.mediaGalleries
.getMediaFileSystemMetadata = function(mediaFileSystem
) {};
3776 * @param {function(!Array.<!chrome.mediaGalleries.MediaFileSystemMetadata>)}
3777 * callback Callback function.
3779 chrome
.mediaGalleries
.getAllMediaFileSystemMetadata = function(callback
) {};
3785 * height: (number|undefined),
3786 * width: (number|undefined),
3787 * duration: (number|undefined),
3788 * rotation: (number|undefined),
3789 * album: (string|undefined),
3790 * artist: (string|undefined),
3791 * comment: (string|undefined),
3792 * copyright: (string|undefined),
3793 * disc: (number|undefined),
3794 * genre: (string|undefined),
3795 * language: (string|undefined),
3796 * title: (string|undefined),
3797 * track: (number|undefined)
3800 chrome
.mediaGalleries
.MetaData
;
3804 * @param {!Blob} mediaFile The media file for which to get metadata.
3805 * @param {{metadataType: (string|undefined)}|
3806 * function(!chrome.mediaGalleries.MetaData)} optionsOrCallback The options
3807 * for the metadata to retrieve or the callback to invoke with the metadata.
3808 * The metadataType should either be 'all' or 'mimeTypeOnly'. Defaults to
3809 * 'all' if the metadataType is omitted.
3810 * @param {function(!chrome.mediaGalleries.MetaData)=} opt_callback If options
3811 * were passed as arg2, the callback to invoke with the metadata.
3813 chrome
.mediaGalleries
.getMetadata = function(
3814 mediaFile
, optionsOrCallback
, opt_callback
) {};
3820 * galleryCount: (number|undefined),
3821 * audioCount: (number|undefined),
3822 * imageCount: (number|undefined),
3823 * videoCount: (number|undefined)
3826 chrome
.mediaGalleries
.OnScanProgressDetails
;
3831 * Event whose listeners take a chrome.mediaGalleries.OnScanProgressDetails
3835 chrome
.mediaGalleries
.ScanProgressEvent = function() {};
3838 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3839 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.addListener
=
3840 function(callback
) {};
3843 /** @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback */
3844 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.removeListener
=
3845 function(callback
) {};
3849 * @param {function(!chrome.mediaGalleries.OnScanProgressDetails)} callback
3852 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListener
=
3853 function(callback
) {};
3856 /** @return {boolean} */
3857 chrome
.mediaGalleries
.ScanProgressEvent
.prototype.hasListeners = function() {};
3860 /** @type {!chrome.mediaGalleries.ScanProgressEvent} */
3861 chrome
.mediaGalleries
.onScanProgress
;
3866 * @see https://developer.chrome.com/extensions/pageCapture.html
3868 chrome
.pageCapture
= {};
3872 * @param {Object.<string, number>} details Object with a 'tabId' (number) key.
3873 * @param {function(Blob=): void} callback Callback function.
3875 chrome
.pageCapture
.saveAsMHTML = function(details
, callback
) {};
3880 * @see https://developer.chrome.com/extensions/permissions.html
3882 chrome
.permissions
= {};
3887 * permissions: (Array.<string>|undefined),
3888 * origins: (Array.<string>|undefined)
3890 * @see http://developer.chrome.com/extensions/permissions.html#type-Permissions
3892 chrome
.permissions
.Permissions
;
3896 * @param {!chrome.permissions.Permissions} permissions
3897 * @param {function(boolean): void} callback Callback function.
3899 chrome
.permissions
.contains = function(permissions
, callback
) {};
3903 * @param {function(!chrome.permissions.Permissions): void} callback
3904 * Callback function.
3906 chrome
.permissions
.getAll = function(callback
) {};
3910 * @param {!chrome.permissions.Permissions} permissions
3911 * @param {function(boolean): void=} opt_callback Callback function.
3913 chrome
.permissions
.remove = function(permissions
, opt_callback
) {};
3917 * @param {!chrome.permissions.Permissions} permissions
3918 * @param {function(boolean): void=} opt_callback Callback function.
3920 chrome
.permissions
.request = function(permissions
, opt_callback
) {};
3923 /** @type {!ChromeEvent} */
3924 chrome
.permissions
.onAdded
;
3927 /** @type {!ChromeEvent} */
3928 chrome
.permissions
.onRemoved
;
3932 * @see http://developer.chrome.com/dev/extensions/power.html
3938 * @param {string} level A string describing the degree to which power
3939 * management should be disabled, should be either "system" or "display".
3941 chrome
.power
.requestKeepAwake = function(level
) {};
3945 * Releases a request previously made via requestKeepAwake().
3947 chrome
.power
.releaseKeepAwake = function() {};
3952 * @see https://developer.chrome.com/extensions/privacy.html
3954 chrome
.privacy
= {};
3957 /** @type {!Object.<string,!ChromeSetting>} */
3958 chrome
.privacy
.network
;
3961 /** @type {!Object.<string,!ChromeSetting>} */
3962 chrome
.privacy
.services
;
3965 /** @type {!Object.<string,!ChromeSetting>} */
3966 chrome
.privacy
.websites
;
3971 * @see https://developer.chrome.com/extensions/proxy.html
3976 /** @type {!Object.<string,!ChromeSetting>} */
3977 chrome
.proxy
.settings
;
3980 /** @type {!ChromeEvent} */
3981 chrome
.proxy
.onProxyError
;
3986 * @see http://developer.chrome.com/apps/socket.html
3995 chrome
.socket
.CreateInfo = function() {};
3998 /** @type {number} */
3999 chrome
.socket
.CreateInfo
.prototype.socketId
;
4006 chrome
.socket
.ReadInfo = function() {};
4009 /** @type {number} */
4010 chrome
.socket
.ReadInfo
.prototype.resultCode
;
4013 /** @type {!ArrayBuffer} */
4014 chrome
.socket
.ReadInfo
.prototype.data
;
4021 chrome
.socket
.WriteInfo = function() {};
4024 /** @type {number} */
4025 chrome
.socket
.WriteInfo
.prototype.bytesWritten
;
4032 chrome
.socket
.RecvFromInfo = function() {};
4035 /** @type {number} */
4036 chrome
.socket
.RecvFromInfo
.prototype.resultCode
;
4039 /** @type {!ArrayBuffer} */
4040 chrome
.socket
.RecvFromInfo
.prototype.data
;
4043 /** @type {string} */
4044 chrome
.socket
.RecvFromInfo
.prototype.address
;
4047 /** @type {number} */
4048 chrome
.socket
.RecvFromInfo
.prototype.port
;
4055 chrome
.socket
.AcceptInfo = function() {};
4058 /** @type {number} */
4059 chrome
.socket
.AcceptInfo
.prototype.resultCode
;
4062 /** @type {(number|undefined)} */
4063 chrome
.socket
.AcceptInfo
.prototype.socketId
;
4070 chrome
.socket
.SocketInfo = function() {};
4073 /** @type {string} */
4074 chrome
.socket
.SocketInfo
.prototype.socketType
;
4077 /** @type {boolean} */
4078 chrome
.socket
.SocketInfo
.prototype.connected
;
4081 /** @type {(string|undefined)} */
4082 chrome
.socket
.SocketInfo
.prototype.peerAddress
;
4085 /** @type {(number|undefined)} */
4086 chrome
.socket
.SocketInfo
.prototype.peerPort
;
4089 /** @type {(string|undefined)} */
4090 chrome
.socket
.SocketInfo
.prototype.localAddress
;
4093 /** @type {(number|undefined)} */
4094 chrome
.socket
.SocketInfo
.prototype.localPort
;
4101 chrome
.socket
.NetworkAdapterInfo = function() {};
4104 /** @type {string} */
4105 chrome
.socket
.NetworkAdapterInfo
.prototype.name
;
4108 /** @type {string} */
4109 chrome
.socket
.NetworkAdapterInfo
.prototype.address
;
4113 * @param {string} type The type of socket to create. Must be 'tcp' or 'udp'.
4114 * @param {(Object|function(!chrome.socket.CreateInfo))} optionsOrCallback The
4115 * socket options or callback.
4116 * @param {function(!chrome.socket.CreateInfo)=} opt_callback Called when the
4117 * socket has been created.
4119 chrome
.socket
.create = function(type
, optionsOrCallback
, opt_callback
) {};
4123 * @param {number} socketId The id of the socket to destroy.
4125 chrome
.socket
.destroy = function(socketId
) {};
4129 * @param {number} socketId The id of the socket.
4130 * @param {string} hostname The hostname or IP address of the remote machine.
4131 * @param {number} port The port of the remote machine.
4132 * @param {function(number)} callback Called when the connection attempt is
4135 chrome
.socket
.connect = function(socketId
, hostname
, port
, callback
) {};
4139 * @param {number} socketId The id of the socket.
4140 * @param {string} address The address of the local machine.
4141 * @param {number} port The port of the local machine.
4142 * @param {function(number)} callback Called when the bind attempt is complete.
4144 chrome
.socket
.bind = function(socketId
, address
, port
, callback
) {};
4148 * @param {number} socketId The id of the socket to disconnect.
4150 chrome
.socket
.disconnect = function(socketId
) {};
4154 * @param {number} socketId The id of the socket to read from.
4155 * @param {(number|function(!chrome.socket.ReadInfo))} bufferSizeOrCallback The
4156 * read buffer size or the callback.
4157 * @param {function(!chrome.socket.ReadInfo)=} opt_callback Called with data
4158 * that was available to be read without blocking.
4160 chrome
.socket
.read = function(socketId
, bufferSizeOrCallback
, opt_callback
) {};
4164 * @param {number} socketId The id of the socket to write to.
4165 * @param {!ArrayBuffer} data The data to write.
4166 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4167 * operation completes without blocking or an error occurs.
4169 chrome
.socket
.write = function(socketId
, data
, callback
) {};
4173 * @param {number} socketId The id of the socket to read from.
4174 * @param {(number|function(!chrome.socket.RecvFromInfo))} bufferSizeOrCallback
4175 * The read buffer size or the callback.
4176 * @param {function(!chrome.socket.RecvFromInfo)=} opt_callback Called with data
4177 * that was available to be read without blocking.
4179 chrome
.socket
.recvFrom = function(socketId
, bufferSizeOrCallback
,
4184 * @param {number} socketId The id of the socket to write to.
4185 * @param {!ArrayBuffer} data The data to write.
4186 * @param {string} address The address of the remote machine.
4187 * @param {number} port The port of the remote machine.
4188 * @param {function(!chrome.socket.WriteInfo)} callback Called when the write
4189 * operation completes without blocking or an error occurs.
4191 chrome
.socket
.sendTo = function(socketId
, data
, address
, port
, callback
) {};
4195 * @param {number} socketId The id of the socket to listen on.
4196 * @param {string} address The address of the local machine to listen on. Use
4197 * '0' to listen on all addresses.
4198 * @param {number} port The port of the local machine.
4199 * @param {(number|function(number))} backlogOrCallback The length of the
4200 * socket's listen queue or the callback.
4201 * @param {function(number)=} opt_callback Called when the listen operation
4204 chrome
.socket
.listen
=
4205 function(socketId
, address
, port
, backlogOrCallback
, opt_callback
) {};
4209 * @param {number} socketId The id of the socket to accept a connection on.
4210 * @param {function(!chrome.socket.AcceptInfo)} callback Called when a new
4211 * socket is accepted.
4213 chrome
.socket
.accept = function(socketId
, callback
) {};
4217 * @param {number} socketId The id of the socket to listen on.
4218 * @param {boolean} enable If true, enable keep-alive functionality.
4219 * @param {(number|function(boolean))} delayOrCallback The delay in seconds
4220 * between the last packet received and the first keepalive probe (default
4221 * is 0) or the callback
4222 * @param {function(boolean)=} opt_callback Called when the setKeepAlive attempt
4225 chrome
.socket
.setKeepAlive = function(socketId
, enable
, delayOrCallback
,
4230 * @param {number} socketId The id of the socket to listen on.
4231 * @param {boolean} noDelay If true, disables Nagle's algorithm.
4232 * @param {function(boolean)} callback Called when the setNoDelay attempt is
4235 chrome
.socket
.setNoDelay = function(socketId
, noDelay
, callback
) {};
4239 * @param {number} socketId The id of the socket.
4240 * @param {function(!chrome.socket.SocketInfo)} callback Called when the state
4243 chrome
.socket
.getInfo = function(socketId
, callback
) {};
4247 * @param {function(!Array.<!chrome.socket.NetworkAdapterInfo>)} callback Called
4248 * when local adapter information is available.
4250 chrome
.socket
.getNetworkList = function(callback
) {};
4254 * @param {number} socketId The id of the socket.
4255 * @param {string} address The group address to join. Domain names are not
4257 * @param {function(number)} callback Called when the join operation is done.
4259 chrome
.socket
.joinGroup = function(socketId
, address
, callback
) {};
4263 * @param {number} socketId The id of the socket.
4264 * @param {string} address The group address to leave. Domain names are not
4266 * @param {function(number)} callback Called when the leave operation is done.
4268 chrome
.socket
.leaveGroup = function(socketId
, address
, callback
) {};
4272 * @param {number} socketId The id of the socket.
4273 * @param {number} ttl The time-to-live value.
4274 * @param {function(number)} callback Called when the configuration operation is
4277 chrome
.socket
.setMulticastTimeToLive = function(socketId
, ttl
, callback
) {};
4281 * @param {number} socketId The id of the socket.
4282 * @param {boolean} enabled True to enable loopback mode.
4283 * @param {function(number)} callback Called when the configuration operation is
4286 chrome
.socket
.setMulticastLoopbackMode = function(socketId
, enabled
,
4291 * @param {number} socketId The id of the socket.
4292 * @param {function(!Array.<string>)} callback Called with an array of string
4295 chrome
.socket
.getJoinedGroups = function(socketId
, callback
) {};
4301 chrome
.sockets
= {};
4306 * @see https://developer.chrome.com/apps/sockets_tcp
4308 chrome
.sockets
.tcp
= {};
4314 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketInfo
4316 chrome
.sockets
.tcp
.SocketInfo = function() {};
4319 /** @type {number} */
4320 chrome
.sockets
.tcp
.SocketInfo
.prototype.socketId
;
4323 /** @type {boolean} */
4324 chrome
.sockets
.tcp
.SocketInfo
.prototype.persistent
;
4327 /** @type {string|undefined} */
4328 chrome
.sockets
.tcp
.SocketInfo
.prototype.name
;
4331 /** @type {number|undefined} */
4332 chrome
.sockets
.tcp
.SocketInfo
.prototype.bufferSize
;
4335 /** @type {boolean} */
4336 chrome
.sockets
.tcp
.SocketInfo
.prototype.paused
;
4339 /** @type {boolean} */
4340 chrome
.sockets
.tcp
.SocketInfo
.prototype.connected
;
4343 /** @type {string|undefined} */
4344 chrome
.sockets
.tcp
.SocketInfo
.prototype.localAddress
;
4347 /** @type {number|undefined} */
4348 chrome
.sockets
.tcp
.SocketInfo
.prototype.localPort
;
4351 /** @type {string|undefined} */
4352 chrome
.sockets
.tcp
.SocketInfo
.prototype.peerAddress
;
4355 /** @type {number|undefined} */
4356 chrome
.sockets
.tcp
.SocketInfo
.prototype.peerPort
;
4361 * persistent: (boolean|undefined),
4362 * name: (string|undefined),
4363 * bufferSize: (number|undefined)
4365 * @see https://developer.chrome.com/apps/sockets_tcp#type-SocketProperties
4367 chrome
.sockets
.tcp
.SocketProperties
;
4372 * min: (string|undefined),
4373 * max: (string|undefined)
4375 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
4377 chrome
.sockets
.tcp
.SecurePropertiesTlsVersion
;
4382 * tlsVersion: (chrome.sockets.tcp.SecurePropertiesTlsVersion|undefined)
4384 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
4386 chrome
.sockets
.tcp
.SecureProperties
;
4390 * @param {!chrome.sockets.tcp.SocketProperties|
4391 * function(!Object)} propertiesOrCallback
4392 * @param {function(!Object)=} opt_callback
4393 * @see https://developer.chrome.com/apps/sockets_tcp#method-create
4395 chrome
.sockets
.tcp
.create = function(propertiesOrCallback
, opt_callback
) {};
4399 * @param {number} socketId
4400 * @param {!chrome.sockets.tcp.SocketProperties} properties
4401 * @param {function()=} opt_callback
4402 * @see https://developer.chrome.com/apps/sockets_tcp#method-update
4404 chrome
.sockets
.tcp
.update = function(socketId
, properties
, opt_callback
) {};
4408 * @param {number} socketId
4409 * @param {boolean} paused
4410 * @param {function()=} opt_callback
4411 * @see https://developer.chrome.com/apps/sockets_tcp#method-setPaused
4413 chrome
.sockets
.tcp
.setPaused = function(socketId
, paused
, opt_callback
) {};
4417 * @param {number} socketId
4418 * @param {boolean} enable
4419 * @param {(number|function(number))} delayOrCallback
4420 * @param {function(number)=} opt_callback
4421 * @see https://developer.chrome.com/apps/sockets_tcp#method-setKeepAlive
4423 chrome
.sockets
.tcp
.setKeepAlive = function(socketId
, enable
, delayOrCallback
,
4428 * @param {number} socketId
4429 * @param {boolean} noDelay
4430 * @param {function(number)} callback
4431 * @see https://developer.chrome.com/apps/sockets_tcp#method-setNoDelay
4433 chrome
.sockets
.tcp
.setNoDelay = function(socketId
, noDelay
, callback
) {};
4437 * @param {number} socketId
4438 * @param {string} peerAddress
4439 * @param {number} peerPort
4440 * @param {function(number)} callback
4441 * @see https://developer.chrome.com/apps/sockets_tcp#method-connect
4443 chrome
.sockets
.tcp
.connect = function(socketId
, peerAddress
, peerPort
,
4448 * @param {number} socketId The id of the socket to disconnect.
4449 * @param {function()=} opt_callback
4450 * @see https://developer.chrome.com/apps/sockets_tcp#method-disconnect
4452 chrome
.sockets
.tcp
.disconnect = function(socketId
, opt_callback
) {};
4456 * @param {number} socketId
4457 * @param {!chrome.sockets.tcp.SecureProperties|function(number)}
4459 * @param {function(number)=} opt_callback
4460 * @see https://developer.chrome.com/apps/sockets_tcp#method-secure
4462 chrome
.sockets
.tcp
.secure = function(socketId
, optionsOrCallback
,
4467 * @param {number} socketId
4468 * @param {!ArrayBuffer} data
4469 * @param {function(!Object)} callback
4470 * @see https://developer.chrome.com/apps/sockets_tcp#method-send
4472 chrome
.sockets
.tcp
.send = function(socketId
, data
, callback
) {};
4476 * @param {number} socketId
4477 * @param {function()=} opt_callback
4478 * @see https://developer.chrome.com/apps/sockets_tcp#method-close
4480 chrome
.sockets
.tcp
.close = function(socketId
, opt_callback
) {};
4484 * @param {number} socketId
4485 * @param {function(!chrome.sockets.tcp.SocketInfo)} callback
4486 * @see https://developer.chrome.com/apps/sockets_tcp#method-getInfo
4488 chrome
.sockets
.tcp
.getInfo = function(socketId
, callback
) {};
4492 * @param {function(!Array.<!chrome.sockets.tcp.SocketInfo>)} callback
4493 * @see https://developer.chrome.com/apps/sockets_tcp#method-getSockets
4495 chrome
.sockets
.tcp
.getSockets = function(callback
) {};
4501 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceive
4503 chrome
.sockets
.tcp
.ReceiveEventData = function() {};
4506 /** @type {number} */
4507 chrome
.sockets
.tcp
.ReceiveEventData
.prototype.socketId
;
4510 /** @type {!ArrayBuffer} */
4511 chrome
.sockets
.tcp
.ReceiveEventData
.prototype.data
;
4516 * Event whose listeners take a ReceiveEventData parameter.
4519 chrome
.sockets
.tcp
.ReceiveEvent = function() {};
4523 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
4525 chrome
.sockets
.tcp
.ReceiveEvent
.prototype.addListener
=
4526 function(callback
) {};
4530 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
4532 chrome
.sockets
.tcp
.ReceiveEvent
.prototype.removeListener
=
4533 function(callback
) {};
4537 * @param {function(!chrome.sockets.tcp.ReceiveEventData): void} callback
4540 chrome
.sockets
.tcp
.ReceiveEvent
.prototype.hasListener
=
4541 function(callback
) {};
4544 /** @return {boolean} */
4545 chrome
.sockets
.tcp
.ReceiveEvent
.prototype.hasListeners = function() {};
4548 /** @type {!chrome.sockets.tcp.ReceiveEvent} */
4549 chrome
.sockets
.tcp
.onReceive
;
4555 * @see https://developer.chrome.com/apps/sockets_tcp#event-onReceiveError
4557 chrome
.sockets
.tcp
.ReceiveErrorEventData = function() {};
4560 /** @type {number} */
4561 chrome
.sockets
.tcp
.ReceiveErrorEventData
.prototype.socketId
;
4564 /** @type {number} */
4565 chrome
.sockets
.tcp
.ReceiveErrorEventData
.prototype.resultCode
;
4570 * Event whose listeners take a ReceiveErrorEventData parameter.
4573 chrome
.sockets
.tcp
.ReceiveErrorEvent = function() {};
4578 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
4580 chrome
.sockets
.tcp
.ReceiveErrorEvent
.prototype.addListener
=
4581 function(callback
) {};
4586 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
4588 chrome
.sockets
.tcp
.ReceiveErrorEvent
.prototype.removeListener
=
4589 function(callback
) {};
4594 * !chrome.sockets.tcp.ReceiveErrorEventData): void} callback
4597 chrome
.sockets
.tcp
.ReceiveErrorEvent
.prototype.hasListener
=
4598 function(callback
) {};
4601 /** @return {boolean} */
4602 chrome
.sockets
.tcp
.ReceiveErrorEvent
.prototype.hasListeners
=
4606 /** @type {!chrome.sockets.tcp.ReceiveErrorEvent} */
4607 chrome
.sockets
.tcp
.onReceiveError
;
4612 * @see https://developer.chrome.com/extensions/storage.html
4614 chrome
.storage
= {};
4617 /** @type {!StorageArea} */
4618 chrome
.storage
.sync
;
4621 /** @type {!StorageArea} */
4622 chrome
.storage
.local
;
4625 /** @type {!StorageChangeEvent} */
4626 chrome
.storage
.onChanged
;
4635 * @see http://developer.chrome.com/apps/system_display.html
4637 chrome
.system
.display
= {};
4640 /** @type {!ChromeEvent} */
4641 chrome
.system
.display
.onDisplayChanged
;
4648 chrome
.system
.display
.Bounds = function() {};
4651 /** @type {number} */
4652 chrome
.system
.display
.Bounds
.prototype.left
;
4655 /** @type {number} */
4656 chrome
.system
.display
.Bounds
.prototype.top
;
4659 /** @type {number} */
4660 chrome
.system
.display
.Bounds
.prototype.width
;
4663 /** @type {number} */
4664 chrome
.system
.display
.Bounds
.prototype.height
;
4669 * left: (number|undefined),
4670 * top: (number|undefined),
4671 * right: (number|undefined),
4672 * bottom: (number|undefined)
4675 chrome
.system
.display
.Insets
;
4682 chrome
.system
.display
.DisplayInfo = function() {};
4685 /** @type {string} */
4686 chrome
.system
.display
.DisplayInfo
.prototype.id
;
4689 /** @type {string} */
4690 chrome
.system
.display
.DisplayInfo
.prototype.name
;
4693 /** @type {string} */
4694 chrome
.system
.display
.DisplayInfo
.prototype.mirroringSourceId
;
4697 /** @type {boolean} */
4698 chrome
.system
.display
.DisplayInfo
.prototype.isPrimary
;
4701 /** @type {boolean} */
4702 chrome
.system
.display
.DisplayInfo
.prototype.isInternal
;
4705 /** @type {boolean} */
4706 chrome
.system
.display
.DisplayInfo
.prototype.isEnabled
;
4709 /** @type {number} */
4710 chrome
.system
.display
.DisplayInfo
.prototype.dpiX
;
4713 /** @type {number} */
4714 chrome
.system
.display
.DisplayInfo
.prototype.dpiY
;
4717 /** @type {number} */
4718 chrome
.system
.display
.DisplayInfo
.prototype.rotation
;
4721 /** @type {!chrome.system.display.Bounds} */
4722 chrome
.system
.display
.DisplayInfo
.prototype.bounds
;
4725 /** @type {!chrome.system.display.Insets} */
4726 chrome
.system
.display
.DisplayInfo
.prototype.overscan
;
4729 /** @type {!chrome.system.display.Bounds} */
4730 chrome
.system
.display
.DisplayInfo
.prototype.workArea
;
4735 * mirroringSourceId: (string|undefined),
4736 * isPrimary: (boolean|undefined),
4737 * overscan: (!chrome.system.display.Insets|undefined),
4738 * rotation: (number|undefined),
4739 * boundsOriginX: (number|undefined),
4740 * boundsOriginY: (number|undefined)
4743 chrome
.system
.display
.SettableDisplayInfo
;
4751 * format: (string|undefined),
4752 * quality: (number|undefined)
4755 chrome
.types
.ImageDetails
;
4759 * @param {function(!Array.<!chrome.system.display.DisplayInfo>)}
4760 * callback Called with an array of objects representing display info.
4762 chrome
.system
.display
.getInfo = function(callback
) {};
4766 * @param {string} id The display's unique identifier.
4767 * @param {!chrome.system.display.SettableDisplayInfo} info The information
4768 * about display properties that should be changed.
4769 * @param {function()=} opt_callback The callback to execute when the display
4770 * info has been changed.
4772 chrome
.system
.display
.setDisplayProperties
=
4773 function(id
, info
, opt_callback
) {};
4778 * @see https://developer.chrome.com/extensions/types.html
4780 chrome
.chromeSetting
= {};
4783 /** @type {!ChromeEvent} */
4784 chrome
.chromeSetting
.onChange
;
4789 * @see https://developer.chrome.com/extensions/webNavigation.html
4791 chrome
.webNavigation
= {};
4795 * @param {Object} details Object with a 'tabId' (number) key.
4796 * @param {function(!Array.<Object.<string, (boolean|number|string)>>)} callback
4797 * Callback function.
4799 chrome
.webNavigation
.getAllFrames = function(details
, callback
) {};
4803 * @param {Object} details Object with 'tabId' (number) and 'frameId' (number)
4805 * @param {function(Object.<string, (boolean|string)>)} callback
4806 * Callback function.
4808 chrome
.webNavigation
.getFrame = function(details
, callback
) {};
4811 /** @type {!ChromeEvent} */
4812 chrome
.webNavigation
.onBeforeNavigate
;
4815 /** @type {!ChromeEvent} */
4816 chrome
.webNavigation
.onCommitted
;
4819 /** @type {!ChromeEvent} */
4820 chrome
.webNavigation
.onDOMContentLoaded
;
4823 /** @type {!ChromeEvent} */
4824 chrome
.webNavigation
.onCompleted
;
4827 /** @type {!ChromeEvent} */
4828 chrome
.webNavigation
.onErrorOccurred
;
4831 /** @type {!ChromeEvent} */
4832 chrome
.webNavigation
.onCreatedNavigationTarget
;
4835 /** @type {!ChromeEvent} */
4836 chrome
.webNavigation
.onReferenceFragmentUpdated
;
4839 /** @type {!ChromeEvent} */
4840 chrome
.webNavigation
.onTabReplaced
;
4843 /** @type {!ChromeEvent} */
4844 chrome
.webNavigation
.onHistoryStateUpdated
;
4849 * Most event listeners for WebRequest take extra arguments.
4850 * @see https://developer.chrome.com/extensions/webRequest.html.
4853 function WebRequestEvent() {}
4857 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4859 * @param {!RequestFilter} filter A set of filters that restrict
4860 * the events that will be sent to this listener.
4861 * @param {Array.<string>=} opt_extraInfoSpec Array of extra information
4862 * that should be passed to the listener function.
4864 WebRequestEvent
.prototype.addListener
=
4865 function(listener
, filter
, opt_extraInfoSpec
) {};
4869 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4872 WebRequestEvent
.prototype.removeListener = function(listener
) {};
4876 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4879 WebRequestEvent
.prototype.hasListener = function(listener
) {};
4883 * @param {function(!Object): (void|!BlockingResponse)} listener Listener
4886 WebRequestEvent
.prototype.hasListeners = function(listener
) {};
4891 * The onErrorOccurred event takes one less parameter than the others.
4892 * @see https://developer.chrome.com/extensions/webRequest.html.
4895 function WebRequestOnErrorOccurredEvent() {}
4899 * @param {function(!Object): void} listener Listener function.
4900 * @param {!RequestFilter} filter A set of filters that restrict
4901 * the events that will be sent to this listener.
4903 WebRequestOnErrorOccurredEvent
.prototype.addListener
=
4904 function(listener
, filter
) {};
4908 * @param {function(!Object): void} listener Listener function.
4910 WebRequestOnErrorOccurredEvent
.prototype.removeListener = function(listener
) {};
4914 * @param {function(!Object): void} listener Listener function.
4916 WebRequestOnErrorOccurredEvent
.prototype.hasListener = function(listener
) {};
4920 * @param {function(!Object): void} listener Listener function.
4922 WebRequestOnErrorOccurredEvent
.prototype.hasListeners = function(listener
) {};
4927 * @see https://developer.chrome.com/extensions/webRequest.html
4929 chrome
.webRequest
= {};
4933 * @param {function(): void=} opt_callback Callback function.
4935 chrome
.webRequest
.handlerBehaviorChanged = function(opt_callback
) {};
4938 /** @type {!WebRequestEvent} */
4939 chrome
.webRequest
.onAuthRequired
;
4942 /** @type {!WebRequestEvent} */
4943 chrome
.webRequest
.onBeforeRedirect
;
4946 /** @type {!WebRequestEvent} */
4947 chrome
.webRequest
.onBeforeRequest
;
4950 /** @type {!WebRequestEvent} */
4951 chrome
.webRequest
.onBeforeSendHeaders
;
4954 /** @type {!WebRequestEvent} */
4955 chrome
.webRequest
.onCompleted
;
4958 /** @type {!WebRequestOnErrorOccurredEvent} */
4959 chrome
.webRequest
.onErrorOccurred
;
4962 /** @type {!WebRequestEvent} */
4963 chrome
.webRequest
.onHeadersReceived
;
4966 /** @type {!WebRequestEvent} */
4967 chrome
.webRequest
.onResponseStarted
;
4970 /** @type {!WebRequestEvent} */
4971 chrome
.webRequest
.onSendHeaders
;
4979 * @see https://developer.chrome.com/extensions/management.html
4982 function ExtensionInfo() {}
4985 /** @type {string} */
4986 ExtensionInfo
.prototype.id
;
4989 /** @type {string} */
4990 ExtensionInfo
.prototype.name
;
4993 /** @type {string} */
4994 ExtensionInfo
.prototype.shortName
;
4997 /** @type {string} */
4998 ExtensionInfo
.prototype.description
;
5001 /** @type {string} */
5002 ExtensionInfo
.prototype.version
;
5005 /** @type {boolean} */
5006 ExtensionInfo
.prototype.mayDisable
;
5009 /** @type {boolean} */
5010 ExtensionInfo
.prototype.enabled
;
5013 /** @type {string|undefined} */
5014 ExtensionInfo
.prototype.disabledReason
;
5017 /** @type {boolean} */
5018 ExtensionInfo
.prototype.isApp
;
5021 /** @type {string} */
5022 ExtensionInfo
.prototype.type
;
5025 /** @type {string|undefined} */
5026 ExtensionInfo
.prototype.appLaunchUrl
;
5029 /** @type {string|undefined} */
5030 ExtensionInfo
.prototype.homepageUrl
;
5033 /** @type {string|undefined} */
5034 ExtensionInfo
.prototype.updateUrl
;
5037 /** @type {boolean} */
5038 ExtensionInfo
.prototype.offlineEnabled
;
5041 /** @type {string} */
5042 ExtensionInfo
.prototype.optionsUrl
;
5045 /** @type {!Array.<!IconInfo>|undefined} */
5046 ExtensionInfo
.prototype.icons
;
5049 /** @type {!Array.<string>} */
5050 ExtensionInfo
.prototype.permissions
;
5053 /** @type {!Array.<string>} */
5054 ExtensionInfo
.prototype.hostPermissions
;
5057 /** @type {string} */
5058 ExtensionInfo
.prototype.installType
;
5061 /** @type {string|undefined} */
5062 ExtensionInfo
.prototype.launchType
;
5065 /** @type {!Array.<string>|undefined} */
5066 ExtensionInfo
.prototype.availableLaunchTypes
;
5071 * @see https://developer.chrome.com/extensions/management.html
5074 function IconInfo() {}
5077 /** @type {number} */
5078 IconInfo
.prototype.size
;
5081 /** @type {string} */
5082 IconInfo
.prototype.url
;
5087 * @see https://developer.chrome.com/extensions/tabs
5093 // TODO: Make this field optional once dependent projects have been updated.
5100 /** @type {number} */
5101 Tab
.prototype.index
;
5104 /** @type {number} */
5105 Tab
.prototype.windowId
;
5108 // TODO: Make this field optional once dependent projects have been updated.
5112 Tab
.prototype.openerTabId
;
5115 /** @type {boolean} */
5116 Tab
.prototype.highlighted
;
5119 /** @type {boolean} */
5120 Tab
.prototype.active
;
5123 /** @type {boolean} */
5124 Tab
.prototype.pinned
;
5127 // TODO: Make this field optional once dependent projects have been updated.
5134 // TODO: Make this field optional once dependent projects have been updated.
5138 Tab
.prototype.title
;
5141 // TODO: Make this field optional once dependent projects have been updated.
5145 Tab
.prototype.favIconUrl
;
5148 // TODO: Make this field optional once dependent projects have been updated.
5152 Tab
.prototype.status
;
5155 /** @type {boolean} */
5156 Tab
.prototype.incognito
;
5159 /** @type {number|undefined} */
5160 Tab
.prototype.width
;
5163 /** @type {number|undefined} */
5164 Tab
.prototype.height
;
5167 /** @type {number|undefined} */
5168 Tab
.prototype.sessionId
;
5173 * @see https://developer.chrome.com/extensions/windows.html
5176 function ChromeWindow() {}
5179 /** @type {number} */
5180 ChromeWindow
.prototype.id
;
5183 /** @type {boolean} */
5184 ChromeWindow
.prototype.focused
;
5187 /** @type {number} */
5188 ChromeWindow
.prototype.top
;
5191 /** @type {number} */
5192 ChromeWindow
.prototype.left
;
5195 /** @type {number} */
5196 ChromeWindow
.prototype.width
;
5199 /** @type {number} */
5200 ChromeWindow
.prototype.height
;
5203 /** @type {Array.<Tab>} */
5204 ChromeWindow
.prototype.tabs
;
5207 /** @type {boolean} */
5208 ChromeWindow
.prototype.incognito
;
5211 /** @type {string} */
5212 ChromeWindow
.prototype.type
;
5215 /** @type {string} */
5216 ChromeWindow
.prototype.state
;
5219 /** @type {boolean} */
5220 ChromeWindow
.prototype.alwaysOnTop
;
5225 * @see https://developer.chrome.com/extensions/events.html
5228 function ChromeEvent() {}
5231 /** @param {!Function} callback */
5232 ChromeEvent
.prototype.addListener = function(callback
) {};
5235 /** @param {!Function} callback */
5236 ChromeEvent
.prototype.removeListener = function(callback
) {};
5240 * @param {!Function} callback
5243 ChromeEvent
.prototype.hasListener = function(callback
) {};
5246 /** @return {boolean} */
5247 ChromeEvent
.prototype.hasListeners = function() {};
5252 * Event whose listeners take a string parameter.
5255 function ChromeStringEvent() {}
5258 /** @param {function(string): void} callback */
5259 ChromeStringEvent
.prototype.addListener = function(callback
) {};
5262 /** @param {function(string): void} callback */
5263 ChromeStringEvent
.prototype.removeListener = function(callback
) {};
5267 * @param {function(string): void} callback
5270 ChromeStringEvent
.prototype.hasListener = function(callback
) {};
5273 /** @return {boolean} */
5274 ChromeStringEvent
.prototype.hasListeners = function() {};
5279 * Event whose listeners take a boolean parameter.
5283 function ChromeBooleanEvent() {}
5287 * @param {function(boolean): void} callback
5289 ChromeBooleanEvent
.prototype.addListener = function(callback
) {};
5293 * @param {function(boolean): void} callback
5295 ChromeBooleanEvent
.prototype.removeListener = function(callback
) {};
5299 * @param {function(boolean): void} callback
5302 ChromeBooleanEvent
.prototype.hasListener = function(callback
) {};
5308 ChromeBooleanEvent
.prototype.hasListeners = function() {};
5313 * Event whose listeners take a number parameter.
5317 function ChromeNumberEvent() {}
5321 * @param {function(number): void} callback
5323 ChromeNumberEvent
.prototype.addListener = function(callback
) {};
5327 * @param {function(number): void} callback
5329 ChromeNumberEvent
.prototype.removeListener = function(callback
) {};
5333 * @param {function(number): void} callback
5336 ChromeNumberEvent
.prototype.hasListener = function(callback
) {};
5342 ChromeNumberEvent
.prototype.hasListeners = function() {};
5347 * Event whose listeners take an Object parameter.
5350 function ChromeObjectEvent() {}
5354 * @param {function(!Object): void} callback Callback.
5356 ChromeObjectEvent
.prototype.addListener = function(callback
) {};
5360 * @param {function(!Object): void} callback Callback.
5362 ChromeObjectEvent
.prototype.removeListener = function(callback
) {};
5366 * @param {function(!Object): void} callback Callback.
5369 ChromeObjectEvent
.prototype.hasListener = function(callback
) {};
5375 ChromeObjectEvent
.prototype.hasListeners = function() {};
5380 * Event whose listeners take an ExtensionInfo parameter.
5383 function ChromeExtensionInfoEvent() {}
5386 /** @param {function(!ExtensionInfo): void} callback */
5387 ChromeExtensionInfoEvent
.prototype.addListener = function(callback
) {};
5390 /** @param {function(!ExtensionInfo): void} callback */
5391 ChromeExtensionInfoEvent
.prototype.removeListener = function(callback
) {};
5395 * @param {function(!ExtensionInfo): void} callback
5398 ChromeExtensionInfoEvent
.prototype.hasListener = function(callback
) {};
5401 /** @return {boolean} */
5402 ChromeExtensionInfoEvent
.prototype.hasListeners = function() {};
5407 * Event whose listeners take a string array parameter.
5410 function ChromeStringArrayEvent() {}
5413 /** @param {function(!Array.<string>): void} callback */
5414 ChromeStringArrayEvent
.prototype.addListener = function(callback
) {};
5417 /** @param {function(!Array.<string>): void} callback */
5418 ChromeStringArrayEvent
.prototype.removeListener = function(callback
) {};
5422 * @param {function(!Array.<string>): void} callback
5425 ChromeStringArrayEvent
.prototype.hasListener = function(callback
) {};
5428 /** @return {boolean} */
5429 ChromeStringArrayEvent
.prototype.hasListeners = function() {};
5434 * Event whose listeners take two strings as parameters.
5437 function ChromeStringStringEvent() {}
5440 /** @param {function(string, string): void} callback */
5441 ChromeStringStringEvent
.prototype.addListener = function(callback
) {};
5444 /** @param {function(string, string): void} callback */
5445 ChromeStringStringEvent
.prototype.removeListener = function(callback
) {};
5449 * @param {function(string, string): void} callback
5452 ChromeStringStringEvent
.prototype.hasListener = function(callback
) {};
5455 /** @return {boolean} */
5456 ChromeStringStringEvent
.prototype.hasListeners = function() {};
5460 * @see http://developer.chrome.com/extensions/pushMessaging.html
5463 chrome
.pushMessaging
= {};
5467 * @type {!chrome.pushMessaging.PushMessageEvent}
5469 chrome
.pushMessaging
.onMessage
;
5473 * @param {boolean|function(!chrome.pushMessaging.ChannelIdResult)}
5474 * interactiveOrCallback Either a flag(optional), if set to true, user will
5475 * be asked to log in if they are not already logged in, or, when he flag is
5476 * not given, the callback.
5477 * @param {function(!chrome.pushMessaging.ChannelIdResult)=} opt_callback
5480 chrome
.pushMessaging
.getChannelId
=
5481 function(interactiveOrCallback
, opt_callback
) {};
5486 * Event whose listeners take a chrome.pushMessaging.Message parameter.
5489 chrome
.pushMessaging
.PushMessageEvent = function() {};
5493 * @param {function(!chrome.pushMessaging.Message): void} callback
5495 chrome
.pushMessaging
.PushMessageEvent
.prototype.addListener
=
5496 function(callback
) {};
5500 * @param {function(!chrome.pushMessaging.Message): void} callback
5502 chrome
.pushMessaging
.PushMessageEvent
.prototype.removeListener
=
5503 function(callback
) {};
5507 * @param {function(!chrome.pushMessaging.Message): void} callback
5510 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListener
=
5511 function(callback
) {};
5517 chrome
.pushMessaging
.PushMessageEvent
.prototype.hasListeners = function() {};
5522 * @see http://developer.chrome.com/apps/runtime.html#type-Port
5528 /** @type {string} */
5529 Port
.prototype.name
;
5532 /** @type {!ChromeEvent} */
5533 Port
.prototype.onDisconnect
;
5536 /** @type {!ChromeEvent} */
5537 Port
.prototype.onMessage
;
5540 /** @type {MessageSender} */
5541 Port
.prototype.sender
;
5545 * @param {Object.<string>} obj Message object.
5547 Port
.prototype.postMessage = function(obj
) {};
5551 * Note: as of 2012-04-12, this function is no longer documented on
5552 * the public web pages, but there are still existing usages.
5554 Port
.prototype.disconnect = function() {};
5559 * @see http://developer.chrome.com/extensions/runtime.html#type-MessageSender
5562 function MessageSender() {}
5565 /** @type {!Tab|undefined} */
5566 MessageSender
.prototype.tab
;
5569 /** @type {string|undefined} */
5570 MessageSender
.prototype.id
;
5573 /** @type {string|undefined} */
5574 MessageSender
.prototype.url
;
5577 /** @type {string|undefined} */
5578 MessageSender
.prototype.tlsChannelId
;
5583 * @see https://developer.chrome.com/extensions/bookmarks.html#type-BookmarkTreeNode
5586 function BookmarkTreeNode() {}
5589 /** @type {string} */
5590 BookmarkTreeNode
.prototype.id
;
5593 /** @type {string|undefined} */
5594 BookmarkTreeNode
.prototype.parentId
;
5597 /** @type {number|undefined} */
5598 BookmarkTreeNode
.prototype.index
;
5601 /** @type {string|undefined} */
5602 BookmarkTreeNode
.prototype.url
;
5605 /** @type {string} */
5606 BookmarkTreeNode
.prototype.title
;
5609 /** @type {number|undefined} */
5610 BookmarkTreeNode
.prototype.dateAdded
;
5613 /** @type {number|undefined} */
5614 BookmarkTreeNode
.prototype.dateGroupModified
;
5617 /** @type {string|undefined} */
5618 BookmarkTreeNode
.prototype.unmodifiable
;
5621 /** @type {!Array.<!BookmarkTreeNode>|undefined} */
5622 BookmarkTreeNode
.prototype.children
;
5627 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-Cookie
5630 function Cookie() {}
5633 /** @type {string} */
5634 Cookie
.prototype.name
;
5637 /** @type {string} */
5638 Cookie
.prototype.value
;
5641 /** @type {string} */
5642 Cookie
.prototype.domain
;
5645 /** @type {boolean} */
5646 Cookie
.prototype.hostOnly
;
5649 /** @type {string} */
5650 Cookie
.prototype.path
;
5653 /** @type {boolean} */
5654 Cookie
.prototype.secure
;
5657 /** @type {boolean} */
5658 Cookie
.prototype.httpOnly
;
5661 /** @type {boolean} */
5662 Cookie
.prototype.session
;
5665 /** @type {number} */
5666 Cookie
.prototype.expirationDate
;
5669 /** @type {string} */
5670 Cookie
.prototype.storeId
;
5675 * @see https://developer.chrome.com/extensions/dev/cookies.html#type-CookieStore
5678 function CookieStore() {}
5681 /** @type {string} */
5682 CookieStore
.prototype.id
;
5685 /** @type {Array.<number>} */
5686 CookieStore
.prototype.tabIds
;
5691 * @see https://developer.chrome.com/extensions/dev/contextMenus.html#type-OnClickData
5694 function OnClickData() {}
5697 /** @type {number} */
5698 OnClickData
.prototype.menuItemId
;
5701 /** @type {number} */
5702 OnClickData
.prototype.parentMenuItemId
;
5705 /** @type {string} */
5706 OnClickData
.prototype.mediaType
;
5709 /** @type {string} */
5710 OnClickData
.prototype.linkUrl
;
5713 /** @type {string} */
5714 OnClickData
.prototype.srcUrl
;
5717 /** @type {string} */
5718 OnClickData
.prototype.pageUrl
;
5721 /** @type {string} */
5722 OnClickData
.prototype.frameUrl
;
5725 /** @type {string} */
5726 OnClickData
.prototype.selectionText
;
5729 /** @type {string} */
5730 OnClickData
.prototype.editable
;
5735 * @see https://developer.chrome.com/extensions/debugger.html#type-Debuggee
5738 function Debuggee() {}
5741 /** @type {number} */
5742 Debuggee
.prototype.tabId
;
5747 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ResourceIdentifier
5750 function ResourceIdentifier() {}
5753 /** @type {string} */
5754 ResourceIdentifier
.prototype.id
;
5757 /** @type {string} */
5758 ResourceIdentifier
.prototype.description
;
5763 * @see https://developer.chrome.com/extensions/contentSettings.html#type-ContentSetting
5766 function ContentSetting() {}
5770 * @param {!Object.<string,string>} details Settings details.
5771 * @param {function(): void=} opt_callback Callback function.
5773 ContentSetting
.prototype.clear = function(details
, opt_callback
) {};
5777 * @param {!Object.<string,(string|boolean|ResourceIdentifier)>} details
5779 * @param {function(): void} callback Callback function.
5781 ContentSetting
.prototype.get = function(details
, callback
) {};
5785 * @param {function(): void} callback Callback function.
5787 ContentSetting
.prototype.getResourceIdentifiers = function(callback
) {};
5791 * @param {!Object.<string,(string|ResourceIdentifier)>} details
5793 * @param {function(): void=} opt_callback Callback function.
5795 ContentSetting
.prototype.set = function(details
, opt_callback
) {};
5800 * @see https://developer.chrome.com/extensions/history.html#type-HistoryItem
5803 function HistoryItem() {}
5806 /** @type {string} */
5807 HistoryItem
.prototype.id
;
5810 /** @type {string} */
5811 HistoryItem
.prototype.url
;
5814 /** @type {string} */
5815 HistoryItem
.prototype.title
;
5818 /** @type {number} */
5819 HistoryItem
.prototype.lastVisitTime
;
5822 /** @type {number} */
5823 HistoryItem
.prototype.visitCount
;
5826 /** @type {number} */
5827 HistoryItem
.prototype.typedCount
;
5832 * @see https://developer.chrome.com/extensions/history.html#type-VisitItem
5835 function VisitItem() {}
5838 /** @type {string} */
5839 VisitItem
.prototype.id
;
5842 /** @type {string} */
5843 VisitItem
.prototype.visitId
;
5846 /** @type {number} */
5847 VisitItem
.prototype.visitTime
;
5850 /** @type {string} */
5851 VisitItem
.prototype.referringVisitId
;
5854 /** @type {string} */
5855 VisitItem
.prototype.transition
;
5860 * @see https://developer.chrome.com/extensions/fileBrowserHandler.html#type-FileHandlerExecuteEventDetails
5863 function FileHandlerExecuteEventDetails() {}
5866 /** @type {!Array.<!FileEntry>} */
5867 FileHandlerExecuteEventDetails
.prototype.entries
;
5870 /** @type {number|undefined} */
5871 FileHandlerExecuteEventDetails
.prototype.tab_id
;
5876 * @see https://developer.chrome.com/extensions/input.ime.html#type-KeyboardEvent
5879 function ChromeKeyboardEvent() {}
5882 /** @type {string} */
5883 ChromeKeyboardEvent
.prototype.type
;
5886 /** @type {string} */
5887 ChromeKeyboardEvent
.prototype.requestId
;
5890 /** @type {string|undefined} */
5891 ChromeKeyboardEvent
.prototype.extensionId
;
5894 /** @type {string} */
5895 ChromeKeyboardEvent
.prototype.key
;
5898 /** @type {string} */
5899 ChromeKeyboardEvent
.prototype.code
;
5902 /** @type {number|undefined} */
5903 ChromeKeyboardEvent
.prototype.keyCode
;
5906 /** @type {boolean|undefined} */
5907 ChromeKeyboardEvent
.prototype.altKey
;
5910 /** @type {boolean|undefined} */
5911 ChromeKeyboardEvent
.prototype.ctrlKey
;
5914 /** @type {boolean|undefined} */
5915 ChromeKeyboardEvent
.prototype.shiftKey
;
5918 /** @type {boolean|undefined} */
5919 ChromeKeyboardEvent
.prototype.capsLock
;
5924 * @see https://developer.chrome.com/extensions/input.ime.html#type-InputContext
5927 function InputContext() {}
5930 /** @type {number} */
5931 InputContext
.prototype.contextID
;
5934 /** @type {string} */
5935 InputContext
.prototype.type
;
5940 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyServer
5943 function ProxyServer() {}
5946 /** @type {string} */
5947 ProxyServer
.prototype.scheme
;
5950 /** @type {string} */
5951 ProxyServer
.prototype.host
;
5954 /** @type {number} */
5955 ProxyServer
.prototype.port
;
5960 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyRules
5963 function ProxyRules() {}
5966 /** @type {ProxyServer} */
5967 ProxyRules
.prototype.singleProxy
;
5970 /** @type {ProxyServer} */
5971 ProxyRules
.prototype.proxyForHttp
;
5974 /** @type {ProxyServer} */
5975 ProxyRules
.prototype.proxyForHttps
;
5978 /** @type {ProxyServer} */
5979 ProxyRules
.prototype.proxyForFtp
;
5982 /** @type {ProxyServer} */
5983 ProxyRules
.prototype.fallbackProxy
;
5986 /** @type {!Array.<string>} */
5987 ProxyRules
.prototype.bypassList
;
5992 * @see https://developer.chrome.com/extensions/proxy.html#type-PacScript
5995 function PacScript() {}
5998 /** @type {string} */
5999 PacScript
.prototype.url
;
6002 /** @type {string} */
6003 PacScript
.prototype.data
;
6006 /** @type {boolean} */
6007 PacScript
.prototype.mandatory
;
6012 * @see https://developer.chrome.com/extensions/proxy.html#type-ProxyConfig
6015 function ProxyConfig() {}
6018 /** @type {ProxyRules} */
6019 ProxyConfig
.prototype.rules
;
6022 /** @type {PacScript} */
6023 ProxyConfig
.prototype.pacScript
;
6026 /** @type {string} */
6027 ProxyConfig
.prototype.mode
;
6032 * The event listener for Storage receives an Object mapping each
6033 * key that changed to its corresponding StorageChange for that item.
6035 * @see https://developer.chrome.com/extensions/storage.html
6038 function StorageChangeEvent() {}
6042 * @param {function(!Object.<string, !StorageChange>, string)} callback
6043 * Listener will receive an object that maps each key to its StorageChange,
6044 * and the namespace ("sync" or "local") of the storage area the changes
6047 StorageChangeEvent
.prototype.addListener = function(callback
) {};
6050 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6051 StorageChangeEvent
.prototype.removeListener = function(callback
) {};
6054 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6055 StorageChangeEvent
.prototype.hasListener = function(callback
) {};
6058 /** @param {function(!Object.<string, !StorageChange>, string)} callback */
6059 StorageChangeEvent
.prototype.hasListeners = function(callback
) {};
6064 * @see https://developer.chrome.com/extensions/storage.html#type-StorageChange
6067 function StorageChange() {}
6071 StorageChange
.prototype.oldValue
;
6075 StorageChange
.prototype.newValue
;
6080 * @see https://developer.chrome.com/extensions/storage.html#type-StorageArea
6083 function StorageArea() {}
6087 * Removes all items from storage.
6088 * @param {function(): void=} opt_callback Callback function.
6090 StorageArea
.prototype.clear = function(opt_callback
) {};
6094 * @param {(string|!Array.<string>|!Object|null)=} opt_keys
6095 * A single key to get, list of keys to get, or a dictionary
6096 * specifying default values (see description of the
6097 * object). An empty list or object will return an empty
6098 * result object. Pass in null to get the entire contents of storage.
6099 * @param {function(Object)=} opt_callback Callback with storage items, or null
6102 StorageArea
.prototype.get = function(opt_keys
, opt_callback
) {};
6106 * @param {(string|!Array.<string>)} keys
6107 * A single key or a list of keys for items to remove.
6108 * @param {function()=} opt_callback Callback.
6110 StorageArea
.prototype.remove = function(keys
, opt_callback
) {};
6114 * @param {!Object.<string>} keys
6115 * Object specifying items to augment storage
6116 * with. Values that cannot be serialized (functions, etc) will be ignored.
6117 * @param {function()=} opt_callback Callback.
6119 StorageArea
.prototype.set = function(keys
, opt_callback
) { };
6123 * @param {(string|!Array.<string>|null)=} opt_keys
6124 * A single key or list of keys to get the total usage for. An empty list
6125 * will return 0. Pass in null to get the total usage of all of storage.
6126 * @param {function(number)=} opt_callback
6127 * Callback with the amount of space being used by storage.
6129 StorageArea
.prototype.getBytesInUse = function(opt_keys
, opt_callback
) { };
6134 * @see https://developer.chrome.com/extensions/types.html#type-ChromeSetting
6137 function ChromeSetting() {}
6141 * @param {Object} details Object with a 'scope' (string) key.
6142 * @param {function(): void=} opt_callback Callback function.
6144 ChromeSetting
.prototype.clear = function(details
, opt_callback
) {};
6148 * @param {Object} details Object with an 'incognito' (boolean) key.
6149 * @param {function(Object.<string, *>): void} callback Callback function.
6151 ChromeSetting
.prototype.get = function(details
, callback
) {};
6155 * @param {Object} details Object with a 'value' (*) key and an optional
6156 * 'scope' (string) key.
6157 * @param {function(): void=} opt_callback Callback function.
6159 ChromeSetting
.prototype.set = function(details
, opt_callback
) {};
6164 * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
6167 function RequestFilter() {}
6170 /** @type {!Array.<string>} */
6171 RequestFilter
.prototype.urls
;
6174 /** @type {!Array.<string>} */
6175 RequestFilter
.prototype.types
;
6178 /** @type {number} */
6179 RequestFilter
.prototype.tabId
;
6182 /** @type {number} */
6183 RequestFilter
.prototype.windowId
;
6188 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6191 function HttpHeader() {}
6194 /** @type {string} */
6195 HttpHeader
.prototype.name
;
6198 /** @type {string} */
6199 HttpHeader
.prototype.value
;
6202 /** @type {!Array.<number>} */
6203 HttpHeader
.prototype.binaryValue
;
6207 * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
6208 * @typedef {Array.<!HttpHeader>}
6216 * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
6219 function BlockingResponse() {}
6222 /** @type {boolean} */
6223 BlockingResponse
.prototype.cancel
;
6226 /** @type {string} */
6227 BlockingResponse
.prototype.redirectUrl
;
6230 /** @type {!HttpHeaders_} */
6231 BlockingResponse
.prototype.requestHeaders
;
6234 /** @type {!HttpHeaders_} */
6235 BlockingResponse
.prototype.responseHeaders
;
6238 /** @type {Object.<string,string>} */
6239 BlockingResponse
.prototype.authCredentials
;
6244 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-Message
6247 chrome
.pushMessaging
.Message = function() {};
6253 chrome
.pushMessaging
.Message
.prototype.subchannelId
;
6259 chrome
.pushMessaging
.Message
.prototype.payload
;
6264 * @see http://developer.chrome.com/extensions/pushMessaging.html#type-ChannelIdResult
6267 chrome
.pushMessaging
.ChannelIdResult = function() {};
6273 chrome
.pushMessaging
.ChannelIdResult
.prototype.channelId
;
6277 * The {@code chrome.fileSystem} API makes use of the Entry and FileEntry types
6278 * defined in {@code javascript/externs/fileapi.js}.
6280 * @see http://developer.chrome.com/apps/fileSystem.html
6282 chrome
.fileSystem
= {};
6286 * @param {!Entry} entry The entry to get the display path for. The entry can
6287 * originally be obtained through
6288 * {@code chrome.fileSystem.chooseEntry} or
6289 * {@code chrome.fileSystem.restoreEntry}.
6290 * @param {function(string)} callback A success callback.
6291 * @see http://developer.chrome.com/apps/fileSystem.html#method-getDisplayPath
6293 chrome
.fileSystem
.getDisplayPath = function(entry
, callback
) {};
6297 * @param {!Entry} entry The entry to get a writable entry for.
6298 * @param {function(!Entry)} callback A success callback.
6299 * @see http://developer.chrome.com/apps/fileSystem.html#method-getWritableEntry
6301 chrome
.fileSystem
.getWritableEntry = function(entry
, callback
) {};
6305 * @param {!Entry} entry The entry to query writability.
6306 * @param {function(boolean)} callback A success callback.
6307 * @see http://developer.chrome.com/apps/fileSystem.html#method-isWritableEntry
6309 chrome
.fileSystem
.isWritableEntry = function(entry
, callback
) {};
6314 * description: (string|undefined),
6315 * mimeTypes: (!Array.<string>|undefined),
6316 * extensions: (!Array.<string>|undefined)
6318 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6320 chrome
.fileSystem
.AcceptsOption
;
6325 * type: (string|undefined),
6326 * suggestedName: (string|undefined),
6327 * accepts: (!Array.<!chrome.fileSystem.AcceptsOption>|undefined),
6328 * acceptsAllTypes: (boolean|undefined),
6329 * acceptsMultiple: (boolean|undefined)
6331 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6333 chrome
.fileSystem
.ChooseEntryOptions
;
6337 * @param {!chrome.fileSystem.ChooseEntryOptions|
6338 * function(Entry=, !Array.<!FileEntry>=)} optionsOrCallback The
6339 * options for the file prompt or the callback.
6340 * @param {function(Entry=, !Array.<!FileEntry>=)=} opt_callback A success
6341 * callback, if arg1 is options.
6342 * @see http://developer.chrome.com/apps/fileSystem.html#method-chooseEntry
6344 chrome
.fileSystem
.chooseEntry = function(optionsOrCallback
, opt_callback
) {};
6348 * @param {string} id The ID of the file entry to restore.
6349 * @param {function(!Entry)} callback A success callback.
6350 * @see http://developer.chrome.com/apps/fileSystem.html#method-restoreEntry
6352 chrome
.fileSystem
.restoreEntry = function(id
, callback
) {};
6356 * @param {string} id The ID of the file entry to query restorability.
6357 * @param {function(boolean)} callback A success callback.
6358 * @see http://developer.chrome.com/apps/fileSystem.html#method-isRestorable
6360 chrome
.fileSystem
.isRestorable = function(id
, callback
) {};
6364 * @param {!Entry} entry The entry to regain access to.
6365 * @return {string} The ID that can be passed to restoreEntry to regain access
6366 * to the given file entry.
6367 * @see http://developer.chrome.com/apps/fileSystem.html#method-retainEntry
6369 chrome
.fileSystem
.retainEntry = function(entry
) {};
6374 * @see https://developer.chrome.com/apps/syncFileSystem
6376 chrome
.syncFileSystem
= {};
6380 * Returns a syncable filesystem backed by Google Drive. The returned
6381 * DOMFileSystem instance can be operated on in the same way as
6382 * the Temporary and Persistant file systems (see
6383 * http://www.w3.org/TR/file-system-api/), except that the filesystem
6384 * object returned for Sync FileSystem does NOT support directory
6385 * operations (yet). You can get a list of file entries by reading
6386 * the root directory (by creating a new DirectoryReader),
6387 * but cannot create a new directory in it.
6389 * <p>Calling this multiple times from the same app will return the same
6390 * handle to the same file system.
6392 * <p>Note this call can fail. For example, if the user is not signed in
6393 * to Chrome or if there is no network operation. To handle these errors
6394 * it is important chrome.runtime.lastError is checked in the callback.
6396 * @param {function(!FileSystem)} callback A callback type for
6397 * requestFileSystem.
6398 * @see https://developer.chrome.com/apps/syncFileSystem#method-requestFileSystem
6400 chrome
.syncFileSystem
.requestFileSystem = function(callback
) {};
6404 * Sets the default conflict resolution policy for the 'syncable' file
6405 * storage for the app. By default it is set to 'last_write_win'.
6406 * When conflict resolution policy is set to 'last_write_win' conflicts
6407 * for existing files are automatically resolved next time the file is updated.
6408 * {@code callback} can be optionally given to know if the request has
6411 * @param {string} policy Any of 'last_write_win' or 'manual'
6412 * @param {function()=} opt_callback
6414 * @see https://developer.chrome.com/apps/syncFileSystem#method-setConflictResolutionPolicy
6416 chrome
.syncFileSystem
.setConflictResolutionPolicy
=
6417 function(policy
, opt_callback
) {};
6421 * Gets the current conflict resolution policy.
6423 * @param {function(string)} callback Accepting any of 'last_write_win'
6425 * @see https://developer.chrome.com/apps/syncFileSystem#method-getConflictResolutionPolicy
6427 chrome
.syncFileSystem
.getConflictResolutionPolicy = function(callback
) {};
6431 * Returns the current usage and quota in bytes for the 'syncable' file
6432 * storage for the app.
6434 * @param {!FileSystem} fileSystem
6435 * @param {function(!Object)} callback Taking an object substantially similar
6436 * to {@code {'usageBytes': number, quotaBytes: number}}.
6437 * @see https://developer.chrome.com/apps/syncFileSystem#method-getUsageAndQuota
6439 chrome
.syncFileSystem
.getUsageAndQuota = function(fileSystem
, callback
) {};
6443 * Returns the FileStatus for the given fileEntry. The status value can be
6444 * 'synced', 'pending' or 'conflicting'. Note that 'conflicting' state only
6445 * happens when the service's conflict resolution policy is set to 'manual'.
6447 * @param {!Entry} fileEntry
6448 * @param {function(string)} callback Called with any of 'synced', 'pending'
6451 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatus
6453 chrome
.syncFileSystem
.getFileStatus = function(fileEntry
, callback
) {};
6457 * Returns each FileStatus for the given fileEntry array. Typically called
6458 * with the result from dirReader.readEntries().
6460 * @param {!Array.<!FileEntry>} fileEntries
6461 * @param {function(!Array.<!Object>)} callback Each object will look like:
6462 * {@code {'fileEntry': Entry, 'status': string, 'error': string?}}.
6464 * @see https://developer.chrome.com/apps/syncFileSystem#method-getFileStatuses
6466 chrome
.syncFileSystem
.getFileStatuses = function(fileEntries
, callback
) {};
6472 * <p>Returns the current sync backend status.
6474 * @param {function(string)} callback Arg is any of 'initializing', 'running',
6475 * 'authentication_required', 'temporary_unavailable', or 'disabled'.
6477 * @see https://developer.chrome.com/apps/syncFileSystem#method-getServiceStatus
6479 chrome
.syncFileSystem
.getServiceStatus = function(callback
) {};
6483 * Fired when an error or other status change has happened in the sync
6484 * backend (for example, when the sync is temporarily disabled due
6485 * to network or authentication error).
6487 * @type {!ChromeObjectEvent}
6489 * @see https://developer.chrome.com/apps/syncFileSystem#event-onServiceStatusChanged
6491 chrome
.syncFileSystem
.onServiceStatusChanged
;
6495 * Fired when a file has been updated by the background sync service.
6497 * @type {!ChromeObjectEvent}
6499 * @see https://developer.chrome.com/apps/syncFileSystem#event-onFileStatusChanged
6501 chrome
.syncFileSystem
.onFileStatusChanged
;
6506 * @see http://developer.chrome.com/extensions/alarms.html
6512 * Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event
6513 * is fired. If there is another alarm with the same name (or no name if none is
6514 * specified), it will be cancelled and replaced by this alarm.
6515 * @param {string|!chrome.alarms.AlarmCreateInfo} nameOrAlarmCreateInfo Either
6516 * the name to identify this alarm or the info used to create the alarm. If
6517 * no name is passed, the empty string is used to identify the alarm.
6518 * @param {!chrome.alarms.AlarmCreateInfo=} opt_alarmInfo If a name was passed
6519 * as arg1, the info used to create the alarm.
6520 * @see http://developer.chrome.com/extensions/alarms.html#method-create
6522 chrome
.alarms
.create = function(nameOrAlarmCreateInfo
, opt_alarmInfo
) {};
6526 * Retrieves details about the specified alarm.
6527 * @param {string|function(!chrome.alarms.Alarm)} nameOrCallback The name
6528 * of the alarm to get or the callback to invoke with the alarm. If no name
6529 * is passed, the empty string is used to get the alarm.
6530 * @param {function(!chrome.alarms.Alarm)=} opt_callback If a name was passed
6531 * as arg1, the callback to invoke with the alarm.
6532 * @see http://developer.chrome.com/extensions/alarms.html#method-get
6534 chrome
.alarms
.get = function(nameOrCallback
, opt_callback
) {};
6538 * Gets an array of all the alarms.
6539 * @param {function(!Array.<!chrome.alarms.Alarm>)} callback
6540 * @see http://developer.chrome.com/extensions/alarms.html#method-getAll
6542 chrome
.alarms
.getAll = function(callback
) {};
6546 * Clears the alarm with the given name.
6547 * @param {string=} opt_name
6548 * @see http://developer.chrome.com/extensions/alarms.html#method-clear
6550 chrome
.alarms
.clear = function(opt_name
) {};
6554 * Clears all alarms.
6555 * @see http://developer.chrome.com/extensions/alarms.html#method-clearAll
6557 chrome
.alarms
.clearAll = function() {};
6561 * Fired when an alarm has elapsed. Useful for event pages.
6562 * @type {!chrome.alarms.AlarmEvent}
6563 * @see http://developer.chrome.com/extensions/alarms.html#event-onAlarm
6565 chrome
.alarms
.onAlarm
;
6572 chrome
.alarms
.AlarmEvent = function() {};
6576 * @param {function(!chrome.alarms.Alarm): void} callback
6578 chrome
.alarms
.AlarmEvent
.prototype.addListener = function(callback
) {};
6582 * @param {function(!chrome.alarms.Alarm): void} callback
6584 chrome
.alarms
.AlarmEvent
.prototype.removeListener = function(callback
) {};
6588 * @param {function(!chrome.alarms.Alarm): void} callback
6591 chrome
.alarms
.AlarmEvent
.prototype.hasListener = function(callback
) {};
6597 chrome
.alarms
.AlarmEvent
.prototype.hasListeners = function() {};
6603 * @see http://developer.chrome.com/extensions/alarms.html#type-Alarm
6605 chrome
.alarms
.Alarm = function() {};
6609 * Name of this alarm.
6612 chrome
.alarms
.Alarm
.prototype.name
;
6616 * Time at which this alarm was scheduled to fire, in milliseconds past the
6617 * epoch (e.g. Date.now() + n). For performance reasons, the alarm may have been
6618 * delayed an arbitrary amount beyond this.
6621 chrome
.alarms
.Alarm
.prototype.scheduledTime
;
6625 * If not null, the alarm is a repeating alarm and will fire again in
6626 * periodInMinutes minutes.
6629 chrome
.alarms
.Alarm
.prototype.periodInMinutes
;
6634 * when: (number|undefined),
6635 * delayInMinutes: (number|undefined),
6636 * periodInMinutes: (number|undefined)
6638 * @see http://developer.chrome.com/extensions/alarms.html#method-create
6640 chrome
.alarms
.AlarmCreateInfo
;
6644 * @see https://developer.chrome.com/apps/hid
6655 * @see https://developer.chrome.com/apps/hid#method-getDevices
6657 chrome
.hid
.HidGetDevicesOptions
;
6662 * usagePage: number,
6664 * reportIds: !Array.<number>
6666 * @see https://developer.chrome.com/apps/hid#method-getDevices
6668 chrome
.hid
.HidDeviceUsage
;
6675 * productId: number,
6676 * collections: !Array.<!chrome.hid.HidDeviceUsage>,
6677 * maxInputReportSize: number,
6678 * maxOutputReportSize: number,
6679 * maxFeatureReportSize: number
6681 * @see https://developer.chrome.com/apps/hid#method-getDevices
6683 chrome
.hid
.HidDeviceInfo
;
6688 * connectionId: number
6690 * @see https://developer.chrome.com/apps/hid#method-connect
6692 chrome
.hid
.HidConnectInfo
;
6696 * @see https://developer.chrome.com/apps/hid#method-getDevices
6697 * Enumerates all the connected HID devices specified by the
6698 * vendorId/productId/interfaceId tuple.
6699 * @param {!chrome.hid.HidGetDevicesOptions} options The properties to search
6700 * for on target devices.
6701 * @param {function(!Array.<!Object>)} callback Invoked with a list of
6702 * |HidDeviceInfo|s on complete.
6704 chrome
.hid
.getDevices = function(options
, callback
) {};
6708 * @see https://developer.chrome.com/apps/hid#method-connect
6709 * Opens a connection to a HID device for communication.
6710 * @param {number} deviceId The ID of the device to open.
6711 * @param {function(!Object=)} callback Invoked with an |HidConnectInfo| if the
6712 * connection succeeds, or undefined if it fails.
6714 chrome
.hid
.connect = function(deviceId
, callback
) {};
6718 * @see https://developer.chrome.com/apps/hid#method-disconnect
6719 * Disconnects from a device.
6720 * @param {number} connectionId The connection to close.
6721 * @param {function()=} opt_callback The callback to invoke once the connection
6724 chrome
.hid
.disconnect = function(connectionId
, opt_callback
) {};
6728 * @see https://developer.chrome.com/apps/hid#method-receive
6729 * Receives an input report from an HID device.
6730 * @param {number} connectionId The connection from which to receive the report.
6731 * @param {function(number, !ArrayBuffer)} callback The callback to invoke with
6732 * the received report.
6734 chrome
.hid
.receive = function(connectionId
, callback
) {};
6738 * @see https://developer.chrome.com/apps/hid#method-send
6739 * Sends an output report to an HID device.
6740 * @param {number} connectionId The connection to which to send the report.
6741 * @param {number} reportId The report ID to use, or 0 if none.
6742 * @param {!ArrayBuffer} data The report data.
6743 * @param {function()} callback The callback to invoke once the write is
6746 chrome
.hid
.send = function(connectionId
, reportId
, data
, callback
) {};
6750 * @see https://developer.chrome.com/apps/hid#method-receiveFeatureReport
6751 * Receives a feature report from the device.
6752 * @param {number} connectionId The connection from which to read the feature
6754 * @param {number} reportId The report ID to use, or 0 if none.
6755 * @param {number} size The size of the feature report to receive.
6756 * @param {function(!ArrayBuffer)} callback The callback to invoke with the
6759 chrome
.hid
.receiveFeatureReport
=
6760 function(connectionId
, reportId
, size
, callback
) {};
6764 * @see https://developer.chrome.com/apps/hid#method-sendFeatureReport
6765 * Sends a feature report to the device.
6766 * @param {number} connectionId The connection to which to send the feature
6768 * @param {number} reportId The report ID to use, or 0 if none.
6769 * @param {!ArrayBuffer} data The report data.
6770 * @param {function()} callback The callback to invoke once the write is
6773 chrome
.hid
.sendFeatureReport
=
6774 function(connectionId
, reportId
, data
, callback
) {};
6778 * @see http://developer.chrome.com/extensions/notifications.html
6781 chrome
.notifications
= {};
6787 * iconUrl: (string|undefined)
6789 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6791 chrome
.notifications
.NotificationButton
;
6799 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6801 chrome
.notifications
.NotificationItem
;
6806 * type: (string|undefined),
6807 * iconUrl: (string|undefined),
6808 * title: (string|undefined),
6809 * message: (string|undefined),
6810 * contextMessage: (string|undefined),
6811 * priority: (number|undefined),
6812 * eventTime: (number|undefined),
6813 * buttons: (!Array.<!chrome.notifications.NotificationButton>|undefined),
6814 * imageUrl: (string|undefined),
6815 * items: (!Array.<!chrome.notifications.NotificationItem>|undefined),
6816 * progress: (number|undefined),
6817 * isClickable: (boolean|undefined)
6819 * @see http://developer.chrome.com/extensions/notifications.html#type-NotificationOptions
6821 chrome
.notifications
.NotificationOptions
;
6825 * @typedef {function(boolean): void}
6826 * @see http://developer.chrome.com/extensions/notifications.html#method-update
6827 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
6829 chrome
.notifications
.BooleanCallback
;
6833 * @typedef {function(!Object): void}
6834 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
6836 chrome
.notifications
.ObjectCallback
;
6840 * @typedef {function(string, boolean): void}
6841 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6843 chrome
.notifications
.ClosedCallback
;
6847 * @typedef {function(string, number): void}
6848 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6850 chrome
.notifications
.ButtonCallback
;
6854 * @param {string} notificationId
6855 * @param {!chrome.notifications.NotificationOptions} options
6856 * @param {function(string): void} callback
6857 * @see http://developer.chrome.com/extensions/notifications.html#method-create
6859 chrome
.notifications
.create = function(notificationId
, options
, callback
) {};
6863 * @param {string} notificationId
6864 * @param {!chrome.notifications.NotificationOptions} options
6865 * @param {!chrome.notifications.BooleanCallback} callback
6866 * @see http://developer.chrome.com/extensions/notifications.html#method-update
6868 chrome
.notifications
.update = function(notificationId
, options
, callback
) {};
6872 * @param {string} notificationId
6873 * @param {!chrome.notifications.BooleanCallback} callback
6874 * @see http://developer.chrome.com/extensions/notifications.html#method-clear
6876 chrome
.notifications
.clear = function(notificationId
, callback
) {};
6880 * @see http://developer.chrome.com/extensions/notifications.html#method-getAll
6881 * @param {!chrome.notifications.ObjectCallback} callback
6883 chrome
.notifications
.getAll = function(callback
) {};
6887 * @see http://developer.chrome.com/extensions/notifications.html#method-getPermissionLevel
6888 * @param {function(string): void} callback takes 'granted' or 'denied'
6890 chrome
.notifications
.getPermissionLevel = function(callback
) {};
6894 * @type {!chrome.notifications.ClosedEvent}
6895 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6897 chrome
.notifications
.onClosed
;
6901 * The user clicked a non-button area of the notification. Callback receives a
6903 * @type {!ChromeStringEvent}
6904 * @see http://developer.chrome.com/extensions/notifications.html#event-onClicked
6906 chrome
.notifications
.onClicked
;
6910 * @type {!chrome.notifications.ButtonClickedEvent}
6911 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6913 chrome
.notifications
.onButtonClicked
;
6917 * Indicates permission level change. Callback should expect 'granted' or
6919 * @type {!ChromeStringEvent}
6920 * @see http://developer.chrome.com/extensions/notifications.html#event-onPermissionLevelChanged
6922 chrome
.notifications
.onPermissionLevelChanged
;
6926 * @type {!ChromeEvent}
6927 * @see http://developer.chrome.com/extensions/notifications.html#event-onShowSettings
6929 chrome
.notifications
.onShowSettings
;
6935 * @see http://developer.chrome.com/extensions/notifications.html#event-onClosed
6937 chrome
.notifications
.ClosedEvent = function() {};
6941 * @param {!chrome.notifications.ClosedCallback} callback
6943 chrome
.notifications
.ClosedEvent
.prototype.addListener = function(callback
) {};
6947 * @param {!chrome.notifications.ClosedCallback} callback
6949 chrome
.notifications
.ClosedEvent
.prototype.removeListener
=
6950 function(callback
) {};
6954 * @param {!chrome.notifications.ClosedCallback} callback
6957 chrome
.notifications
.ClosedEvent
.prototype.hasListener = function(callback
) {};
6963 chrome
.notifications
.ClosedEvent
.prototype.hasListeners = function() {};
6969 * @see http://developer.chrome.com/extensions/notifications.html#event-onButtonClicked
6971 chrome
.notifications
.ButtonClickedEvent = function() {};
6975 * @param {!chrome.notifications.ButtonCallback} callback
6977 chrome
.notifications
.ButtonClickedEvent
.prototype.addListener
=
6978 function(callback
) {};
6982 * @param {!chrome.notifications.ButtonCallback} callback
6984 chrome
.notifications
.ButtonClickedEvent
.prototype.removeListener
=
6985 function(callback
) {};
6989 * @param {!chrome.notifications.ButtonCallback} callback
6992 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListener
=
6993 function(callback
) {};
6999 chrome
.notifications
.ButtonClickedEvent
.prototype.hasListeners = function() {};
7004 * @see http://developer.chrome.com/apps/system_storage.html
7006 chrome
.system
.storage
= {};
7011 chrome
.system
.storage
.StorageUnitInfo = function() {};
7014 /** @type {string} */
7015 chrome
.system
.storage
.StorageUnitInfo
.id
;
7018 /** @type {string} */
7019 chrome
.system
.storage
.StorageUnitInfo
.name
;
7022 /** @type {string} Any of 'fixed', 'removable', or 'unknown' */
7023 chrome
.system
.storage
.StorageUnitInfo
.type
;
7026 /** @type {number} */
7027 chrome
.system
.storage
.StorageUnitInfo
.capacity
;
7032 * Event whose listeners take a StorageUnitInfoEvent parameter.
7035 chrome
.system
.storage
.StorageUnitInfoEvent = function() {};
7038 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7039 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.addListener
=
7040 function(callback
) {};
7043 /** @param {function(!chrome.system.storage.StorageUnitInfo): void} callback */
7044 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.removeListener
=
7045 function(callback
) {};
7049 * @param {function(!chrome.system.storage.StorageUnitInfo): void} callback
7052 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListener
=
7053 function(callback
) {};
7056 /** @return {boolean} */
7057 chrome
.system
.storage
.StorageUnitInfoEvent
.prototype.hasListeners
=
7061 /** @type {chrome.system.storage.StorageUnitInfoEvent} */
7062 chrome
.system
.storage
.onAttached
;
7065 /** @type {!ChromeStringEvent} */
7066 chrome
.system
.storage
.onDetached
;
7070 * Gets the storage information from the system.
7071 * @param {function(!Array.<!chrome.system.storage.StorageUnitInfo>)} callback
7073 chrome
.system
.storage
.getInfo = function(callback
) {};
7077 * Ejects a removable storage device.
7078 * @param {string} id The transient device ID from StorageUnitInfo.
7079 * @param {function(string)} callback Callback function where the value
7080 * is any of: "success", "in_use", "no_such_device", "failure"
7082 chrome
.system
.storage
.ejectDevice = function(id
, callback
) {};
7086 * Gets the available capacity of a specified storage device.
7087 * @param {string} id The transient device ID from StorageUnitInfo.
7088 * @param {function(Object.<string, number>)} callback A callback function that
7089 * accepts an object with {@code id} and {@code availableCapacity} fields.
7091 chrome
.system
.storage
.getAvailableCapacity = function(id
, callback
) {};
7095 * @see http://developer.chrome.com/apps/usb.html
7103 chrome
.usb
.Device
= function Device() {};
7106 /** @type {number} */
7107 chrome
.usb
.Device
.prototype.device
;
7110 /** @type {number} */
7111 chrome
.usb
.Device
.prototype.vendorId
;
7114 /** @type {number} */
7115 chrome
.usb
.Device
.prototype.productId
;
7120 chrome
.usb
.ConnectionHandle
= function ConnectionHandle() {};
7123 /** @type {number} */
7124 chrome
.usb
.ConnectionHandle
.prototype.handle
;
7127 /** @type {number} */
7128 chrome
.usb
.ConnectionHandle
.prototype.vendorId
;
7131 /** @type {number} */
7132 chrome
.usb
.ConnectionHandle
.prototype.productId
;
7137 * direction: string,
7139 * length: (number|undefined),
7140 * data: (!ArrayBuffer|undefined)
7143 chrome
.usb
.GenericTransferInfo
;
7148 * direction: string,
7149 * recipient: string,
7150 * requestType: string,
7154 * length: (number|undefined),
7155 * data: (!ArrayBuffer|undefined)
7158 chrome
.usb
.ControlTransferInfo
;
7163 chrome
.usb
.TransferResultInfo = function() {};
7166 /** @type {number|undefined} */
7167 chrome
.usb
.TransferResultInfo
.prototype.resultCode
;
7170 /** @type {!ArrayBuffer|undefined} */
7171 chrome
.usb
.TransferResultInfo
.prototype.data
;
7177 * productId: number,
7178 * interfaceId: (number|undefined)
7181 chrome
.usb
.FindDevicesOptions
;
7185 * @see http://developer.chrome.com/apps/usb.html#method-getDevices
7186 * @param {!Object} options The properties to search for on target devices.
7187 * @param {function(!Array.<!chrome.usb.Device>)} callback Invoked with a list
7188 * of |Device|s on complete.
7190 chrome
.usb
.getDevices = function(options
, callback
) {};
7194 * @see http://developer.chrome.com/apps/usb.html#method-requestAccess
7195 * @param {!chrome.usb.Device} device The device to request access to.
7196 * @param {number} interfaceId
7197 * @param {function(boolean)} callback
7199 chrome
.usb
.requestAccess = function(device
, interfaceId
, callback
) {};
7203 * @see http://developer.chrome.com/apps/usb.html#method-openDevice
7204 * @param {!chrome.usb.Device} device The device to open.
7205 * @param {function(!chrome.usb.ConnectionHandle=)} callback Invoked with the
7206 * created ConnectionHandle on complete.
7208 chrome
.usb
.openDevice = function(device
, callback
) {};
7212 * @see http://developer.chrome.com/apps/usb.html#method-findDevices
7213 * @param {!chrome.usb.FindDevicesOptions} options The properties to search for
7214 * on target devices.
7215 * @param {function(!Array.<!chrome.usb.ConnectionHandle>)} callback Invoked
7216 * with the opened ConnectionHandle on complete.
7218 chrome
.usb
.findDevices = function(options
, callback
) {};
7222 * @see http://developer.chrome.com/apps/usb.html#method-closeDevice
7223 * @param {!chrome.usb.ConnectionHandle} handle The connection handle to close.
7224 * @param {function()=} opt_callback The callback to invoke once the device is
7227 chrome
.usb
.closeDevice = function(handle
, opt_callback
) {};
7231 * @see http://developer.chrome.com/apps/usb.html#method-listInterfaces
7232 * @param {!chrome.usb.ConnectionHandle} handle The device from which the
7233 * interfaces should be listed.
7234 * @param {function(!Array.<!Object>)} callback
7235 * The callback to invoke when the interfaces are enumerated.
7237 chrome
.usb
.listInterfaces = function(handle
, callback
) {};
7241 * @see http://developer.chrome.com/apps/usb.html#method-claimInterface
7242 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7243 * interface is to be claimed.
7244 * @param {number} interfaceNumber
7245 * @param {function()} callback The callback to invoke once the interface is
7248 chrome
.usb
.claimInterface = function(handle
, interfaceNumber
, callback
) {};
7252 * @see http://developer.chrome.com/apps/usb.html#method-releaseInterface
7253 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7254 * interface is to be released.
7255 * @param {number} interfaceNumber
7256 * @param {function()} callback The callback to invoke once the interface is
7259 chrome
.usb
.releaseInterface = function(handle
, interfaceNumber
, callback
) {};
7263 * @see http://developer.chrome.com/apps/usb.html#method-setInterfaceAlternateSetting
7264 * @param {!chrome.usb.ConnectionHandle} handle The device on which the
7265 * interface settings are to be set.
7266 * @param {number} interfaceNumber
7267 * @param {number} alternateSetting The alternate setting to set.
7268 * @param {function()} callback The callback to invoke once the interface
7271 chrome
.usb
.setInterfaceAlternateSetting = function(
7272 handle
, interfaceNumber
, alternateSetting
, callback
) {};
7276 * @see http://developer.chrome.com/apps/usb.html#method-controlTransfer
7277 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7279 * @param {!chrome.usb.ControlTransferInfo} transferInfo The parameters to the
7281 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7282 * transfer has completed.
7284 chrome
.usb
.controlTransfer = function(handle
, transferInfo
, callback
) {};
7288 * @see http://developer.chrome.com/apps/usb.html#method-bulkTransfer
7289 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make
7291 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7292 * transfer. See GenericTransferInfo.
7293 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7294 * transfer has completed.
7296 chrome
.usb
.bulkTransfer = function(handle
, transferInfo
, callback
) {};
7300 * @see http://developer.chrome.com/apps/usb.html#method-interruptTransfer
7301 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7303 * @param {!chrome.usb.GenericTransferInfo} transferInfo The parameters to the
7304 * transfer. See GenericTransferInfo.
7305 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7306 * transfer has completed.
7308 chrome
.usb
.interruptTransfer = function(handle
, transferInfo
, callback
) {};
7312 * @see http://developer.chrome.com/apps/usb.html#method-isochronousTransfer
7313 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to make the
7315 * @param {!Object} transferInfo The parameters to the transfer. See
7316 * IsochronousTransferInfo.
7317 * @param {function(!chrome.usb.TransferResultInfo)} callback Invoked once the
7318 * transfer has been completed.
7320 chrome
.usb
.isochronousTransfer = function(handle
, transferInfo
, callback
) {};
7324 * @see http://developer.chrome.com/apps/usb.html#method-resetDevice
7325 * @param {!chrome.usb.ConnectionHandle} handle A connection handle to reset.
7326 * @param {function(boolean)} callback Invoked once the device is reset with a
7327 * boolean indicating whether the reset completed successfully.
7329 chrome
.usb
.resetDevice = function(handle
, callback
) {};
7334 * @see https://developer.chrome.com/apps/webstore
7336 chrome
.webstore
= {};
7340 * @param {string|function()|function(string)=}
7341 * opt_urlOrSuccessCallbackOrFailureCallback Either the URL to install or
7342 * the succcess callback taking no arg or the failure callback taking an
7344 * @param {function()|function(string)=} opt_successCallbackOrFailureCallback
7345 * Either the succcess callback taking no arg or the failure callback
7346 * taking an error string arg.
7347 * @param {function(string)=} opt_failureCallback The failure callback.
7349 chrome
.webstore
.install = function(
7350 opt_urlOrSuccessCallbackOrFailureCallback
,
7351 opt_successCallbackOrFailureCallback
,
7352 opt_failureCallback
) {};
7355 /** @type {!ChromeStringEvent} */
7356 chrome
.webstore
.onInstallStageChanged
;
7359 /** @type {!ChromeNumberEvent} */
7360 chrome
.webstore
.onDownloadProgress
;
7363 ////////////////////////////////////////////////////////////////////////////////
7364 /////////////////////////// Chrome Private APIs ////////////////////////////////
7365 ////////////////////////////////////////////////////////////////////////////////
7369 chrome
.screenlockPrivate
= {};
7373 * @param {string} message Displayed on the unlock screen.
7375 chrome
.screenlockPrivate
.showMessage = function(message
) {};
7379 * @param {function(boolean)} callback
7381 chrome
.screenlockPrivate
.getLocked = function(callback
) {};
7385 * @param {boolean} locked If true and the screen is unlocked, locks the screen.
7386 * If false and the screen is locked, unlocks the screen.
7388 chrome
.screenlockPrivate
.setLocked = function(locked
) {};
7391 /** @type {!ChromeBooleanEvent} */
7392 chrome
.screenlockPrivate
.onChanged
;
7398 chrome
.musicManagerPrivate
= {};
7402 * @param {function(string): void} callback
7404 chrome
.musicManagerPrivate
.getDeviceId = function(callback
) {};
7410 chrome
.mediaGalleriesPrivate
= {};
7414 * @typedef {function({deviceId: string, deviceName: string}): void}
7416 chrome
.mediaGalleriesPrivate
.DeviceCallback
;
7420 * @typedef {function({galleryId: string}): void}
7422 chrome
.mediaGalleriesPrivate
.GalleryChangeCallback
;
7426 * @typedef {function({galleryId: string, success: boolean}): void}
7428 chrome
.mediaGalleriesPrivate
.AddGalleryWatchCallback
;
7432 * @param {string} galleryId
7433 * @param {!chrome.mediaGalleriesPrivate.AddGalleryWatchCallback} callback
7435 chrome
.mediaGalleriesPrivate
.addGalleryWatch = function(galleryId
, callback
) {};
7439 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
7440 * @deprecated Use {chrome.system.storage.onAttach}.
7442 chrome
.mediaGalleriesPrivate
.onDeviceAttached
;
7446 * @type {!chrome.mediaGalleriesPrivate.DeviceEvent}
7447 * @deprecated Use {chrome.system.storage.onDetach}.
7449 chrome
.mediaGalleriesPrivate
.onDeviceDetached
;
7453 * @type {!chrome.mediaGalleriesPrivate.GalleryChangeEvent}
7455 chrome
.mediaGalleriesPrivate
.onGalleryChanged
;
7461 * @deprecated Use {chrome.system.storage.DeviceEvent}.
7463 chrome
.mediaGalleriesPrivate
.DeviceEvent = function() {};
7467 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7468 * @deprecated Use {chrome.system.storage.DeviceEvent.addListener}.
7470 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.addListener
=
7471 function(callback
) {};
7475 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7476 * @deprecated Use {chrome.system.storage.DeviceEvent.removeListener}.
7478 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.removeListener
=
7479 function(callback
) {};
7483 * @param {!chrome.mediaGalleriesPrivate.DeviceCallback} callback
7484 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}.
7486 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListener
=
7487 function(callback
) {};
7492 * @deprecated Use {chrome.system.storage.DeviceEvent.hasListener}
7494 chrome
.mediaGalleriesPrivate
.DeviceEvent
.prototype.hasListeners
=
7495 function(callback
) {};
7502 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent = function() {};
7506 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7508 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.addListener
=
7509 function(callback
) {};
7513 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7515 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.removeListener
=
7516 function(callback
) {};
7520 * @param {!chrome.mediaGalleriesPrivate.GalleryChangeCallback} callback
7522 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListener
=
7523 function(callback
) {};
7529 chrome
.mediaGalleriesPrivate
.GalleryChangeEvent
.prototype.hasListeners
=
7534 * WARNING(2014/08/04): This API is still under active initial development and
7535 * unstable and has a number of issues:
7537 * 1. The types NetworkProperties and ManagedNetworkProperties are not defined
7538 * in the docs; that is, there is no list of fields and their types.
7539 * Therefore, these types are treated as bags-of-objects, rather than types.
7540 * 2. According to Steven Bennetts, NetworkProperties *should* be a
7541 * bag-of-properties as it's a map containing ONC properties and the ONC
7542 * properties do not follow the JS field naming conventions; specifically,
7543 * the properties start with an uppercase letter, and at least one property
7544 * is in all uppercase.
7545 * 3. The deviceSsid and deviceBssid fields of VerticationProperties are listed
7546 * as being required while their description mentions "Only set if" which
7547 * sound optional. The dev team was unclear whether they are required or
7549 * 4. Some parameters to some functions are marked as being in the Beta channel
7550 * only (for example, the networkGuid parameter to getCaptivePortalStatus).
7552 * Because of the above issues, this API should not be used as an example for
7553 * other APIs added to this file. Please contact mednik@ for questions on and
7554 * maintenance for this API.
7556 * @see https://developer.chrome.com/extensions/networkingPrivate
7558 chrome
.networkingPrivate
= {};
7563 * certificate: string,
7564 * publicKey: string,
7566 * signedData: string,
7567 * deviceSerial: string,
7568 * deviceSsid: string,
7569 * deviceBssid: string
7572 chrome
.networkingPrivate
.VerificationProperties
;
7577 * networkType: string,
7578 * visible: (boolean|undefined),
7579 * configured: (boolean|undefined),
7580 * limit: (number|undefined)
7583 chrome
.networkingPrivate
.NetworkFilter
;
7587 * @param {string} guid
7588 * @param {function(!Object)} callback
7590 chrome
.networkingPrivate
.getProperties = function(guid
, callback
) {};
7594 * @param {string} guid
7595 * @param {function(!Object)} callback
7597 chrome
.networkingPrivate
.getManagedProperties = function(guid
, callback
) {};
7601 * @param {string} guid
7602 * @param {function(!Object)} callback
7604 chrome
.networkingPrivate
.getState = function(guid
, callback
) {};
7608 * @param {string} guid
7609 * @param {!Object} properties
7610 * @param {function()} callback
7612 chrome
.networkingPrivate
.setProperties = function(guid
, properties
, callback
) {
7617 * @param {boolean} shared
7618 * @param {!Object} properties
7619 * @param {function(string)} callback Returns guid of the configured
7622 chrome
.networkingPrivate
.createNetwork
=
7623 function(shared
, properties
, callback
) {};
7627 * @param {!chrome.networkingPrivate.NetworkFilter} filter
7628 * @param {function(!Array.<!Object>)=} opt_callback
7630 chrome
.networkingPrivate
.getNetworks = function(filter
, opt_callback
) {};
7634 * @param {string} type
7635 * @param {function(!Array.<!Object>)=} opt_callback
7637 chrome
.networkingPrivate
.getVisibleNetworks = function(type
, opt_callback
) {};
7640 /** @param {function(!Array.<string>)=} opt_callback */
7641 chrome
.networkingPrivate
.getEnabledNetworkTypes = function(opt_callback
) {};
7644 /** @param {string} networkType */
7645 chrome
.networkingPrivate
.enableNetworkType = function(networkType
) {};
7648 /** @param {string} networkType */
7649 chrome
.networkingPrivate
.disableNetworkType = function(networkType
) {};
7653 * Requests that the networking subsystem scan for new networks and update the
7654 * list returned by getVisibleNetworks.
7656 chrome
.networkingPrivate
.requestNetworkScan = function() {};
7660 * @param {string} guid
7661 * @param {function()=} opt_callback
7663 chrome
.networkingPrivate
.startConnect = function(guid
, opt_callback
) {};
7667 * @param {string} guid
7668 * @param {function()=} opt_callback
7670 chrome
.networkingPrivate
.startDisconnect = function(guid
, opt_callback
) {};
7674 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7675 * @param {function(boolean)} callback
7677 chrome
.networkingPrivate
.verifyDestination
=
7678 function(verificationInfo
, callback
) {};
7682 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7683 * @param {string} guid
7684 * @param {function(string)} callback
7686 chrome
.networkingPrivate
.verifyAndEncryptCredentials
=
7687 function(verificationInfo
, guid
, callback
) {};
7691 * @param {!chrome.networkingPrivate.VerificationProperties} verificationInfo
7692 * @param {string} data
7693 * @param {function(string)} callback
7695 chrome
.networkingPrivate
.verifyAndEncryptData
=
7696 function(verificationInfo
, data
, callback
) {};
7700 * @param {string} ipOrMacAddress
7701 * @param {boolean} enabled
7702 * @param {function(string)} callback
7704 chrome
.networkingPrivate
.setWifiTDLSEnabledState
=
7705 function(ipOrMacAddress
, enabled
, callback
) {};
7709 * @param {string} ipOrMacAddress
7710 * @param {function(string)} callback
7712 chrome
.networkingPrivate
.getWifiTDLSStatus
=
7713 function(ipOrMacAddress
, callback
) {};
7717 * @param {string} guid
7718 * @param {function(string)} callback
7720 chrome
.networkingPrivate
.getCaptivePortalStatus = function(guid
, callback
) {};
7723 /** @type {!ChromeStringArrayEvent} */
7724 chrome
.networkingPrivate
.onNetworksChanged
;
7727 /** @type {!ChromeStringArrayEvent} */
7728 chrome
.networkingPrivate
.onNetworkListChanged
;
7731 /** @type {!ChromeStringStringEvent} */
7732 chrome
.networkingPrivate
.onPortalDetectionCompleted
;
7736 * WARNING(2014/08/14): This API is still under active initial development and
7737 * unstable. The types are not well defined or documented, and this API
7738 * definition here should not be used as an example for other APIs added to this
7739 * file. Please contact mednik@ for questions on and maintenance for this API.
7741 * @see http://goo.gl/afV8wB
7747 * Data type sent to the event handler of chrome.mdns.onServiceList.
7750 chrome
.mdns
.MdnsService = function() {};
7753 /** @type {string} */
7754 chrome
.mdns
.MdnsService
.prototype.serviceName
;
7757 /** @type {string} */
7758 chrome
.mdns
.MdnsService
.prototype.serviceHostPort
;
7761 /** @type {string} */
7762 chrome
.mdns
.MdnsService
.prototype.ipAddress
;
7765 /** @type {!Array.<string>} */
7766 chrome
.mdns
.MdnsService
.prototype.serviceData
;
7770 * Event whose listeners take an array of MdnsService parameter.
7773 chrome
.mdns
.ServiceListEvent = function() {};
7777 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
7778 * @param {!Object=} opt_filter
7780 chrome
.mdns
.ServiceListEvent
.prototype.addListener
=
7781 function(callback
, opt_filter
) {};
7784 /** @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback */
7785 chrome
.mdns
.ServiceListEvent
.prototype.removeListener = function(callback
) {};
7789 * @param {function(!Array.<!chrome.mdns.MdnsService>): void} callback
7792 chrome
.mdns
.ServiceListEvent
.prototype.hasListener = function(callback
) {};
7795 /** @return {boolean} */
7796 chrome
.mdns
.ServiceListEvent
.prototype.hasListeners = function() {};
7799 /** @type {!chrome.mdns.ServiceListEvent} */
7800 chrome
.mdns
.onServiceList
;
7805 * @see http://goo.gl/79p5h5
7807 chrome
.gcdPrivate
= {};
7811 * Represents a GCD device discovered locally or registered to a given user.
7812 * deviceId: Opaque device identifier to be passed to API.
7813 * setupType: How this device was discovered.
7814 * cloudId: Cloud identifier string.
7815 * deviceName: Device human readable name.
7816 * deviceType: Device type (camera, printer, etc).
7817 * deviceDescription: Device human readable description.
7820 * setupType: string,
7821 * cloudId: (string|undefined),
7822 * deviceType: string,
7823 * deviceName: string,
7824 * deviceDescription: string
7827 chrome
.gcdPrivate
.Device
;
7831 * Returns the list of cloud devices visible locally or available in the
7832 * cloud for user account.
7833 * @param {function(!Array.<!chrome.gcdPrivate.Device>): void} callback
7835 chrome
.gcdPrivate
.getCloudDeviceList = function(callback
) {};
7839 * Queries network for local devices. Triggers onDeviceStateChanged and
7840 * onDeviceRemoved events. Call this function *only* after registering for
7841 * onDeviceStateChanged and onDeviceRemoved events, or it will do nothing.
7843 chrome
.gcdPrivate
.queryForNewLocalDevices = function() {};
7847 * Cache the WiFi password in the browser process for use during
7848 * provisioning. This is done to allow the gathering of the wifi password to
7849 * not be done while connected to the device's network. Callback is called
7850 * with true if wifi password was cached and false if it was unavailable.
7851 * @param {string} ssid
7852 * @param {function(boolean): void} callback
7854 chrome
.gcdPrivate
.prefetchWifiPassword = function(ssid
, callback
) {};
7858 * Establish the session.
7859 * @param {string} ipAddress
7860 * @param {number} port
7861 * @param {function(number, string, !Array.<string>): void}
7862 * callback Called when the session is established or on error. 1st param,
7863 * |sessionId|, is the session ID (identifies the session for future calls).
7864 * 2nd param, |status|, is the status (success or type of error). 3rd param,
7865 * |pairingTypes|, is a list of pairing types supported by this device.
7867 chrome
.gcdPrivate
.establishSession = function(ipAddress
, port
, callback
) {};
7871 * Start pairing with the selected method.
7872 * @param {number} sessionId
7873 * @param {string} pairingType
7874 * @param {function(string): void} callback
7876 chrome
.gcdPrivate
.startPairing = function(sessionId
, pairingType
, callback
) {};
7880 * Confirm pairing code.
7881 * @param {number} sessionId
7882 * @param {string} code
7883 * @param {function(string): void} callback
7885 chrome
.gcdPrivate
.confirmCode = function(sessionId
, code
, callback
) {};
7889 * Send an encrypted message to the device. If the message is a setup message
7890 * with a wifi ssid specified but no password, the password cached from
7891 * prefetchWifiPassword() will be used and the call will fail if it's not
7892 * available. For open networks use an empty string as the password.
7893 * @param {number} sessionId
7894 * @param {string} api The API path.
7895 * @param {!Object} input The input message to be sent over the encrypted
7897 * @param {function(string, ?Object): void} callback
7899 chrome
.gcdPrivate
.sendMessage = function(sessionId
, api
, input
, callback
) {};
7903 * Terminate the session with the device.
7904 * @param {number} sessionId
7906 chrome
.gcdPrivate
.terminateSession = function(sessionId
) {};
7910 * Returns command definitions.
7911 * @param {string} deviceId The device to get command definitions for.
7912 * @param {function(!Object): void} callback The result callback.
7914 chrome
.gcdPrivate
.getCommandDefinitions = function(deviceId
, callback
) {};
7918 * Creates and sends a new command.
7919 * @param {string} deviceId The device to send the command to.
7920 * @param {number} expireInMs The number of milliseconds since now before the
7921 * command expires. An expired command should not be executed by the device.
7922 * Acceptable values are 10 sec (10000 ms) to 30 days (2592000000 ms),
7923 * inclusive. All values outside that range will be replaced by 30 days.
7924 * @param {!Object} command Described at
7925 * https://developers.google.com/cloud-devices/v1/reference/commands.
7926 * @param {function(!Object): void} callback The result callback.
7928 chrome
.gcdPrivate
.insertCommand = function(
7929 deviceId
, expireInMs
, command
, callback
) {};
7933 * Returns a particular command.
7934 * @param {string} commandId Unique command ID.
7935 * @param {function(!Object): void} callback The result callback.
7937 chrome
.gcdPrivate
.getCommand = function(commandId
, callback
) {};
7941 * Cancels a command.
7942 * @param {string} commandId Unique command ID.
7943 * @param {function(!Object): void} callback The result callback.
7945 chrome
.gcdPrivate
.cancelCommand = function(commandId
, callback
) {};
7949 * Lists all commands in order of creation.
7950 * @param {string} deviceId The device to send the command to.
7951 * @param {string} byUser List all the commands issued by the user. Special
7952 * value 'me' can be used to list by the current user.
7953 * @param {string} state Command state.
7954 * @param {function(!Array.<!Object>): void} callback The result callback.
7956 chrome
.gcdPrivate
.getCommandsList = function(
7957 deviceId
, byUser
, state
, callback
) {};
7962 * Event whose listeners take a chrome.gcdPrivate.Device.
7965 chrome
.gcdPrivate
.DeviceEvent = function() {};
7968 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7969 chrome
.gcdPrivate
.DeviceEvent
.prototype.addListener = function(callback
) {};
7972 /** @param {function(!chrome.gcdPrivate.Device): void} callback */
7973 chrome
.gcdPrivate
.DeviceEvent
.prototype.removeListener = function(callback
) {};
7977 * @param {function(!chrome.gcdPrivate.Device): void} callback
7980 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListener = function(callback
) {};
7983 /** @return {boolean} */
7984 chrome
.gcdPrivate
.DeviceEvent
.prototype.hasListeners = function() {};
7988 * Fires when a device's state changes. When a listener is first added, this
7989 * event fires for all known devices on the network. Afterwards, it will fire
7990 * with device status updates.
7991 * @type {!chrome.gcdPrivate.DeviceEvent}
7993 chrome
.gcdPrivate
.onDeviceStateChanged
;
7997 * Fires when a given device disappears.
7998 * |deviceId| The device that has disappeared.
7999 * @type {!ChromeStringEvent}
8001 chrome
.gcdPrivate
.onDeviceRemoved
;
8006 * @see http://goo.gl/bKHibo
8008 chrome
.bluetoothPrivate
= {};
8013 chrome
.bluetoothPrivate
.PairingEvent = function() {};
8016 /** @type {string} */
8017 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pairing
;
8020 /** @type {!chrome.bluetooth.Device} */
8021 chrome
.bluetoothPrivate
.PairingEvent
.prototype.device
;
8024 /** @type {string|undefined} */
8025 chrome
.bluetoothPrivate
.PairingEvent
.prototype.pincode
;
8028 /** @type {number|undefined} */
8029 chrome
.bluetoothPrivate
.PairingEvent
.prototype.passkey
;
8032 /** @type {number|undefined} */
8033 chrome
.bluetoothPrivate
.PairingEvent
.prototype.enteredKey
;
8038 * name: (string|undefined),
8039 * powered: (boolean|undefined),
8040 * discoverable: (boolean|undefined)
8043 chrome
.bluetoothPrivate
.NewAdapterState
;
8048 * device: !chrome.bluetooth.Device,
8049 * response: (string|undefined),
8050 * pincode: (string|undefined),
8051 * passkey: (number|undefined),
8052 * enteredKey: (number|undefined)
8055 chrome
.bluetoothPrivate
.SetPairingResponseOptions
;
8059 * @param {!chrome.bluetoothPrivate.NewAdapterState} adapterState
8060 * @param {function()} callback
8062 chrome
.bluetoothPrivate
.setAdapterState = function(adapterState
, callback
) {};
8066 * @param {!chrome.bluetoothPrivate.SetPairingResponseOptions} options
8067 * @param {function()} callback
8069 chrome
.bluetoothPrivate
.setPairingResponse = function(options
, callback
) {};
8074 * Event whose listeners take a PairingEvent parameter.
8077 chrome
.bluetoothPrivate
.PairingEventEvent = function() {};
8080 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8081 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.addListener
=
8082 function(callback
) {};
8085 /** @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback */
8086 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.removeListener
=
8087 function(callback
) {};
8091 * @param {function(!chrome.bluetoothPrivate.PairingEvent): void} callback
8094 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListener
=
8095 function(callback
) {};
8098 /** @return {boolean} */
8099 chrome
.bluetoothPrivate
.PairingEventEvent
.prototype.hasListeners
=
8103 /** @type {!chrome.bluetoothPrivate.PairingEventEvent} */
8104 chrome
.bluetoothPrivate
.onPairing
;