Commit 2431f4ba authored by Pavel Feldman's avatar Pavel Feldman Committed by Commit Bot

DevTools: move overrides and content scripts into browser_debugger, add drawer split.

Change-Id: I9495216a14e15d35fd55894b48a19f616a649213
Reviewed-on: https://chromium-review.googlesource.com/1034196
Commit-Queue: Pavel Feldman <pfeldman@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#554695}
parent f02f2344
......@@ -83,6 +83,34 @@
"order": 2,
"persistence": "permanent",
"className": "Sources.NetworkNavigatorView"
},
{
"type": "view",
"location": "navigator-view",
"id": "navigator-overrides",
"title": "Overrides",
"order": 4,
"persistence": "permanent",
"className": "Sources.OverridesNavigatorView"
},
{
"type": "view",
"location": "navigator-view",
"id": "navigator-contentScripts",
"title": "Content scripts",
"order": 5,
"persistence": "permanent",
"className": "Sources.ContentScriptsNavigatorView"
},
{
"type": "@Sources.NavigatorView",
"viewId": "navigator-overrides",
"className": "Sources.OverridesNavigatorView"
},
{
"type": "@Sources.NavigatorView",
"viewId": "navigator-contentScripts",
"className": "Sources.ContentScriptsNavigatorView"
}
],
"dependencies": [
......
......@@ -118,6 +118,7 @@ Main.Main = class {
Runtime.experiments.register('sourceDiff', 'Source diff');
Runtime.experiments.register(
'stepIntoAsync', 'Introduce separate step action, stepInto becomes powerful enough to go inside async call');
Runtime.experiments.register('splitInDrawer', 'Split in drawer', true);
Runtime.experiments.register('terminalInDrawer', 'Terminal in drawer', true);
// Timeline
......
......@@ -283,6 +283,12 @@
"category": "Drawer",
"className": "UI.InspectorView"
},
{
"type": "@UI.ViewLocationResolver",
"name": "drawer-sidebar",
"category": "Drawer sidebar",
"className": "UI.InspectorView"
},
{
"type": "@UI.ViewLocationResolver",
"name": "panel",
......
......@@ -288,24 +288,6 @@
"persistence": "permanent",
"className": "Sources.FilesNavigatorView"
},
{
"type": "view",
"location": "navigator-view",
"id": "navigator-overrides",
"title": "Overrides",
"order": 4,
"persistence": "permanent",
"className": "Sources.OverridesNavigatorView"
},
{
"type": "view",
"location": "navigator-view",
"id": "navigator-contentScripts",
"title": "Content scripts",
"order": 5,
"persistence": "permanent",
"className": "Sources.ContentScriptsNavigatorView"
},
{
"type": "view",
"location": "navigator-view",
......@@ -334,16 +316,6 @@
"viewId": "navigator-files",
"className": "Sources.FilesNavigatorView"
},
{
"type": "@Sources.NavigatorView",
"viewId": "navigator-overrides",
"className": "Sources.OverridesNavigatorView"
},
{
"type": "@Sources.NavigatorView",
"viewId": "navigator-contentScripts",
"className": "Sources.ContentScriptsNavigatorView"
},
{
"type": "@Sources.NavigatorView",
"viewId": "navigator-snippets",
......
......@@ -2,11 +2,10 @@
"extensions": [
{
"type": "view",
"location": "drawer-view",
"location": "drawer-sidebar",
"id": "drawer.xterm",
"title": "Terminal",
"order": 10,
"persistence": "closeable",
"factoryName": "Terminal.TerminalWidget"
}
],
......
......@@ -44,6 +44,16 @@ UI.InspectorView = class extends UI.VBox {
this._drawerSplitWidget.enableShowModeSaving();
this._drawerSplitWidget.show(this.element);
if (Runtime.experiments.isEnabled('splitInDrawer')) {
this._innerDrawerSplitWidget = new UI.SplitWidget(true, true, 'Inspector.drawerSidebarSplitViewState', 200, 200);
this._drawerSplitWidget.setSidebarWidget(this._innerDrawerSplitWidget);
this._drawerSidebarTabbedLocation =
UI.viewManager.createTabbedLocation(this._showDrawer.bind(this, false), 'drawer-sidebar', true, true);
this._drawerSidebarTabbedPane = this._drawerSidebarTabbedLocation.tabbedPane();
this._drawerSidebarTabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._drawerTabSelected, this);
this._innerDrawerSplitWidget.setSidebarWidget(this._drawerSidebarTabbedPane);
}
// Create drawer tabbed pane.
this._drawerTabbedLocation =
UI.viewManager.createTabbedLocation(this._showDrawer.bind(this, false), 'drawer-view', true, true);
......@@ -52,11 +62,18 @@ UI.InspectorView = class extends UI.VBox {
this._drawerTabbedPane.setMinimumSize(0, 27);
const closeDrawerButton = new UI.ToolbarButton(Common.UIString('Close drawer'), 'largeicon-delete');
closeDrawerButton.addEventListener(UI.ToolbarButton.Events.Click, this._closeDrawer, this);
this._drawerTabbedPane.rightToolbar().appendToolbarItem(closeDrawerButton);
this._drawerSplitWidget.installResizer(this._drawerTabbedPane.headerElement());
this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane);
this._drawerTabbedPane.addEventListener(UI.TabbedPane.Events.TabSelected, this._drawerTabSelected, this);
if (this._drawerSidebarTabbedPane) {
this._innerDrawerSplitWidget.setMainWidget(this._drawerTabbedPane);
this._drawerSidebarTabbedPane.rightToolbar().appendToolbarItem(closeDrawerButton);
this._drawerSplitWidget.installResizer(this._drawerSidebarTabbedPane.headerElement());
} else {
this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane);
this._drawerTabbedPane.rightToolbar().appendToolbarItem(closeDrawerButton);
}
// Create main area tabbed pane.
this._tabbedLocation = UI.viewManager.createTabbedLocation(
InspectorFrontendHost.bringToFront.bind(InspectorFrontendHost), 'panel', true, true,
......@@ -115,6 +132,8 @@ UI.InspectorView = class extends UI.VBox {
return this._drawerTabbedLocation;
if (locationName === 'panel')
return this._tabbedLocation;
if (locationName === 'drawer-sidebar')
return this._drawerSidebarTabbedLocation;
return null;
}
......
......@@ -747,7 +747,7 @@ UI.SplitWidget = class extends UI.Widget {
*/
hideDefaultResizer(noSplitter) {
this.uninstallResizer(this._resizerElement);
this._sidebarElement.classList.toggle('no-default-splitter', noSplitter);
this._sidebarElement.classList.toggle('no-default-splitter', !!noSplitter);
}
/**
......
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