| 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 cr.define('apps_dev_tool', function() { | 5 cr.define('apps_dev_tool', function() { |
| 6 'use strict'; | 6 'use strict'; |
| 7 | 7 |
| 8 /* Creates a new list of items. | 8 /* Creates a new list of items. |
| 9 * @param {Object=} opt_propertyBag Optional properties. | 9 * @param {Object=} opt_propertyBag Optional properties. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 * @private | 192 * @private |
| 193 */ | 193 */ |
| 194 setEnabledCheckbox_: function(item, el) { | 194 setEnabledCheckbox_: function(item, el) { |
| 195 var enable = el.querySelector('.enable-checkbox'); | 195 var enable = el.querySelector('.enable-checkbox'); |
| 196 enable.hidden = false; | 196 enable.hidden = false; |
| 197 enable.querySelector('input').disabled = !item.may_disable; | 197 enable.querySelector('input').disabled = !item.may_disable; |
| 198 | 198 |
| 199 if (item.may_disable) { | 199 if (item.may_disable) { |
| 200 enable.addEventListener('click', function(e) { | 200 enable.addEventListener('click', function(e) { |
| 201 chrome.developerPrivate.enable( | 201 chrome.developerPrivate.enable( |
| 202 item.id, e.target.checked, loadItemsInfo); | 202 item.id, !!e.target.checked, loadItemsInfo); |
| 203 }); | 203 }); |
| 204 } | 204 } |
| 205 | 205 |
| 206 enable.querySelector('input').checked = item.enabled; | 206 enable.querySelector('input').checked = item.enabled; |
| 207 }, | 207 }, |
| 208 | 208 |
| 209 | 209 |
| 210 /** | 210 /** |
| 211 * Sets the handler for the allow_file_access checkbox. | 211 * Sets the handler for the allow_file_access checkbox. |
| 212 * @param {!object} item A dictionary of item metadata. | 212 * @param {!object} item A dictionary of item metadata. |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } | 261 } |
| 262 }); | 262 }); |
| 263 } | 263 } |
| 264 } | 264 } |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 return { | 267 return { |
| 268 ItemsList: ItemsList, | 268 ItemsList: ItemsList, |
| 269 }; | 269 }; |
| 270 }); | 270 }); |
| OLD | NEW |