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

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

Issue 2142303002: Revert of DevTools: automatically populate 'More tools' submenu with the drawer views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 5ab070652d9c3c41e95359341277d54bc386a908..9f3fb088f76a98154fdfa0670d73a033e37dde11 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js
@@ -1273,7 +1273,11 @@
this._extensions.set(id, extensions[i]);
if (this._isPermanentTab(id))
this._appendTab(extensions[i]);
- else if (this._isCloseableTab(id) && this._closeableTabSetting.get()[id])
+ }
+
+ for (var i = 0; i < extensions.length; i++) {
+ var id = extensions[i].descriptor()["name"];
+ if (this._isCloseableTab(id) && this._closeableTabSetting.get()[id])
this._appendTab(extensions[i]);
}
},
@@ -1309,10 +1313,13 @@
*/
_appendTabsToMenu: function(contextMenu)
{
- var extensions = self.runtime.extensions(this._extensionPoint, undefined, true);
- for (var extension of extensions) {
- var title = WebInspector.UIString(extension.title());
- contextMenu.appendItem(title, this.showTab.bind(this, extension.descriptor()["name"]));
+ for (var id of this._extensions.keysArray().filter(this._isPermanentTab.bind(this))) {
+ var title = WebInspector.UIString(this._extensions.get(id).title(WebInspector.platform()));
+ contextMenu.appendItem(title, this.showTab.bind(this, id));
+ }
+ for (var id of this._extensions.keysArray().filter(this._isCloseableTab.bind(this))) {
+ var title = WebInspector.UIString(this._extensions.get(id).title(WebInspector.platform()));
+ contextMenu.appendItem(title, this.showTab.bind(this, id));
}
},
@@ -1323,7 +1330,7 @@
{
var descriptor = extension.descriptor();
var id = descriptor["name"];
- var title = WebInspector.UIString(extension.title());
+ var title = WebInspector.UIString(extension.title(WebInspector.platform()));
var closeable = descriptor["persistence"] === "closeable" || descriptor["persistence"] === "temporary";
this._tabbedPane.appendTab(id, title, this._views.get(id) || new WebInspector.Widget(), undefined, false, closeable);
},

Powered by Google App Engine
This is Rietveld 408576698