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

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

Issue 2376123002: [DevTools] Remove sidebar buttons from Quick Source. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index c02ea12216eda0fd8c6b6d96b84fa775492dacdb..2bc4d0ed2a5160b729d2fb8cd349843ecbceae6d 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -78,7 +78,10 @@ WebInspector.SourcesPanel = function()
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));
- this.editorView.setMainWidget(this._sourcesView);
+
+ this._toggleNavigatorSidebarButton = this.editorView.createShowHideSidebarButton("navigator");
+ this._toggleDebuggerSidebarButton = this._splitWidget.createShowHideSidebarButton("debugger");
+ this._showSourcesViewInPanel();
lushnikov 2016/09/28 21:22:49 you don't need this call
dgozman 2016/09/28 23:06:50 I am worried something below depends on SourcesVie
this._editorChanged(this._sourcesView.currentUISourceCode());
this._threadsSidebarPane = null;
@@ -88,10 +91,6 @@ WebInspector.SourcesPanel = function()
this._callstackPane = self.runtime.sharedInstance(WebInspector.CallStackSidebarPane);
this._callstackPane.registerShortcuts(this.registerShortcuts.bind(this));
- this._sourcesView.leftToolbar().appendToolbarItem(this.editorView.createShowHideSidebarButton("navigator"));
- this._toggleDebuggerSidebarButton = this._splitWidget.createShowHideSidebarButton("debugger");
- this._sourcesView.rightToolbar().appendToolbarItem(this._toggleDebuggerSidebarButton);
-
WebInspector.moduleSetting("sidebarPosition").addChangeListener(this._updateSidebarPosition.bind(this));
this._updateSidebarPosition();
@@ -188,7 +187,7 @@ WebInspector.SourcesPanel.prototype = {
WebInspector.inspectorView.setDrawerMinimized(true);
WebInspector.SourcesPanel.updateResizer(this);
}
- this.editorView.setMainWidget(this._sourcesView);
+ this._showSourcesViewInPanel();
},
willHide: function()
@@ -202,6 +201,15 @@ WebInspector.SourcesPanel.prototype = {
}
},
+ _showSourcesViewInPanel: function()
+ {
+ this._sourcesView.leftToolbar().removeToolbarItems();
+ this._sourcesView.leftToolbar().appendToolbarItem(this._toggleNavigatorSidebarButton);
+ this._sourcesView.rightToolbar().removeToolbarItems();
+ this._sourcesView.rightToolbar().appendToolbarItem(this._toggleDebuggerSidebarButton);
+ this.editorView.setMainWidget(this._sourcesView);
+ },
+
/**
* @override
* @param {string} locationName
@@ -1355,6 +1363,8 @@ WebInspector.SourcesPanel.WrapperView.prototype = {
_showViewInWrapper: function()
{
+ this._view.leftToolbar().removeToolbarItems();
+ this._view.rightToolbar().removeToolbarItems();
this._view.show(this.element);
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698