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

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

Issue 2238003002: DevTools: migrate sources panel sidebar to views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 years, 4 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: third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
index 7178c35048f11183bf749f84f20f2b6da2aa1bbb..fcbe43491f763e5a92d84b52267516630c1838df 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
@@ -214,6 +214,7 @@ WebInspector.TabbedEditorContainer.prototype = {
var previousView = this._currentView;
this._currentView = this.visibleView;
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, this._currentView instanceof WebInspector.UISourceCodeFrame ? this._currentView : null);
this._addViewListeners();
var eventData = {
@@ -249,9 +250,12 @@ WebInspector.TabbedEditorContainer.prototype = {
// FIXME: this should be replaced with common Save/Discard/Cancel dialog.
if (!shouldPrompt || confirm(WebInspector.UIString("Are you sure you want to close unsaved file: %s?", uiSourceCode.name()))) {
uiSourceCode.resetWorkingCopy();
+ var previousView = this._currentView;
if (nextTabId)
this._tabbedPane.selectTab(nextTabId, true);
this._tabbedPane.closeTab(id, true);
+ if (WebInspector.context.flavor(WebInspector.UISourceCodeFrame) === previousView)
+ WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, null);
return true;
}
return false;

Powered by Google App Engine
This is Rietveld 408576698