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

Unified Diff: Source/devtools/front_end/sources/SourcesPanel.js

Issue 422313002: DevTools: Remove editor in drawer experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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: Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/Source/devtools/front_end/sources/SourcesPanel.js b/Source/devtools/front_end/sources/SourcesPanel.js
index 435cdadf967ac4fb7840a23eaaaed9a462b7dcde..b8dbd73f3d8bae433525586186ab3104f7369abe 100644
--- a/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/Source/devtools/front_end/sources/SourcesPanel.js
@@ -67,8 +67,6 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this.registerRequiredCSS("sourcesPanel.css");
new WebInspector.UpgradeFileSystemDropTarget(this.element);
- WebInspector.settings.showEditorInDrawer = WebInspector.settings.createSetting("showEditorInDrawer", true);
-
this._workspace = workspaceForTest || WebInspector.workspace;
this.debugToolbar = this._createDebugToolbar();
@@ -98,13 +96,7 @@ WebInspector.SourcesPanel = function(workspaceForTest)
this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorSelected, this._editorSelected.bind(this));
this._sourcesView.addEventListener(WebInspector.SourcesView.Events.EditorClosed, this._editorClosed.bind(this));
this._sourcesView.registerShortcuts(this.registerShortcuts.bind(this));
-
- if (WebInspector.experimentsSettings.editorInDrawer.isEnabled()) {
- this._drawerEditorView = new WebInspector.SourcesPanel.DrawerEditorView();
- this._sourcesView.show(this._drawerEditorView.element);
- } else {
- this._sourcesView.show(this.editorView.mainElement());
- }
+ this._sourcesView.show(this.editorView.mainElement());
this._debugSidebarResizeWidgetElement = document.createElementWithClass("div", "resizer-widget");
this._debugSidebarResizeWidgetElement.id = "scripts-debug-sidebar-resizer-widget";
@@ -197,33 +189,15 @@ WebInspector.SourcesPanel.prototype = {
return this._paused;
},
- /**
- * @return {!WebInspector.SourcesPanel.DrawerEditor}
- */
- _drawerEditor: function()
- {
- var drawerEditorInstance = WebInspector.moduleManager.instance(WebInspector.DrawerEditor);
- console.assert(drawerEditorInstance instanceof WebInspector.SourcesPanel.DrawerEditor, "WebInspector.DrawerEditor module instance does not use WebInspector.SourcesPanel.DrawerEditor as an implementation. ");
- return /** @type {!WebInspector.SourcesPanel.DrawerEditor} */ (drawerEditorInstance);
- },
-
wasShown: function()
{
WebInspector.context.setFlavor(WebInspector.SourcesPanel, this);
- if (WebInspector.experimentsSettings.editorInDrawer.isEnabled()) {
- this._drawerEditor()._panelWasShown();
- this._sourcesView.show(this.editorView.mainElement());
- }
WebInspector.Panel.prototype.wasShown.call(this);
},
willHide: function()
{
WebInspector.Panel.prototype.willHide.call(this);
- if (WebInspector.experimentsSettings.editorInDrawer.isEnabled()) {
- this._drawerEditor()._panelWillHide();
- this._sourcesView.show(this._drawerEditorView.element);
- }
WebInspector.context.setFlavor(WebInspector.SourcesPanel, null);
},
@@ -380,11 +354,7 @@ WebInspector.SourcesPanel.prototype = {
{
if (this._sourcesView.isShowing())
return;
-
- if (this._shouldShowEditorInDrawer() && !forceShowInPanel)
- this._drawerEditor()._show();
- else
- WebInspector.inspectorView.showPanel("sources");
+ WebInspector.inspectorView.showPanel("sources");
},
/**
@@ -397,14 +367,6 @@ WebInspector.SourcesPanel.prototype = {
},
/**
- * @return {boolean}
- */
- _shouldShowEditorInDrawer: function()
- {
- return WebInspector.experimentsSettings.editorInDrawer.isEnabled() && WebInspector.settings.showEditorInDrawer.get() && WebInspector.inspectorView.isDrawerEditorShown();
- },
-
- /**
* @param {!WebInspector.UISourceCode} uiSourceCode
*/
_revealInNavigator: function(uiSourceCode)
@@ -1238,66 +1200,6 @@ WebInspector.UpgradeFileSystemDropTarget.prototype = {
/**
* @constructor
- * @implements {WebInspector.DrawerEditor}
- */
-WebInspector.SourcesPanel.DrawerEditor = function()
-{
- this._panel = WebInspector.inspectorView.panel("sources");
-}
-
-WebInspector.SourcesPanel.DrawerEditor.prototype = {
- /**
- * @return {!WebInspector.View}
- */
- view: function()
- {
- return this._panel._drawerEditorView;
- },
-
- installedIntoDrawer: function()
- {
- if (this._panel.isShowing())
- this._panelWasShown();
- else
- this._panelWillHide();
- },
-
- _panelWasShown: function()
- {
- WebInspector.inspectorView.setDrawerEditorAvailable(false);
- WebInspector.inspectorView.hideDrawerEditor();
- },
-
- _panelWillHide: function()
- {
- WebInspector.inspectorView.setDrawerEditorAvailable(true);
- if (WebInspector.inspectorView.isDrawerEditorShown())
- WebInspector.inspectorView.showDrawerEditor();
- },
-
- _show: function()
- {
- WebInspector.inspectorView.showDrawerEditor();
- },
-}
-
-/**
- * @constructor
- * @extends {WebInspector.VBox}
- */
-WebInspector.SourcesPanel.DrawerEditorView = function()
-{
- WebInspector.VBox.call(this);
- this.element.id = "drawer-editor-view";
-}
-
-WebInspector.SourcesPanel.DrawerEditorView.prototype = {
- __proto__: WebInspector.VBox.prototype
-}
-
-
-/**
- * @constructor
* @implements {WebInspector.ContextMenu.Provider}
*/
WebInspector.SourcesPanel.ContextMenuProvider = function()
« no previous file with comments | « Source/devtools/front_end/components/InspectorView.js ('k') | Source/devtools/front_end/sources/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698