| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 * @param {boolean=} userGesture | 286 * @param {boolean=} userGesture |
| 287 */ | 287 */ |
| 288 _selectedCategoriesUpdated: function(userGesture) | 288 _selectedCategoriesUpdated: function(userGesture) |
| 289 { | 289 { |
| 290 // Save present categories only upon user gesture to clean up junk from
past versions and removed extensions. | 290 // Save present categories only upon user gesture to clean up junk from
past versions and removed extensions. |
| 291 // Do not remove old categories if not handling a user gesture, as there
's chance categories will be added | 291 // Do not remove old categories if not handling a user gesture, as there
's chance categories will be added |
| 292 // later during start-up. | 292 // later during start-up. |
| 293 var selectedCategories = userGesture ? {} : this._selectedCategoriesSett
ing.get(); | 293 var selectedCategories = userGesture ? {} : this._selectedCategoriesSett
ing.get(); |
| 294 var childNodes = this._categoriesElement.childNodes; | 294 var childNodes = this._categoriesElement.childNodes; |
| 295 for (var i = 0, length = childNodes.length; i < length; ++i) | 295 for (var i = 0, length = childNodes.length; i < length; ++i) |
| 296 selectedCategories[childNodes[i].__displayName] = childNodes[i].firs
tChild.checked; | 296 selectedCategories[childNodes[i].__displayName] = childNodes[i].chec
kboxElement.checked; |
| 297 selectedCategories[WebInspector.AuditLauncherView.AllCategoriesKey] = th
is._selectAllCheckboxElement.checked; | 297 selectedCategories[WebInspector.AuditLauncherView.AllCategoriesKey] = th
is._selectAllCheckboxElement.checked; |
| 298 this._selectedCategoriesSetting.set(selectedCategories); | 298 this._selectedCategoriesSetting.set(selectedCategories); |
| 299 this._updateButton(); | 299 this._updateButton(); |
| 300 }, | 300 }, |
| 301 | 301 |
| 302 _updateButton: function() | 302 _updateButton: function() |
| 303 { | 303 { |
| 304 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); | 304 this._launchButton.textContent = this._auditRunning ? WebInspector.UIStr
ing("Stop") : WebInspector.UIString("Run"); |
| 305 this._launchButton.disabled = !this._currentCategoriesCount; | 305 this._launchButton.disabled = !this._currentCategoriesCount; |
| 306 }, | 306 }, |
| 307 | 307 |
| 308 __proto__: WebInspector.VBox.prototype | 308 __proto__: WebInspector.VBox.prototype |
| 309 } | 309 } |
| OLD | NEW |