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

Unified Diff: Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 1313443005: DevTools: forward Up/Down keys to profiles sidebar from FlameChart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: new approach 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
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/treeoutline.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/profiler/ProfilesPanel.js
diff --git a/Source/devtools/front_end/profiler/ProfilesPanel.js b/Source/devtools/front_end/profiler/ProfilesPanel.js
index 261e82322200f11e3514bc76091226f7c3af5aa4..5b4b8b8a825782c19aad98a7b8a721e63309a3a4 100644
--- a/Source/devtools/front_end/profiler/ProfilesPanel.js
+++ b/Source/devtools/front_end/profiler/ProfilesPanel.js
@@ -492,11 +492,27 @@ WebInspector.ProfilesPanel = function()
this.element.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
this._registerShortcuts();
+ this.contentElement.addEventListener("keydown", this._onKeyDown.bind(this), false);
+
WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.SuspendStateChanged, this._onSuspendStateChanged, this);
}
WebInspector.ProfilesPanel.prototype = {
/**
+ * @param {!Event} event
+ */
+ _onKeyDown: function(event)
+ {
+ var handled = false;
+ if (event.keyIdentifier === "Down" && !event.altKey)
+ handled = this._sidebarTree.selectNext();
+ else if (event.keyIdentifier === "Up" && !event.altKey)
+ handled = this._sidebarTree.selectPrevious();
+ if (handled)
+ event.consume(true);
+ },
+
+ /**
* @override
* @return {?WebInspector.SearchableView}
*/
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/treeoutline.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698