OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 cr.define('extensions', function() { | 5 cr.define('extensions', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 var DetailView = Polymer({ | 8 var DetailView = Polymer({ |
9 is: 'extensions-detail-view', | 9 is: 'extensions-detail-view', |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 /** @private */ | 33 /** @private */ |
34 onCloseButtonTap_: function() { | 34 onCloseButtonTap_: function() { |
35 this.fire('close'); | 35 this.fire('close'); |
36 }, | 36 }, |
37 | 37 |
38 /** | 38 /** |
39 * @return {boolean} | 39 * @return {boolean} |
40 * @private | 40 * @private |
41 */ | 41 */ |
42 isEnabled_: function() { return extensions.isEnabled(this.data.state); }, | 42 isEnabled_: function() { |
| 43 return extensions.isEnabled(this.data.state); |
| 44 }, |
43 | 45 |
44 /** | 46 /** |
45 * @return {boolean} | 47 * @return {boolean} |
46 * @private | 48 * @private |
47 */ | 49 */ |
48 isEnableToggleEnabled_: function() { | 50 isEnableToggleEnabled_: function() { |
49 return extensions.userCanChangeEnablement(this.data); | 51 return extensions.userCanChangeEnablement(this.data); |
50 }, | 52 }, |
51 | 53 |
52 /** | 54 /** |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 shouldShowOptionsLink_: function() { | 104 shouldShowOptionsLink_: function() { |
103 return !!this.data.optionsPage; | 105 return !!this.data.optionsPage; |
104 }, | 106 }, |
105 | 107 |
106 /** | 108 /** |
107 * @return {boolean} | 109 * @return {boolean} |
108 * @private | 110 * @private |
109 */ | 111 */ |
110 shouldShowOptionsSection_: function() { | 112 shouldShowOptionsSection_: function() { |
111 return this.data.incognitoAccess.isEnabled || | 113 return this.data.incognitoAccess.isEnabled || |
112 this.data.fileAccess.isEnabled || | 114 this.data.fileAccess.isEnabled || this.data.runOnAllUrls.isEnabled || |
113 this.data.runOnAllUrls.isEnabled || | 115 this.data.errorCollection.isEnabled; |
114 this.data.errorCollection.isEnabled; | |
115 }, | 116 }, |
116 | 117 |
117 /** @private */ | 118 /** @private */ |
118 onEnableChange_: function() { | 119 onEnableChange_: function() { |
119 this.delegate.setItemEnabled(this.data.id, | 120 this.delegate.setItemEnabled( |
120 this.$['enable-toggle'].checked); | 121 this.data.id, this.$['enable-toggle'].checked); |
121 }, | 122 }, |
122 | 123 |
123 /** | 124 /** |
124 * @param {!{model: !{item: !chrome.developerPrivate.ExtensionView}}} e | 125 * @param {!{model: !{item: !chrome.developerPrivate.ExtensionView}}} e |
125 * @private | 126 * @private |
126 */ | 127 */ |
127 onInspectTap_: function(e) { | 128 onInspectTap_: function(e) { |
128 this.delegate.inspectItemView(this.data.id, e.model.item); | 129 this.delegate.inspectItemView(this.data.id, e.model.item); |
129 }, | 130 }, |
130 | 131 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 173 |
173 /** @private */ | 174 /** @private */ |
174 computeSourceString_: function() { | 175 computeSourceString_: function() { |
175 return extensions.getItemSourceString( | 176 return extensions.getItemSourceString( |
176 extensions.getItemSource(this.data)); | 177 extensions.getItemSource(this.data)); |
177 } | 178 } |
178 }); | 179 }); |
179 | 180 |
180 return {DetailView: DetailView}; | 181 return {DetailView: DetailView}; |
181 }); | 182 }); |
OLD | NEW |