Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1653)

Unified Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 1273363002: Devtools UI: Show multiple shortcuts, show more shortcuts (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 ba54e20c1fba7ccc7b9c371c5a9bd0b478bac3d0..3c6921df3149690af17a9691be08547676542dcf 100644
--- a/Source/devtools/front_end/timeline/TimelinePanel.js
+++ b/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -303,8 +303,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 = WebInspector.ToolbarButton.createActionButton("timeline.toggle-recording");
this._panelToolbar.appendToolbarItem(this.toggleTimelineButton);
this._updateToggleTimelineButton(false);
@@ -477,7 +476,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));
@@ -1801,3 +1799,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();
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698