Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Unified Diff: third_party/closure_compiler/externs/chrome_extensions.js

Issue 2753443007: Roll closure compiler (Closed)
Patch Set: roll compiler Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/closure_compiler/externs/chrome_extensions.js
diff --git a/third_party/closure_compiler/externs/chrome_extensions.js b/third_party/closure_compiler/externs/chrome_extensions.js
index ac0cd611d8bf415497619f6ffd31f839b6897000..7088c14d36b2d520f336056ae49e014a611a5f92 100644
--- a/third_party/closure_compiler/externs/chrome_extensions.js
+++ b/third_party/closure_compiler/externs/chrome_extensions.js
@@ -2559,7 +2559,7 @@ chrome.runtime.MessageSenderEvent.prototype.hasListeners = function() {};
/**
* @const
- * @see https://developer.chrome.com/extensions/tabs.html
+ * @see https://developer.chrome.com/extensions/tabs
*/
chrome.tabs = {};
@@ -2770,7 +2770,11 @@ chrome.tabs.move = function(tabId, moveProperties, opt_callback) {};
* @typedef {?{
* active: (boolean|undefined),
* pinned: (boolean|undefined),
+ * audible: (boolean|undefined),
+ * muted: (boolean|undefined),
* highlighted: (boolean|undefined),
+ * discarded: (boolean|undefined),
+ * autoDiscardable: (boolean|undefined),
* currentWindow: (boolean|undefined),
* lastFocusedWindow: (boolean|undefined),
* status: (!chrome.tabs.TabStatus|string|undefined),
@@ -6028,18 +6032,17 @@ chrome.webNavigation.onHistoryStateUpdated;
/**
* Most event listeners for WebRequest take extra arguments.
- * @see https://developer.chrome.com/extensions/webRequest.html.
+ * @see https://developer.chrome.com/extensions/webRequest
* @constructor
*/
function WebRequestEvent() {}
/**
- * @param {function(!Object): (void|!BlockingResponse)} listener Listener
- * function.
+ * @param {function(!Object): void} listener Listener function.
* @param {!RequestFilter} filter A set of filters that restrict
* the events that will be sent to this listener.
- * @param {Array<string>=} opt_extraInfoSpec Array of extra information
+ * @param {!Array<string>=} opt_extraInfoSpec Array of extra information
* that should be passed to the listener function.
* @return {undefined}
*/
@@ -6048,33 +6051,123 @@ WebRequestEvent.prototype.addListener =
/**
- * @param {function(!Object): (void|!BlockingResponse)} listener Listener
- * function.
+ * @param {function(!Object): void} listener Listener function.
* @return {undefined}
*/
WebRequestEvent.prototype.removeListener = function(listener) {};
/**
- * @param {function(!Object): (void|!BlockingResponse)} listener Listener
- * function.
+ * @param {function(!Object): void} listener Listener function.
* @return {undefined}
*/
WebRequestEvent.prototype.hasListener = function(listener) {};
/**
- * @param {function(!Object): (void|!BlockingResponse)} listener Listener
- * function.
+ * @param {function(!Object): void} listener Listener function.
* @return {undefined}
*/
WebRequestEvent.prototype.hasListeners = function(listener) {};
+/**
+ * Some event listeners can be optionally synchronous.
+ * @see https://developer.chrome.com/extensions/webRequest
+ * @constructor
+ */
+function WebRequestOptionallySynchronousEvent() {}
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @param {!RequestFilter} filter A set of filters that restrict
+ * the events that will be sent to this listener.
+ * @param {!Array<string>=} opt_extraInfoSpec Array of extra information
+ * that should be passed to the listener function.
+ * @return {undefined}
+ */
+WebRequestOptionallySynchronousEvent.prototype.addListener = function(
+ listener, filter, opt_extraInfoSpec) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOptionallySynchronousEvent.prototype.removeListener = function(
+ listener) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOptionallySynchronousEvent.prototype.hasListener = function(
+ listener) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOptionallySynchronousEvent.prototype.hasListeners = function(
+ listener) {};
+
+
+/**
+ * The onAuthRequired event listener can be optionally synchronous, and can also
+ * optionally take a callback.
+ * @see https://developer.chrome.com/extensions/webRequest
+ * @constructor
+ */
+function WebRequestOnAuthRequiredEvent() {}
+
+
+/**
+ * @param {function(!Object, function(!BlockingResponse)=):
+ * (undefined|!BlockingResponse)} listener Listener function.
+ * @param {!RequestFilter} filter A set of filters that restrict
+ * the events that will be sent to this listener.
+ * @param {!Array<string>=} opt_extraInfoSpec Array of extra information
+ * that should be passed to the listener function.
+ * @return {undefined}
+ */
+WebRequestOnAuthRequiredEvent.prototype.addListener = function(
+ listener, filter, opt_extraInfoSpec) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOnAuthRequiredEvent.prototype.removeListener = function(listener) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOnAuthRequiredEvent.prototype.hasListener = function(listener) {};
+
+
+/**
+ * @param {function(!Object): (undefined|!BlockingResponse)} listener Listener
+ * function.
+ * @return {undefined}
+ */
+WebRequestOnAuthRequiredEvent.prototype.hasListeners = function(listener) {};
+
/**
- * The onErrorOccurred event takes one less parameter than the others.
- * @see https://developer.chrome.com/extensions/webRequest.html.
+ * The onErrorOccurred event takes one fewer parameter than the others.
+ * @see https://developer.chrome.com/extensions/webRequest
* @constructor
*/
function WebRequestOnErrorOccurredEvent() {}
@@ -6113,7 +6206,7 @@ WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
/**
* @const
- * @see https://developer.chrome.com/extensions/webRequest.html
+ * @see https://developer.chrome.com/extensions/webRequest
*/
chrome.webRequest = {};
@@ -6125,7 +6218,7 @@ chrome.webRequest = {};
chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
-/** @type {!WebRequestEvent} */
+/** @type {!WebRequestOnAuthRequiredEvent} */
chrome.webRequest.onAuthRequired;
@@ -6133,11 +6226,11 @@ chrome.webRequest.onAuthRequired;
chrome.webRequest.onBeforeRedirect;
-/** @type {!WebRequestEvent} */
+/** @type {!WebRequestOptionallySynchronousEvent} */
chrome.webRequest.onBeforeRequest;
-/** @type {!WebRequestEvent} */
+/** @type {!WebRequestOptionallySynchronousEvent} */
chrome.webRequest.onBeforeSendHeaders;
@@ -6149,7 +6242,7 @@ chrome.webRequest.onCompleted;
chrome.webRequest.onErrorOccurred;
-/** @type {!WebRequestEvent} */
+/** @type {!WebRequestOptionallySynchronousEvent} */
chrome.webRequest.onHeadersReceived;
@@ -7034,82 +7127,49 @@ ChromeSetting.prototype.onChange;
/**
- * @see https://developer.chrome.com/extensions/webRequest.html#type-RequestFilter
- * @constructor
+ * @see https://developer.chrome.com/extensions/webRequest#type-RequestFilter
+ * @typedef {?{
+ * urls: !Array<string>,
+ * types: (!Array<string>|undefined),
+ * tabId: (number|undefined),
+ * windowId: (number|undefined),
+ * }}
*/
-function RequestFilter() {}
-
-
-/** @type {!Array<string>} */
-RequestFilter.prototype.urls;
-
-
-/** @type {!Array<string>} */
-RequestFilter.prototype.types;
-
-
-/** @type {number} */
-RequestFilter.prototype.tabId;
-
-
-/** @type {number} */
-RequestFilter.prototype.windowId;
+var RequestFilter;
/**
- * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
- * @constructor
+ * @see https://developer.chrome.com/extensions/webRequest#type-HttpHeaders
+ * @typedef {?{
+ * name: string,
+ * value: (string|undefined),
+ * binaryValue: (!Array<number>|undefined),
+ * }}
*/
-function HttpHeader() {}
-
-
-/** @type {string} */
-HttpHeader.prototype.name;
-
-
-/** @type {string} */
-HttpHeader.prototype.value;
-
+var HttpHeader;
-/** @type {!Array<number>} */
-HttpHeader.prototype.binaryValue;
/**
- * @see https://developer.chrome.com/extensions/webRequest.html#type-HttpHeaders
- * @typedef {Array<!HttpHeader>}
- * @private
+ * @see https://developer.chrome.com/extensions/webRequest#type-HttpHeaders
+ * @typedef {?Array<!HttpHeader>}
*/
-var HttpHeaders_;
+chrome.webRequest.HttpHeaders;
/**
- * @see https://developer.chrome.com/extensions/webRequest.html#type-BlockingResponse
- * @constructor
+ * @see https://developer.chrome.com/extensions/webRequest#type-BlockingResponse
+ * @typedef {?{
+ * cancel: (boolean|undefined),
+ * redirectUrl: (string|undefined),
+ * requestHeaders: (!chrome.webRequest.HttpHeaders|undefined),
+ * responseHeaders: (!chrome.webRequest.HttpHeaders|undefined),
+ * authCredentials: (!{username: string, password: string}|undefined),
+ * }}
*/
-function BlockingResponse() {}
-
-
-/** @type {boolean} */
-BlockingResponse.prototype.cancel;
-
-
-/** @type {string} */
-BlockingResponse.prototype.redirectUrl;
-
-
-/** @type {!HttpHeaders_} */
-BlockingResponse.prototype.requestHeaders;
-
-
-/** @type {!HttpHeaders_} */
-BlockingResponse.prototype.responseHeaders;
-
-
-/** @type {Object<string,string>} */
-BlockingResponse.prototype.authCredentials;
+var BlockingResponse;
@@ -9980,6 +10040,13 @@ chrome.bluetoothPrivate.setPairingResponse = function(options, callback) {};
/**
* @param {string} deviceAddress
* @param {function():void=} callback
+ */
+chrome.bluetoothPrivate.disconnectAll = function(deviceAddress, callback) {};
+
+
+/**
+ * @param {string} deviceAddress
+ * @param {function():void=} callback
* @return {undefined}
*/
chrome.bluetoothPrivate.forgetDevice = function(deviceAddress, callback) {};
« no previous file with comments | « third_party/closure_compiler/compiler/compiler.jar ('k') | third_party/closure_compiler/externs/web_animations.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698