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

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

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: test fixed Created 4 years, 2 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: 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 84603f58d1a2e18076a5f0741049b491d7c397b8..78c61bf33b5be1789083f1ba358ac9ade2faebec 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
@@ -55,6 +55,7 @@ WebInspector.TabbedPane = function()
/** @type {!Object.<string, !WebInspector.TabbedPaneTab>} */
this._tabsById = {};
this._currentTabLocked = false;
+ this._autoSelectFirstItemOnShow = true;
this._dropDownButton = this._createDropDownButton();
WebInspector.zoomManager.addEventListener(WebInspector.ZoomManager.Events.ZoomChanged, this._zoomChanged, this);
@@ -78,6 +79,14 @@ WebInspector.TabbedPane.prototype = {
},
/**
+ * @param {boolean} autoSelect
+ */
+ setAutoSelectFirstItemOnShow: function(autoSelect)
+ {
+ this._autoSelectFirstItemOnShow = autoSelect;
+ },
+
+ /**
* @return {?WebInspector.Widget}
*/
get visibleView()
@@ -466,7 +475,7 @@ WebInspector.TabbedPane.prototype = {
wasShown: function()
{
var effectiveTab = this._currentTab || this._tabsHistory[0];
- if (effectiveTab)
+ if (effectiveTab && this._autoSelectFirstItemOnShow)
this.selectTab(effectiveTab.id);
},

Powered by Google App Engine
This is Rietveld 408576698