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 d5b19d5488b1258ff20fca4be676bcfc844e9aa5..7a58921b984eee4deb33b545632c6cbc7fe959ff 100644 |
--- a/third_party/closure_compiler/externs/chrome_extensions.js |
+++ b/third_party/closure_compiler/externs/chrome_extensions.js |
@@ -189,6 +189,18 @@ |
*/ |
+/* |
+ * Ensure projects don't execute this file. |
+ * The throw is to catch executions of this file, however, without the guard, |
+ * the compiler's flow analysis stops at the throw, even for an externs file. |
+ * Therefore, the Math.random() guard fools the compiler during externs |
+ * processing. |
+ */ |
+if (Math.random() < 1) { // always true but the compiler doesn't know that |
+ throw 'Externs file "chrome_extensions.js" should not be executed'; |
+} |
+ |
+ |
/** |
* @see https://developer.chrome.com/extensions/accessibilityFeatures |
* @const |
@@ -2084,6 +2096,11 @@ chrome.runtime.id; |
chrome.runtime.getBackgroundPage = function(callback) {}; |
+/** |
+ * @param {function(): void=} opt_callback Callback function. |
+ */ |
+chrome.runtime.openOptionsPage = function(opt_callback) {}; |
+ |
/** |
* Manifest information returned from chrome.runtime.getManifest. See |
@@ -8949,6 +8966,10 @@ chrome.networkingPrivate.onNetworksChanged; |
chrome.networkingPrivate.onNetworkListChanged; |
+/** @type {!ChromeStringArrayEvent} */ |
+chrome.networkingPrivate.onDeviceStateListChanged; |
+ |
+ |
/** @type {!ChromeStringStringEvent} */ |
chrome.networkingPrivate.onPortalDetectionCompleted; |