Define a WebrequestEventInterface interface to be used by chrome.webRequest and new externs to be defined for the <webview> tag elsewhere.
@@ -6697,53 +6697,63 @@ WebRequestOnErrorOccurredEvent.prototype.hasListeners = function(listener) {};
/**
- * @const
+ * WebRequestEventInterface specifies the interface shared between
+ * chrome.webrequest (defined below) and HTMLWebviewElement.request defined
+ * in the cros_apps.js externs.
+ * @interface
* @see https://developer.chrome.com/extensions/webRequest
*/
-chrome.webRequest = {};
-
-
-/**
- * @param {function(): void=} opt_callback Callback function.
- * @return {undefined}
- */
-chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
+function WebRequestEventInterface() {};
/** @type {!WebRequestOnAuthRequiredEvent} */
-chrome.webRequest.onAuthRequired;
+WebRequestEventInterface.prototype.onAuthRequired;
/** @type {!WebRequestEvent} */
-chrome.webRequest.onBeforeRedirect;
+WebRequestEventInterface.prototype.onBeforeRedirect;
/** @type {!WebRequestOptionallySynchronousEvent} */
-chrome.webRequest.onBeforeRequest;
+WebRequestEventInterface.prototype.onBeforeRequest;
/** @type {!WebRequestOptionallySynchronousEvent} */
-chrome.webRequest.onBeforeSendHeaders;
+WebRequestEventInterface.prototype.onBeforeSendHeaders;
/** @type {!WebRequestEvent} */
-chrome.webRequest.onCompleted;
+WebRequestEventInterface.prototype.onCompleted;
/** @type {!WebRequestOnErrorOccurredEvent} */
-chrome.webRequest.onErrorOccurred;
+WebRequestEventInterface.prototype.onErrorOccurred;
/** @type {!WebRequestOptionallySynchronousEvent} */
-chrome.webRequest.onHeadersReceived;
+WebRequestEventInterface.prototype.onHeadersReceived;
/** @type {!WebRequestEvent} */
-chrome.webRequest.onResponseStarted;
+WebRequestEventInterface.prototype.onResponseStarted;
/** @type {!WebRequestEvent} */
-chrome.webRequest.onSendHeaders;
+WebRequestEventInterface.prototype.onSendHeaders;
+
+
+/**
+ * @type {!WebRequestEventInterface}
+ * @see https://developer.chrome.com/extensions/webRequest
+ */
+chrome.webRequest;
+
+
+/**
+ * @param {function(): void=} opt_callback Callback function.
+ * @return {undefined}
+ */
+chrome.webRequest.handlerBehaviorChanged = function(opt_callback) {};
// Classes
