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