| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Intel Inc. All rights reserved. | 3 * Copyright (C) 2012 Intel Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 _createSettingCheckbox(setting, tooltip) { | 207 _createSettingCheckbox(setting, tooltip) { |
| 208 const checkboxItem = new UI.ToolbarSettingCheckbox(setting, tooltip); | 208 const checkboxItem = new UI.ToolbarSettingCheckbox(setting, tooltip); |
| 209 this._recordingOptionUIControls.push(checkboxItem); | 209 this._recordingOptionUIControls.push(checkboxItem); |
| 210 return checkboxItem; | 210 return checkboxItem; |
| 211 } | 211 } |
| 212 | 212 |
| 213 _populateToolbar() { | 213 _populateToolbar() { |
| 214 // Record | 214 // Record |
| 215 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._tog
gleRecordAction)); | 215 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._tog
gleRecordAction)); |
| 216 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('mai
n.reload')); | 216 this._panelToolbar.appendToolbarItem(UI.Toolbar.createActionButtonForId('mai
n.reload')); |
| 217 var clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeicon-
clear'); | 217 this._clearButton = new UI.ToolbarButton(Common.UIString('Clear'), 'largeico
n-clear'); |
| 218 clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this._clea
r()); | 218 this._clearButton.addEventListener(UI.ToolbarButton.Events.Click, () => this
._clear()); |
| 219 this._panelToolbar.appendToolbarItem(clearButton); | 219 this._panelToolbar.appendToolbarItem(this._clearButton); |
| 220 this._panelToolbar.appendSeparator(); | 220 this._panelToolbar.appendSeparator(); |
| 221 | 221 |
| 222 // View | 222 // View |
| 223 this._panelToolbar.appendSeparator(); | 223 this._panelToolbar.appendSeparator(); |
| 224 this._showScreenshotsToolbarCheckbox = | 224 this._showScreenshotsToolbarCheckbox = |
| 225 this._createSettingCheckbox(this._showScreenshotsSetting, Common.UIStrin
g('Capture screenshots')); | 225 this._createSettingCheckbox(this._showScreenshotsSetting, Common.UIStrin
g('Capture screenshots')); |
| 226 this._panelToolbar.appendToolbarItem(this._showScreenshotsToolbarCheckbox); | 226 this._panelToolbar.appendToolbarItem(this._showScreenshotsToolbarCheckbox); |
| 227 | 227 |
| 228 this._showMemoryToolbarCheckbox = | 228 this._showMemoryToolbarCheckbox = |
| 229 this._createSettingCheckbox(this._showMemorySetting, Common.UIString('Sh
ow memory timeline')); | 229 this._createSettingCheckbox(this._showMemorySetting, Common.UIString('Sh
ow memory timeline')); |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 } | 546 } |
| 547 | 547 |
| 548 _onSuspendStateChanged() { | 548 _onSuspendStateChanged() { |
| 549 this._updateTimelineControls(); | 549 this._updateTimelineControls(); |
| 550 } | 550 } |
| 551 | 551 |
| 552 _updateTimelineControls() { | 552 _updateTimelineControls() { |
| 553 var state = Timeline.TimelinePanel.State; | 553 var state = Timeline.TimelinePanel.State; |
| 554 this._toggleRecordAction.setToggled(this._state === state.Recording); | 554 this._toggleRecordAction.setToggled(this._state === state.Recording); |
| 555 this._toggleRecordAction.setEnabled(this._state === state.Recording || this.
_state === state.Idle); | 555 this._toggleRecordAction.setEnabled(this._state === state.Recording || this.
_state === state.Idle); |
| 556 this._clearButton.setEnabled(this._state === state.Idle); |
| 556 this._panelToolbar.setEnabled(this._state !== state.Loading); | 557 this._panelToolbar.setEnabled(this._state !== state.Loading); |
| 557 this._dropTarget.setEnabled(this._state === state.Idle); | 558 this._dropTarget.setEnabled(this._state === state.Idle); |
| 558 } | 559 } |
| 559 | 560 |
| 560 _toggleRecording() { | 561 _toggleRecording() { |
| 561 if (this._state === Timeline.TimelinePanel.State.Idle) | 562 if (this._state === Timeline.TimelinePanel.State.Idle) |
| 562 this._startRecording(true); | 563 this._startRecording(true); |
| 563 else if (this._state === Timeline.TimelinePanel.State.Recording) | 564 else if (this._state === Timeline.TimelinePanel.State.Recording) |
| 564 this._stopRecording(); | 565 this._stopRecording(); |
| 565 } | 566 } |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1288 return true; | 1289 return true; |
| 1289 case 'timeline.jump-to-next-frame': | 1290 case 'timeline.jump-to-next-frame': |
| 1290 panel._jumpToFrame(1); | 1291 panel._jumpToFrame(1); |
| 1291 return true; | 1292 return true; |
| 1292 } | 1293 } |
| 1293 return false; | 1294 return false; |
| 1294 } | 1295 } |
| 1295 }; | 1296 }; |
| 1296 | 1297 |
| 1297 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); | 1298 Timeline.TimelinePanel._traceProviderSettingSymbol = Symbol('traceProviderSettin
g'); |
| OLD | NEW |