Chromium Code Reviews| 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. This should only be visible if the | |
| 152 // error console is enabled - we can detect this by the existence of the | |
| 153 // |errorCollectionEnabled| property. | |
| 154 var errorCollectionEnabled = extension.errorCollectionEnabled; | |
| 155 if (errorCollectionEnabled !== undefined) { | |
|
not at google - send to devlin
2014/04/16 21:28:31
this seems a bit fragile, all it takes is a subtle
Devlin
2014/04/16 22:50:41
Passed a flag, but, per in-person conversation, no
not at google - send to devlin
2014/04/16 23:22:07
wantsErrorCollection vs errorCollectionEnabled sur
Devlin
2014/04/16 23:58:22
Yeah, chose it because it mirrors "wantsFileAccess
| |
| 156 node.querySelector('.error-collection-control').hidden = false; | |
| 157 var errorCollection = | |
| 158 node.querySelector('.error-collection-control input'); | |
| 159 errorCollection.checked = errorCollectionEnabled; | |
| 160 errorCollection.addEventListener('change', function(e) { | |
| 161 chrome.send('extensionSettingsEnableErrorCollection', | |
| 162 [extension.id, String(e.target.checked)]); | |
|
not at google - send to devlin
2014/04/16 21:28:31
weird that we're converting these to strings to pa
Devlin
2014/04/16 22:50:41
Yeah, I thought it was weird too. I can only assu
| |
| 163 }); | |
| 164 } | |
| 165 | |
| 151 // The 'allow file:// access' checkbox. | 166 // The 'allow file:// access' checkbox. |
| 152 if (extension.wantsFileAccess) { | 167 if (extension.wantsFileAccess) { |
| 153 var fileAccess = node.querySelector('.file-access-control'); | 168 var fileAccess = node.querySelector('.file-access-control'); |
| 154 fileAccess.addEventListener('click', function(e) { | 169 fileAccess.addEventListener('click', function(e) { |
| 155 chrome.send('extensionSettingsAllowFileAccess', | 170 chrome.send('extensionSettingsAllowFileAccess', |
| 156 [extension.id, String(e.target.checked)]); | 171 [extension.id, String(e.target.checked)]); |
| 157 }); | 172 }); |
| 158 fileAccess.querySelector('input').checked = extension.allowFileAccess; | 173 fileAccess.querySelector('input').checked = extension.allowFileAccess; |
| 159 fileAccess.hidden = false; | 174 fileAccess.hidden = false; |
| 160 } | 175 } |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 topScroll -= pad / 2; | 366 topScroll -= pad / 2; |
| 352 setScrollTopForDocument(document, topScroll); | 367 setScrollTopForDocument(document, topScroll); |
| 353 } | 368 } |
| 354 }, | 369 }, |
| 355 }; | 370 }; |
| 356 | 371 |
| 357 return { | 372 return { |
| 358 ExtensionsList: ExtensionsList | 373 ExtensionsList: ExtensionsList |
| 359 }; | 374 }; |
| 360 }); | 375 }); |
| OLD | NEW |