Chromium Code Reviews| 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 1271b28de19ca8a14fa504ed02fdbd347d26d167..cde146c2840b8bc60fc619d523053f02cb8ccb5f 100644 |
| --- a/chrome/browser/resources/extensions/extension_list.js |
| +++ b/chrome/browser/resources/extensions/extension_list.js |
| @@ -4,6 +4,60 @@ |
| <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.<BackendExtensionErrorObject>|undefined), |
| + * name: string, |
| + * offlineEnabled: boolean, |
| + * optionsUrl: string, |
| + * order: number, |
| + * packagedApp: boolean, |
| + * path: (string|undefined), |
| + * prettifiedPath: (string|undefined), |
| + * runtimeErrors: (Array.<BackendExtensionErrorObject>|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 BackendExtensionDataObject; |
|
Dan Beam
2014/08/21 18:27:48
ExtensionData or ExtensionInfo
Vitaly Pavlenko
2014/08/22 01:43:40
Done.
|
| + |
| cr.define('options', function() { |
| 'use strict'; |
| @@ -11,7 +65,7 @@ cr.define('options', function() { |
| * 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'); |
| @@ -73,7 +127,8 @@ cr.define('options', function() { |
| /** |
| * Synthesizes and initializes an HTML element for the extension metadata |
| * given in |extension|. |
| - * @param {Object} extension A dictionary of extension metadata. |
| + * @param {BackendExtensionDataObject} extension A dictionary of extension |
| + * metadata. |
| * @private |
| */ |
| createNode_: function(extension) { |
| @@ -221,7 +276,7 @@ cr.define('options', function() { |
| var reload = node.querySelector('.reload-link'); |
| reload.addEventListener('click', function(e) { |
| chrome.send('extensionSettingsReload', [extension.id]); |
| - extensionReloadedTimestamp[extension.id] = Date.now(); |
| + extensionReloadedTimestamp[extension.id] = String(Date.now()); |
|
Dan Beam
2014/08/21 18:27:47
why do you need this?
Vitaly Pavlenko
2014/08/22 01:43:40
Don't need actually, removed. I also fixed the typ
Dan Beam
2014/08/22 21:57:13
i assume you mean the other way around
|
| }); |
| reload.hidden = false; |
| @@ -404,7 +459,7 @@ cr.define('options', function() { |
| // 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); |