OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 <include src="extension_error.js"> | 5 <include src="extension_error.js"> |
6 | 6 |
7 /** | 7 /** |
8 * The type of the extension data object. The definition is based on | 8 * The type of the extension data object. The definition is based on |
9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc | 9 * chrome/browser/ui/webui/extensions/extension_basic_info.cc |
10 * and | 10 * and |
(...skipping 11 matching lines...) Expand all Loading... | |
22 * enable_show_button: boolean, | 22 * enable_show_button: boolean, |
23 * enabled: boolean, | 23 * enabled: boolean, |
24 * enabledIncognito: boolean, | 24 * enabledIncognito: boolean, |
25 * errorCollectionEnabled: (boolean|undefined), | 25 * errorCollectionEnabled: (boolean|undefined), |
26 * hasPopupAction: boolean, | 26 * hasPopupAction: boolean, |
27 * homepageProvided: boolean, | 27 * homepageProvided: boolean, |
28 * homepageUrl: string, | 28 * homepageUrl: string, |
29 * icon: string, | 29 * icon: string, |
30 * id: string, | 30 * id: string, |
31 * incognitoCanBeEnabled: boolean, | 31 * incognitoCanBeEnabled: boolean, |
32 * installedByCustodian: boolean, | |
32 * installWarnings: (Array|undefined), | 33 * installWarnings: (Array|undefined), |
33 * is_hosted_app: boolean, | 34 * is_hosted_app: boolean, |
34 * is_platform_app: boolean, | 35 * is_platform_app: boolean, |
35 * isFromStore: boolean, | 36 * isFromStore: boolean, |
36 * isUnpacked: boolean, | 37 * isUnpacked: boolean, |
37 * kioskEnabled: boolean, | 38 * kioskEnabled: boolean, |
38 * kioskOnly: boolean, | 39 * kioskOnly: boolean, |
39 * locationText: string, | 40 * locationText: string, |
40 * managedInstall: boolean, | 41 * managedInstall: boolean, |
41 * manifestErrors: (Array.<RuntimeError>|undefined), | 42 * manifestErrors: (Array.<RuntimeError>|undefined), |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 } else if (extension.corruptInstall && extension.isFromStore) { | 350 } else if (extension.corruptInstall && extension.isFromStore) { |
350 var repair = node.querySelector('.corrupted-repair-button'); | 351 var repair = node.querySelector('.corrupted-repair-button'); |
351 repair.hidden = false; | 352 repair.hidden = false; |
352 repair.onclick = function() { | 353 repair.onclick = function() { |
353 chrome.send('extensionSettingsRepair', [extension.id]); | 354 chrome.send('extensionSettingsRepair', [extension.id]); |
354 }; | 355 }; |
355 } else { | 356 } else { |
356 // The 'Enabled' checkbox. | 357 // The 'Enabled' checkbox. |
357 var enable = node.querySelector('.enable-checkbox'); | 358 var enable = node.querySelector('.enable-checkbox'); |
358 enable.hidden = false; | 359 enable.hidden = false; |
359 var enableCheckboxDisabled = extension.managedInstall || | 360 var enableCheckboxDisabled = extension.managedInstall || |
Pam (message me for reviews)
2015/02/23 10:18:50
Maintainability = ick. Can we get most of this fro
Marc Treib
2015/02/23 12:07:38
Agreed re maintainability, but I don't see a bette
| |
360 extension.suspiciousInstall || | 361 extension.suspiciousInstall || |
361 extension.corruptInstall || | 362 extension.corruptInstall || |
362 extension.updateRequiredByPolicy || | 363 extension.updateRequiredByPolicy || |
364 extension.installedByCustodian || | |
363 extension.dependentExtensions.length > 0; | 365 extension.dependentExtensions.length > 0; |
364 enable.querySelector('input').disabled = enableCheckboxDisabled; | 366 enable.querySelector('input').disabled = enableCheckboxDisabled; |
365 | 367 |
366 if (extension.managedInstall) { | 368 if (extension.managedInstall) { |
367 var indicator = new cr.ui.ControlledIndicator(); | 369 var indicator = new cr.ui.ControlledIndicator(); |
368 indicator.classList.add('controlled-extension-indicator'); | 370 indicator.classList.add('controlled-extension-indicator'); |
369 indicator.setAttribute('controlled-by', 'policy'); | 371 indicator.setAttribute('controlled-by', 'policy'); |
370 var textPolicy = extension.policyText || ''; | 372 var textPolicy = extension.policyText || ''; |
371 indicator.setAttribute('textpolicy', textPolicy); | 373 indicator.setAttribute('textpolicy', textPolicy); |
372 indicator.image.setAttribute('aria-label', textPolicy); | 374 indicator.image.setAttribute('aria-label', textPolicy); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
591 // TODO(dbeam): why do we need to focus <extensionoptions> before and | 593 // TODO(dbeam): why do we need to focus <extensionoptions> before and |
592 // after its showing animation? Makes very little sense to me. | 594 // after its showing animation? Makes very little sense to me. |
593 overlay.setInitialFocus(); | 595 overlay.setInitialFocus(); |
594 }, | 596 }, |
595 }; | 597 }; |
596 | 598 |
597 return { | 599 return { |
598 ExtensionsList: ExtensionsList | 600 ExtensionsList: ExtensionsList |
599 }; | 601 }; |
600 }); | 602 }); |
OLD | NEW |