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

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

Issue 512003002: Revert of Revert "Typecheck JS files for chrome://extensions" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/extension_list.js
diff --git a/chrome/browser/resources/extensions/extension_list.js b/chrome/browser/resources/extensions/extension_list.js
index ecea6c1cc73d6f0ba11b7cf305d61576a9c29355..f7e0b083cdb589534785a25c90fa35d19807a5db 100644
--- a/chrome/browser/resources/extensions/extension_list.js
+++ b/chrome/browser/resources/extensions/extension_list.js
@@ -3,6 +3,60 @@
// found in the LICENSE file.
<include src="extension_error.js">
+
+/**
+ * The type of the extension data object. The definition is based on
+ * chrome/browser/ui/webui/extensions/extension_basic_info.cc
+ * and
+ * chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+ * ExtensionSettingsHandler::CreateExtensionDetailValue()
+ * @typedef {{allow_reload: boolean,
+ * allowAllUrls: boolean,
+ * allowFileAccess: boolean,
+ * blacklistText: string,
+ * corruptInstall: boolean,
+ * dependentExtensions: Array,
+ * description: string,
+ * detailsUrl: string,
+ * enable_show_button: boolean,
+ * enabled: boolean,
+ * enabledIncognito: boolean,
+ * errorCollectionEnabled: (boolean|undefined),
+ * hasPopupAction: boolean,
+ * homepageProvided: boolean,
+ * homepageUrl: string,
+ * icon: string,
+ * id: string,
+ * incognitoCanBeEnabled: boolean,
+ * installWarnings: (Array|undefined),
+ * is_hosted_app: boolean,
+ * is_platform_app: boolean,
+ * isUnpacked: boolean,
+ * kioskEnabled: boolean,
+ * kioskOnly: boolean,
+ * locationText: string,
+ * managedInstall: boolean,
+ * manifestErrors: (Array.<RuntimeError>|undefined),
+ * name: string,
+ * offlineEnabled: boolean,
+ * optionsUrl: string,
+ * order: number,
+ * packagedApp: boolean,
+ * path: (string|undefined),
+ * prettifiedPath: (string|undefined),
+ * runtimeErrors: (Array.<RuntimeError>|undefined),
+ * suspiciousInstall: boolean,
+ * terminated: boolean,
+ * version: string,
+ * views: Array.<{renderViewId: number, renderProcessId: number,
+ * path: string, incognito: boolean,
+ * generatedBackgroundPage: boolean}>,
+ * wantsAllUrls: boolean,
+ * wantsErrorCollection: boolean,
+ * wantsFileAccess: boolean,
+ * warnings: (Array|undefined)}}
+ */
+var ExtensionData;
cr.define('options', function() {
'use strict';
@@ -11,7 +65,7 @@
* Creates a new list of extensions.
* @param {Object=} opt_propertyBag Optional properties.
* @constructor
- * @extends {cr.ui.div}
+ * @extends {HTMLDivElement}
*/
var ExtensionsList = cr.ui.define('div');
@@ -23,7 +77,7 @@
var butterBarVisibility = {};
/**
- * @type {Object.<string, string>} A map from extension id to last reloaded
+ * @type {Object.<string, number>} A map from extension id to last reloaded
* timestamp. The timestamp is recorded when the user click the 'Reload'
* link. It is used to refresh the icon of an unpacked extension.
* This persists between calls to decorate.
@@ -98,7 +152,7 @@
/**
* Synthesizes and initializes an HTML element for the extension metadata
* given in |extension|.
- * @param {Object} extension A dictionary of extension metadata.
+ * @param {ExtensionData} extension A dictionary of extension metadata.
* @private
*/
createNode_: function(extension) {
@@ -433,7 +487,7 @@
// Scroll beneath the fixed header so that the extension is not
// obscured.
var topScroll = node.offsetTop - $('page-header').offsetHeight;
- var pad = parseInt(getComputedStyle(node, null).marginTop, 10);
+ var pad = parseInt(window.getComputedStyle(node, null).marginTop, 10);
if (!isNaN(pad))
topScroll -= pad / 2;
setScrollTopForDocument(document, topScroll);

Powered by Google App Engine
This is Rietveld 408576698