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

Unified Diff: chrome/browser/resources/extensions/extensions.js

Issue 475633006: Typecheck JS files for chrome://extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@D_asserts_codingconvention
Patch Set: looked twice Created 6 years, 4 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: chrome/browser/resources/extensions/extensions.js
diff --git a/chrome/browser/resources/extensions/extensions.js b/chrome/browser/resources/extensions/extensions.js
index e678099970f4f6060fe2797a9e1d0c8022b1bb63..7b5e42900cc830613c88c470462e6c7a38a71ee5 100644
--- a/chrome/browser/resources/extensions/extensions.js
+++ b/chrome/browser/resources/extensions/extensions.js
@@ -15,6 +15,19 @@
<include src="chromeos/kiosk_apps.js">
</if>
+/**
+ * The type of the extension data object. The definition is based on
+ * chrome/browser/ui/webui/extensions/extension_settings_handler.cc:
+ * ExtensionSettingsHandler::HandleRequestExtensionsData()
+ * @typedef {{developerMode: boolean,
+ * extensions: Array,
+ * incognitoAvailable: boolean,
+ * loadUnpackedDisabled: boolean,
+ * profileIsSupervised: boolean,
+ * promoteAppsDevTools: boolean}}
+ */
+var BackendExtensionsDataObject;
Dan Beam 2014/08/21 18:27:48 ExtensionRequest
Vitaly Pavlenko 2014/08/22 01:43:40 Done.
+
// Used for observing function of the backend datasource for this page by
// tests.
var webuiResponded = false;
@@ -255,7 +268,7 @@ cr.define('extensions', function() {
} else {
$('extension-settings').classList.remove('dev-mode');
}
- window.setTimeout(this.updatePromoVisibility_.bind(this));
+ window.setTimeout(this.updatePromoVisibility_.bind(this), 0);
chrome.send('extensionSettingsToggleDeveloperMode');
},
@@ -276,6 +289,7 @@ cr.define('extensions', function() {
/**
* Called by the dom_ui_ to re-populate the page with data representing
* the current state of installed extensions.
+ * @param {BackendExtensionsDataObject} extensionsData
*/
ExtensionSettings.returnExtensionsData = function(extensionsData) {
// We can get called many times in short order, thus we need to
@@ -399,7 +413,7 @@ cr.define('extensions', function() {
pages[i].setAttribute('aria-hidden', node ? 'true' : 'false');
}
- overlay.hidden = !node;
+ $('overlay').hidden = !node;
uber.invokeMethodOnParent(node ? 'beginInterceptingEvents' :
'stopInterceptingEvents');
};

Powered by Google App Engine
This is Rietveld 408576698