| 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 d83b72d604334f666186c9c5e7ce7044c38b10a3..de3a7b4cb200e0d1c4d8f41100d8c7ec626d1bc7 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
|
| @@ -229,7 +229,10 @@ WebInspector.SourcesPanel.prototype = {
|
| {
|
| if (WebInspector.SourcesPanel.WrapperView.isShowing())
|
| return true;
|
| - return this === WebInspector.inspectorView.setCurrentPanel(this);
|
| + if (!WebInspector.inspectorView.canSelectPanel("sources"))
|
| + return false;
|
| + WebInspector.viewManager.showView("sources");
|
| + return true;
|
| },
|
|
|
| onResize: function()
|
| @@ -254,7 +257,7 @@ WebInspector.SourcesPanel.prototype = {
|
| {
|
| var details = /** @type {!WebInspector.DebuggerPausedDetails} */ (event.data);
|
| if (!this._paused)
|
| - WebInspector.inspectorView.setCurrentPanel(this);
|
| + this._setAsCurrentPanel();
|
|
|
| if (WebInspector.context.flavor(WebInspector.Target) === details.target())
|
| this._showDebuggerPausedDetails(details);
|
| @@ -340,7 +343,7 @@ WebInspector.SourcesPanel.prototype = {
|
| {
|
| if (WebInspector.SourcesPanel.WrapperView._instance && WebInspector.SourcesPanel.WrapperView._instance.isShowing())
|
| return;
|
| - WebInspector.inspectorView.setCurrentPanel(this);
|
| + this._setAsCurrentPanel();
|
| },
|
|
|
| /**
|
| @@ -1102,9 +1105,12 @@ WebInspector.SourcesPanel.prototype = {
|
| this._splitWidget.setSidebarWidget(this.sidebarPaneView);
|
| },
|
|
|
| + /**
|
| + * @return {!Promise}
|
| + */
|
| _setAsCurrentPanel: function()
|
| {
|
| - WebInspector.inspectorView.setCurrentPanel(this);
|
| + return WebInspector.viewManager.showView("sources");
|
| },
|
|
|
| /**
|
| @@ -1238,8 +1244,7 @@ WebInspector.SourcesPanel.DebuggerPausedDetailsRevealer.prototype = {
|
| */
|
| reveal: function(object)
|
| {
|
| - WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
|
| - return Promise.resolve();
|
| + return WebInspector.SourcesPanel.instance()._setAsCurrentPanel();
|
| }
|
| }
|
|
|
| @@ -1321,11 +1326,6 @@ WebInspector.SourcesPanel.DebuggingActionDelegate.prototype = {
|
| }
|
| }
|
|
|
| -WebInspector.SourcesPanel.show = function()
|
| -{
|
| - WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.instance());
|
| -}
|
| -
|
| /**
|
| * @return {!WebInspector.SourcesPanel}
|
| */
|
| @@ -1362,7 +1362,7 @@ WebInspector.SourcesPanel.WrapperView = function()
|
| WebInspector.SourcesPanel.WrapperView.prototype = {
|
| wasShown: function()
|
| {
|
| - if (WebInspector.inspectorView.currentPanel() && WebInspector.inspectorView.currentPanel().name !== "sources")
|
| + if (!WebInspector.SourcesPanel.instance().isShowing())
|
| this._showViewInWrapper();
|
| else
|
| WebInspector.inspectorView.setDrawerMinimized(true);
|
|
|