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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2145763002: Reland 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/main/Main.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index 8c8748bfb858a998fbaaa0c822000a21fe0a9695..1e7cf982faf3dd2988611398b1b2afbc6c03bf68 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -57,6 +57,7 @@
if (InspectorFrontendHost.isUnderTest())
self.runtime.useTestBase();
+ Runtime.setPlatform(WebInspector.platform());
InspectorFrontendHost.getPreferences(this._gotPreferences.bind(this));
},
@@ -883,6 +884,13 @@
contextMenu.appendAction("main.toggle-drawer", WebInspector.inspectorView.drawerVisible() ? WebInspector.UIString("Hide console") : WebInspector.UIString("Show console"));
contextMenu.appendItemsAtLocation("mainMenu");
+ var moreTools = contextMenu.namedSubMenu("mainMenuMoreTools");
+ var extensions = self.runtime.extensions("drawer-view", undefined, true);
+ for (var extension of extensions) {
+ var descriptor = extension.descriptor();
+ moreTools.appendItem(extension.title(), WebInspector.inspectorView.showViewInDrawer.bind(WebInspector.inspectorView, descriptor["name"]));
+ }
+
contextMenu.show();
}
}

Powered by Google App Engine
This is Rietveld 408576698