Commit d21d2ed3 authored by Pavel Feldman's avatar Pavel Feldman Committed by Commit Bot

DevTools: allow showing views above and below the Sources sidebar.

Change-Id: I76a8edbc45bd6e2d775b48c8f93e288d82bed817
Reviewed-on: https://chromium-review.googlesource.com/c/1357513Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612830}
parent cbd5bcad
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"extensions": [ "extensions": [
{ {
"type": "view", "type": "view",
"location": "sources-sidebar", "location": "sources.sidebar-bottom",
"id": "sources.eventListenerBreakpoints", "id": "sources.eventListenerBreakpoints",
"title": "Event Listener Breakpoints", "title": "Event Listener Breakpoints",
"order": 9, "order": 9,
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
}, },
{ {
"type": "view", "type": "view",
"location": "sources-sidebar", "location": "sources.sidebar-bottom",
"id": "sources.xhrBreakpoints", "id": "sources.xhrBreakpoints",
"title": "XHR/fetch Breakpoints", "title": "XHR/fetch Breakpoints",
"order": 5, "order": 5,
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}, },
{ {
"type": "view", "type": "view",
"location": "sources-sidebar", "location": "sources.sidebar-bottom",
"id": "sources.domBreakpoints", "id": "sources.domBreakpoints",
"title": "DOM Breakpoints", "title": "DOM Breakpoints",
"order": 7, "order": 7,
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
}, },
{ {
"type": "view", "type": "view",
"location": "sources-sidebar", "location": "sources.sidebar-bottom",
"id": "sources.globalListeners", "id": "sources.globalListeners",
"title": "Global Listeners", "title": "Global Listeners",
"order": 8, "order": 8,
......
...@@ -251,10 +251,12 @@ Sources.SourcesPanel = class extends UI.Panel { ...@@ -251,10 +251,12 @@ Sources.SourcesPanel = class extends UI.Panel {
* @return {?UI.ViewLocation} * @return {?UI.ViewLocation}
*/ */
resolveLocation(locationName) { resolveLocation(locationName) {
if (locationName === 'sources-sidebar') if (locationName === 'sources.sidebar-top' || locationName === 'sources.sidebar-bottom' ||
locationName === 'sources.sidebar-tabs') {
return this._sidebarPaneStack; return this._sidebarPaneStack;
else } else {
return this._navigatorTabbedLocation; return this._navigatorTabbedLocation;
}
} }
/** /**
...@@ -899,6 +901,7 @@ Sources.SourcesPanel = class extends UI.Panel { ...@@ -899,6 +901,7 @@ Sources.SourcesPanel = class extends UI.Panel {
this._sidebarPaneStack.widget().element.classList.add('overflow-auto'); this._sidebarPaneStack.widget().element.classList.add('overflow-auto');
this._sidebarPaneStack.widget().show(vbox.element); this._sidebarPaneStack.widget().show(vbox.element);
this._sidebarPaneStack.widget().element.appendChild(this._debuggerPausedMessage.element()); this._sidebarPaneStack.widget().element.appendChild(this._debuggerPausedMessage.element());
this._sidebarPaneStack.appendApplicableItems('sources.sidebar-top');
vbox.element.appendChild(this._debugToolbar.element); vbox.element.appendChild(this._debugToolbar.element);
if (this._threadsSidebarPane) if (this._threadsSidebarPane)
...@@ -937,11 +940,12 @@ Sources.SourcesPanel = class extends UI.Panel { ...@@ -937,11 +940,12 @@ Sources.SourcesPanel = class extends UI.Panel {
this._splitWidget.installResizer(this._debugToolbar.gripElementForResize()); this._splitWidget.installResizer(this._debugToolbar.gripElementForResize());
tabbedLocation.appendView(scopeChainView); tabbedLocation.appendView(scopeChainView);
tabbedLocation.appendView(this._watchSidebarPane); tabbedLocation.appendView(this._watchSidebarPane);
tabbedLocation.appendApplicableItems('sources.sidebar-tabs');
this._extensionSidebarPanesContainer = tabbedLocation; this._extensionSidebarPanesContainer = tabbedLocation;
this.sidebarPaneView = splitWidget; this.sidebarPaneView = splitWidget;
} }
this._sidebarPaneStack.appendApplicableItems('sources-sidebar'); this._sidebarPaneStack.appendApplicableItems('sources.sidebar-bottom');
const extensionSidebarPanes = Extensions.extensionServer.sidebarPanes(); const extensionSidebarPanes = Extensions.extensionServer.sidebarPanes();
for (let i = 0; i < extensionSidebarPanes.length; ++i) for (let i = 0; i < extensionSidebarPanes.length; ++i)
this._addExtensionSidebarPane(extensionSidebarPanes[i]); this._addExtensionSidebarPane(extensionSidebarPanes[i]);
......
...@@ -715,11 +715,24 @@ ...@@ -715,11 +715,24 @@
{ {
"type": "@UI.ViewLocationResolver", "type": "@UI.ViewLocationResolver",
"name": "navigator-view", "name": "navigator-view",
"category": "Sources",
"className": "Sources.SourcesPanel"
},
{
"type": "@UI.ViewLocationResolver",
"name": "sources.sidebar-top",
"category": "Sources",
"className": "Sources.SourcesPanel"
},
{
"type": "@UI.ViewLocationResolver",
"name": "sources.sidebar-bottom",
"category": "Sources",
"className": "Sources.SourcesPanel" "className": "Sources.SourcesPanel"
}, },
{ {
"type": "@UI.ViewLocationResolver", "type": "@UI.ViewLocationResolver",
"name": "sources-sidebar", "name": "sources.sidebar-tabs",
"category": "Sources", "category": "Sources",
"className": "Sources.SourcesPanel" "className": "Sources.SourcesPanel"
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment