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"></include> | 5 <include src="extension_error.js"></include> |
6 | 6 |
7 cr.define('options', function() { | 7 cr.define('options', function() { |
8 'use strict'; | 8 'use strict'; |
9 | 9 |
10 /** | 10 /** |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 var checked = e.target.checked; | 141 var checked = e.target.checked; |
142 butterBarVisibility[extension.id] = checked; | 142 butterBarVisibility[extension.id] = checked; |
143 butterBar.hidden = !checked || extension.is_hosted_app; | 143 butterBar.hidden = !checked || extension.is_hosted_app; |
144 chrome.send('extensionSettingsEnableIncognito', | 144 chrome.send('extensionSettingsEnableIncognito', |
145 [extension.id, String(checked)]); | 145 [extension.id, String(checked)]); |
146 }); | 146 }); |
147 } | 147 } |
148 var butterBar = node.querySelector('.butter-bar'); | 148 var butterBar = node.querySelector('.butter-bar'); |
149 butterBar.hidden = !butterBarVisibility[extension.id]; | 149 butterBar.hidden = !butterBarVisibility[extension.id]; |
150 | 150 |
| 151 // The 'collect errors' checkbox. |
| 152 var errorCollection = |
| 153 node.querySelector('.error-collection-control input'); |
| 154 errorCollection.checked = extension.errorCollectionEnabled; |
| 155 errorCollection.addEventListener('change', function(e) { |
| 156 chrome.send('extensionSettingsEnableErrorCollection', |
| 157 [extension.id, String(e.target.checked)]); |
| 158 }); |
| 159 |
151 // The 'allow file:// access' checkbox. | 160 // The 'allow file:// access' checkbox. |
152 if (extension.wantsFileAccess) { | 161 if (extension.wantsFileAccess) { |
153 var fileAccess = node.querySelector('.file-access-control'); | 162 var fileAccess = node.querySelector('.file-access-control'); |
154 fileAccess.addEventListener('click', function(e) { | 163 fileAccess.addEventListener('click', function(e) { |
155 chrome.send('extensionSettingsAllowFileAccess', | 164 chrome.send('extensionSettingsAllowFileAccess', |
156 [extension.id, String(e.target.checked)]); | 165 [extension.id, String(e.target.checked)]); |
157 }); | 166 }); |
158 fileAccess.querySelector('input').checked = extension.allowFileAccess; | 167 fileAccess.querySelector('input').checked = extension.allowFileAccess; |
159 fileAccess.hidden = false; | 168 fileAccess.hidden = false; |
160 } | 169 } |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 topScroll -= pad / 2; | 360 topScroll -= pad / 2; |
352 setScrollTopForDocument(document, topScroll); | 361 setScrollTopForDocument(document, topScroll); |
353 } | 362 } |
354 }, | 363 }, |
355 }; | 364 }; |
356 | 365 |
357 return { | 366 return { |
358 ExtensionsList: ExtensionsList | 367 ExtensionsList: ExtensionsList |
359 }; | 368 }; |
360 }); | 369 }); |
OLD | NEW |