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

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

Issue 2157283002: DevTools: remove WI.SourcesView._currentUISourceCode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js » ('j') | 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/SourcesView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
index 82d486e3a8056f8f2fe1c277b4c21bc3517f70f7..4f8c594b718f6e97447be0035f41f8837a546f97 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
@@ -191,7 +191,7 @@ WebInspector.SourcesView.prototype = {
*/
currentUISourceCode: function()
{
- return this._currentUISourceCode;
+ return this._editorContainer.currentFile();
},
/**
@@ -199,7 +199,7 @@ WebInspector.SourcesView.prototype = {
*/
_onCloseEditorTab: function(event)
{
- var uiSourceCode = this.currentUISourceCode();
+ var uiSourceCode = this._editorContainer.currentFile();
if (!uiSourceCode)
return false;
this._editorContainer.closeFile(uiSourceCode);
@@ -242,7 +242,7 @@ WebInspector.SourcesView.prototype = {
return;
this._editorContainer.addUISourceCode(uiSourceCode);
// Replace debugger script-based uiSourceCode with a network-based one.
- var currentUISourceCode = this._currentUISourceCode;
+ var currentUISourceCode = this._editorContainer.currentFile();
if (!currentUISourceCode)
return;
var networkURL = WebInspector.networkMapping.networkURL(uiSourceCode);
@@ -426,10 +426,8 @@ WebInspector.SourcesView.prototype = {
this._historyManager.removeHistoryForSourceCode(uiSourceCode);
var wasSelected = false;
- if (this._currentUISourceCode === uiSourceCode) {
- delete this._currentUISourceCode;
+ if (!this._editorContainer.currentFile())
wasSelected = true;
- }
// SourcesNavigator does not need to update on EditorClosed.
this._updateScriptViewToolbarItems();
@@ -446,7 +444,6 @@ WebInspector.SourcesView.prototype = {
*/
_editorSelected: function(event)
{
- this._currentUISourceCode = /** @type {!WebInspector.UISourceCode} */(event.data.currentFile);
var previousSourceFrame = event.data.previousView instanceof WebInspector.UISourceCodeFrame ? event.data.previousView : null;
if (previousSourceFrame)
previousSourceFrame.setSearchableView(null);
@@ -458,7 +455,7 @@ WebInspector.SourcesView.prototype = {
this._searchableView.refreshSearch();
this._updateScriptViewToolbarItems();
- this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSelected, this._currentUISourceCode);
+ this.dispatchEventToListeners(WebInspector.SourcesView.Events.EditorSelected, this._editorContainer.currentFile());
},
/**
@@ -626,7 +623,7 @@ WebInspector.SourcesView.prototype = {
*/
_showGoToLineDialog: function(event)
{
- if (this._currentUISourceCode)
+ if (this._editorContainer.currentFile())
this.showOpenResourceDialog(":");
return true;
},
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698