| Index: Source/devtools/front_end/timeline/TimelinePanel.js
|
| diff --git a/Source/devtools/front_end/timeline/TimelinePanel.js b/Source/devtools/front_end/timeline/TimelinePanel.js
|
| index 3bfd5fba6f99d0525519010c418736f31621b69b..5429abca68f06b0d5d78d920bf2555d8ec0f1a1f 100644
|
| --- a/Source/devtools/front_end/timeline/TimelinePanel.js
|
| +++ b/Source/devtools/front_end/timeline/TimelinePanel.js
|
| @@ -304,7 +304,7 @@ WebInspector.TimelinePanel.prototype = {
|
| this._panelToolbar = new WebInspector.Toolbar(this.element);
|
|
|
| this.toggleTimelineButton = new WebInspector.ToolbarButton("Record timeline", "record-toolbar-item");
|
| - this.toggleTimelineButton.addEventListener("click", this._toggleTimelineButtonClicked, this);
|
| + this.toggleTimelineButton.setAction("timeline.toggle-recording");
|
| this._panelToolbar.appendToolbarItem(this.toggleTimelineButton);
|
| this._updateToggleTimelineButton(false);
|
|
|
| @@ -477,7 +477,6 @@ WebInspector.TimelinePanel.prototype = {
|
|
|
| _registerShortcuts: function()
|
| {
|
| - this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.StartStopRecording, this._toggleTimelineButtonClicked.bind(this));
|
| this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.SaveToFile, this._saveToFile.bind(this));
|
| this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.LoadFromFile, this._selectFileToLoad.bind(this));
|
| this.registerShortcuts(WebInspector.ShortcutsScreen.TimelinePanelShortcuts.JumpToPreviousFrame, this._jumpToFrame.bind(this, -1));
|
| @@ -1863,3 +1862,25 @@ WebInspector.LoadTimelineHandler.prototype = {
|
| WebInspector.TimelinePanel.instance()._loadFromURL(value);
|
| }
|
| }
|
| +
|
| +/**
|
| + * @constructor
|
| + * @implements {WebInspector.ActionDelegate}
|
| + */
|
| +WebInspector.TimelinePanel.RecordActionDelegate = function()
|
| +{
|
| +}
|
| +
|
| +WebInspector.TimelinePanel.RecordActionDelegate.prototype = {
|
| + /**
|
| + * @override
|
| + * @param {!WebInspector.Context} context
|
| + * @param {string} actionId
|
| + */
|
| + handleAction: function(context, actionId)
|
| + {
|
| + if (WebInspector.inspectorView.currentPanel().name !== "timeline")
|
| + return;
|
| + WebInspector.TimelinePanel.instance()._toggleTimelineButtonClicked();
|
| + }
|
| +}
|
|
|