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

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

Issue 2566573002: DevTools: Open Elements panel sooner on Inspect Element (Closed)
Patch Set: Missed one showConsolePanel Created 4 years 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/TabbedPane.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/View.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/View.js b/third_party/WebKit/Source/devtools/front_end/ui/View.js
index 706dd8991f86737a0fb6ce21e2910229ef5bc2c1..a0eef03dbb35105eaa0eb06bb677515113e6c789 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -375,10 +375,12 @@ UI.ViewManager = class {
* @param {string=} location
* @param {boolean=} restoreSelection
* @param {boolean=} allowReorder
+ * @param {?string=} defaultTab
* @return {!UI.TabbedViewLocation}
*/
- createTabbedLocation(revealCallback, location, restoreSelection, allowReorder) {
- return new UI.ViewManager._TabbedLocation(this, revealCallback, location, restoreSelection, allowReorder);
+ createTabbedLocation(revealCallback, location, restoreSelection, allowReorder, defaultTab) {
+ return new UI.ViewManager._TabbedLocation(
+ this, revealCallback, location, restoreSelection, allowReorder, defaultTab);
}
/**
@@ -560,8 +562,9 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
* @param {string=} location
* @param {boolean=} restoreSelection
* @param {boolean=} allowReorder
+ * @param {?string=} defaultTab
*/
- constructor(manager, revealCallback, location, restoreSelection, allowReorder) {
+ constructor(manager, revealCallback, location, restoreSelection, allowReorder, defaultTab) {
var tabbedPane = new UI.TabbedPane();
if (allowReorder)
tabbedPane.setAllowTabReorder(true);
@@ -577,6 +580,7 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
this._tabbedPane.addEventListener(UI.TabbedPane.Events.TabOrderChanged, this._persistTabOrder, this);
if (restoreSelection)
this._lastSelectedTabSetting = Common.settings.createSetting(location + '-selectedTab', '');
+ this._defaultTab = defaultTab;
/** @type {!Map.<string, !UI.View>} */
this._views = new Map();
@@ -635,7 +639,9 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
else if (this._closeableTabSetting.get()[id])
this._appendTab(view);
}
- if (this._lastSelectedTabSetting && this._tabbedPane.hasTab(this._lastSelectedTabSetting.get()))
+ if (this._defaultTab && this._tabbedPane.hasTab(this._defaultTab))
+ this._tabbedPane.selectTab(this._defaultTab);
+ else if (this._lastSelectedTabSetting && this._tabbedPane.hasTab(this._lastSelectedTabSetting.get()))
this._tabbedPane.selectTab(this._lastSelectedTabSetting.get());
}
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698