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

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

Issue 2486073005: DevTools: [Persistence] update source editor tab icons on binding change (Closed)
Patch Set: update tab icons and title Created 4 years, 1 month 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/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 f81cc3edf7da375e66555b754a6a2268abe67159..28e964b874c38b720b3665b214e35f607c0188de 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/TabbedEditorContainer.js
@@ -78,12 +78,10 @@ WebInspector.TabbedEditorContainer = class extends WebInspector.Object {
*/
_onBindingCreated(event) {
var binding = /** @type {!WebInspector.PersistenceBinding} */ (event.data);
+ this._updateFileTitle(binding.network);
+
var networkTabId = this._tabIds.get(binding.network);
var fileSystemTabId = this._tabIds.get(binding.fileSystem);
-
- if (networkTabId)
- this._tabbedPane.changeTabTitle(
- networkTabId, this._titleForFile(binding.fileSystem), this._tooltipForFile(binding.fileSystem));
if (!fileSystemTabId)
return;
@@ -111,9 +109,12 @@ WebInspector.TabbedEditorContainer = class extends WebInspector.Object {
*/
_onBindingRemoved(event) {
var binding = /** @type {!WebInspector.PersistenceBinding} */ (event.data);
+ this._updateFileTitle(binding.network);
+
var networkTabId = this._tabIds.get(binding.network);
if (!networkTabId)
return;
+
var tabIndex = this._tabbedPane.tabIndex(networkTabId);
var wasSelected = this._currentFile === binding.network;
var fileSystemTabId = this._appendFileTab(binding.fileSystem, false, tabIndex);
« 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