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

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

Issue 2867133002: DevTools: Let the drawer tabs be reordered (Closed)
Patch Set: showView Created 3 years, 7 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/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 7343e1dc3a8b37414f6cd1377b127ab7f954f635..3a7ce3ef9b9c45950e3040e218f0c19b74285e95 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/View.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/View.js
@@ -712,6 +712,16 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
}
}
this._appendTab(view, index);
+
+ if (view.isCloseable()) {
+ var tabs = this._closeableTabSetting.get();
+ var tabId = view.viewId();
+ if (!tabs[tabId]) {
+ tabs[tabId] = true;
+ this._closeableTabSetting.set(tabs);
+ }
+ }
+ this._persistTabOrder();
}
/**
@@ -750,17 +760,6 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
var tabId = /** @type {string} */ (event.data.tabId);
if (this._lastSelectedTabSetting && event.data['isUserGesture'])
this._lastSelectedTabSetting.set(tabId);
- var view = this._views.get(tabId);
- if (!view)
- return;
-
- if (view.isCloseable()) {
- var tabs = this._closeableTabSetting.get();
- if (!tabs[tabId]) {
- tabs[tabId] = true;
- this._closeableTabSetting.set(tabs);
- }
- }
}
/**
@@ -775,10 +774,7 @@ UI.ViewManager._TabbedLocation = class extends UI.ViewManager._Location {
}
}
- /**
- * @param {!Common.Event} event
- */
- _persistTabOrder(event) {
+ _persistTabOrder() {
var tabIds = this._tabbedPane.tabIds();
var tabOrders = {};
for (var i = 0; i < tabIds.length; i++)
« 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