| 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 restoreSelectedProfileType: function() | 211 restoreSelectedProfileType: function() |
| 212 { | 212 { |
| 213 var typeId = this._selectedProfileTypeSetting.get(); | 213 var typeId = this._selectedProfileTypeSetting.get(); |
| 214 if (!(typeId in this._typeIdToOptionElement)) | 214 if (!(typeId in this._typeIdToOptionElement)) |
| 215 typeId = Object.keys(this._typeIdToOptionElement)[0]; | 215 typeId = Object.keys(this._typeIdToOptionElement)[0]; |
| 216 this._typeIdToOptionElement[typeId].checked = true; | 216 this._typeIdToOptionElement[typeId].checked = true; |
| 217 var type = this._typeIdToOptionElement[typeId]._profileType; | 217 var type = this._typeIdToOptionElement[typeId]._profileType; |
| 218 this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Even
ts.ProfileTypeSelected, type); | 218 this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Even
ts.ProfileTypeSelected, type); |
| 219 }, | 219 }, |
| 220 | 220 |
| 221 /** |
| 222 * @override |
| 223 */ |
| 221 _controlButtonClicked: function() | 224 _controlButtonClicked: function() |
| 222 { | 225 { |
| 223 this._panel.toggleRecord(); | 226 this._panel.toggleRecord(); |
| 224 }, | 227 }, |
| 225 | 228 |
| 229 /** |
| 230 * @override |
| 231 */ |
| 226 _updateControls: function() | 232 _updateControls: function() |
| 227 { | 233 { |
| 228 WebInspector.ProfileLauncherView.prototype._updateControls.call(this); | 234 WebInspector.ProfileLauncherView.prototype._updateControls.call(this); |
| 229 var items = this._profileTypeSelectorForm.elements; | 235 var items = this._profileTypeSelectorForm.elements; |
| 230 for (var i = 0; i < items.length; ++i) { | 236 for (var i = 0; i < items.length; ++i) { |
| 231 if (items[i].type === "radio") | 237 if (items[i].type === "radio") |
| 232 items[i].disabled = this._isProfiling; | 238 items[i].disabled = this._isProfiling; |
| 233 } | 239 } |
| 234 }, | 240 }, |
| 235 | 241 |
| 236 /** | 242 /** |
| 237 * @param {!WebInspector.ProfileType} profileType | 243 * @param {!WebInspector.ProfileType} profileType |
| 238 */ | 244 */ |
| 239 _profileTypeChanged: function(profileType) | 245 _profileTypeChanged: function(profileType) |
| 240 { | 246 { |
| 241 this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Even
ts.ProfileTypeSelected, profileType); | 247 this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Even
ts.ProfileTypeSelected, profileType); |
| 242 this._isInstantProfile = profileType.isInstantProfile(); | 248 this._isInstantProfile = profileType.isInstantProfile(); |
| 243 this._isEnabled = profileType.isEnabled(); | 249 this._isEnabled = profileType.isEnabled(); |
| 244 this._updateControls(); | 250 this._updateControls(); |
| 245 this._selectedProfileTypeSetting.set(profileType.id); | 251 this._selectedProfileTypeSetting.set(profileType.id); |
| 246 }, | 252 }, |
| 247 | 253 |
| 254 /** |
| 255 * @override |
| 256 */ |
| 248 profileStarted: function() | 257 profileStarted: function() |
| 249 { | 258 { |
| 250 this._isProfiling = true; | 259 this._isProfiling = true; |
| 251 this._updateControls(); | 260 this._updateControls(); |
| 252 }, | 261 }, |
| 253 | 262 |
| 263 /** |
| 264 * @override |
| 265 */ |
| 254 profileFinished: function() | 266 profileFinished: function() |
| 255 { | 267 { |
| 256 this._isProfiling = false; | 268 this._isProfiling = false; |
| 257 this._updateControls(); | 269 this._updateControls(); |
| 258 }, | 270 }, |
| 259 | 271 |
| 260 __proto__: WebInspector.ProfileLauncherView.prototype | 272 __proto__: WebInspector.ProfileLauncherView.prototype |
| 261 }; | 273 }; |
| OLD | NEW |