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

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

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. 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/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 25468c7098c27485e36ee069c628e10f56532268..b98c5f3f9d80cea8c96a2fcfeefd82b311da9097 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -481,8 +481,8 @@ WebInspector.Main.prototype = {
event.preventDefault();
}
- if (!WebInspector.Dialog.hasInstance() && WebInspector.inspectorView.currentPanel()) {
- WebInspector.inspectorView.currentPanel().handleShortcut(event);
+ if (!WebInspector.Dialog.hasInstance() && WebInspector.inspectorView.currentPanelDeprecated()) {
+ WebInspector.inspectorView.currentPanelDeprecated().handleShortcut(event);
if (event.handled) {
event.consume(true);
return;
@@ -675,7 +675,7 @@ WebInspector.Main.SearchActionDelegate.prototype = {
*/
handleAction: function(context, actionId)
{
- var searchableView = WebInspector.SearchableView.fromElement(document.deepActiveElement()) || WebInspector.inspectorView.currentPanel().searchableView();
+ var searchableView = WebInspector.SearchableView.fromElement(document.deepActiveElement()) || WebInspector.inspectorView.currentPanelDeprecated().searchableView();
if (!searchableView)
return false;
switch (actionId) {
@@ -858,7 +858,9 @@ WebInspector.Main.MainMenuItem.prototype = {
var extensions = self.runtime.extensions("view", undefined, true);
for (var extension of extensions) {
var descriptor = extension.descriptor();
- if (descriptor["location"] !== "drawer-view")
+ if (descriptor["persistence"] !== "closeable")
+ continue;
+ if (descriptor["location"] !== "drawer-view" && descriptor["location"] !== "panel")
continue;
moreTools.appendItem(extension.title(), WebInspector.viewManager.showView.bind(WebInspector.viewManager, descriptor["id"]));
}

Powered by Google App Engine
This is Rietveld 408576698