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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js

Issue 2649263003: DevTools: restore shortcuts to switch devtool panel left/right (Closed)
Patch Set: made selectNext/Prev read nicer Created 3 years, 11 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 | « third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
index 5cc3500b8836651b514b9bbb49d4297b2c7eb082..bc6b3bf67fed99799cbb31c02f16cc8a22eda873 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
@@ -333,6 +333,18 @@ UI.TabbedPane = class extends UI.VBox {
return true;
}
+ selectNextTab() {
+ var index = this._tabs.indexOf(this._currentTab);
+ var nextIndex = mod(index + 1, this._tabs.length);
+ this.selectTab(this._tabs[nextIndex].id, true);
+ }
+
+ selectPrevTab() {
+ var index = this._tabs.indexOf(this._currentTab);
+ var nextIndex = mod(index - 1, this._tabs.length);
+ this.selectTab(this._tabs[nextIndex].id, true);
+ }
+
/**
* @param {number} tabsCount
* @return {!Array.<string>}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698