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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 extension.isFromStore; | 427 extension.isFromStore; |
427 this.updateVisibility_(node, '.corrupted-repair-button', canRepair); | 428 this.updateVisibility_(node, '.corrupted-repair-button', canRepair); |
428 | 429 |
429 // The 'Enabled' checkbox. | 430 // The 'Enabled' checkbox. |
430 var isOK = !isTerminated && !canRepair; | 431 var isOK = !isTerminated && !canRepair; |
431 this.updateVisibility_(node, '.enable-checkbox', isOK, function(item) { | 432 this.updateVisibility_(node, '.enable-checkbox', isOK, function(item) { |
432 var enableCheckboxDisabled = extension.managedInstall || | 433 var enableCheckboxDisabled = extension.managedInstall || |
433 extension.suspiciousInstall || | 434 extension.suspiciousInstall || |
434 extension.corruptInstall || | 435 extension.corruptInstall || |
435 extension.updateRequiredByPolicy || | 436 extension.updateRequiredByPolicy || |
| 437 extension.installedByCustodian || |
436 extension.dependentExtensions.length > 0; | 438 extension.dependentExtensions.length > 0; |
437 item.querySelector('input').disabled = enableCheckboxDisabled; | 439 item.querySelector('input').disabled = enableCheckboxDisabled; |
438 item.querySelector('input').checked = extension.enabled; | 440 item.querySelector('input').checked = extension.enabled; |
439 }); | 441 }); |
440 | 442 |
441 // Button for extensions controlled by policy. | 443 // Button for extensions controlled by policy. |
442 var controlNode = node.querySelector('.enable-controls'); | 444 var controlNode = node.querySelector('.enable-controls'); |
443 var indicator = | 445 var indicator = |
444 controlNode.querySelector('.controlled-extension-indicator'); | 446 controlNode.querySelector('.controlled-extension-indicator'); |
445 var needsIndicator = isOK && extension.managedInstall; | 447 var needsIndicator = isOK && extension.managedInstall; |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // TODO(dbeam): why do we need to focus <extensionoptions> before and | 701 // TODO(dbeam): why do we need to focus <extensionoptions> before and |
700 // after its showing animation? Makes very little sense to me. | 702 // after its showing animation? Makes very little sense to me. |
701 overlay.setInitialFocus(); | 703 overlay.setInitialFocus(); |
702 }, | 704 }, |
703 }; | 705 }; |
704 | 706 |
705 return { | 707 return { |
706 ExtensionsList: ExtensionsList | 708 ExtensionsList: ExtensionsList |
707 }; | 709 }; |
708 }); | 710 }); |
OLD | NEW |