Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js |
| index ceaf37b22ca839073806e37a4f5beeb4c28f2d0a..441f0b2b77a684f28c7b65114987e0a4e31f0de9 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js |
| @@ -61,6 +61,8 @@ WebInspector.NavigatorView = function() |
| WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.Events.FrameNavigated, this._frameNavigated, this); |
| WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.Events.FrameDetached, this._frameDetached, this); |
| WebInspector.targetManager.observeTargets(this); |
| + WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.BindingCreated, this._onBindingCreated, this); |
| + WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.BindingRemoved, this._onBindingRemoved, this); |
| this._resetWorkspace(WebInspector.workspace); |
| } |
| @@ -152,6 +154,24 @@ WebInspector.NavigatorView.appendSearchItem = function(contextMenu, path) |
| WebInspector.NavigatorView.prototype = { |
| /** |
| + * @param {!WebInspector.Event} event |
| + */ |
| + _onBindingCreated: function(event) |
| + { |
| + var binding = /** @type {!WebInspector.PersistenceBinding} */(event.data); |
| + this._removeUISourceCode(binding.network); |
|
dgozman
2016/09/22 19:55:54
TODO(lushnikov): remove this after adding a green
lushnikov
2016/09/23 21:56:13
Done.
|
| + }, |
| + |
| + /** |
| + * @param {!WebInspector.Event} event |
| + */ |
| + _onBindingRemoved: function(event) |
| + { |
| + var binding = /** @type {!WebInspector.PersistenceBinding} */(event.data); |
| + this._addUISourceCode(binding.network); |
| + }, |
| + |
| + /** |
| * @override |
| */ |
| focus: function() |
| @@ -210,6 +230,10 @@ WebInspector.NavigatorView.prototype = { |
| if (!this.accept(uiSourceCode)) |
| return; |
| + var binding = WebInspector.persistence.binding(uiSourceCode); |
| + if (binding && binding.network === uiSourceCode) |
| + return; |
| + |
| var isFromSourceMap = uiSourceCode.contentType().isFromSourceMap(); |
| var path; |
| if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem) |
| @@ -439,6 +463,9 @@ WebInspector.NavigatorView.prototype = { |
| */ |
| revealUISourceCode: function(uiSourceCode, select) |
| { |
| + var binding = WebInspector.persistence.binding(uiSourceCode); |
| + if (binding && binding.network === uiSourceCode) |
| + uiSourceCode = binding.persistent; |
| var node = this._uiSourceCodeNodes.get(uiSourceCode); |
| if (!node) |
| return; |
| @@ -1262,7 +1289,7 @@ WebInspector.NavigatorUISourceCodeTreeNode.prototype = { |
| return; |
| var titleText = this._uiSourceCode.displayName(); |
| - if (!ignoreIsDirty && (this._uiSourceCode.isDirty() || this._uiSourceCode.hasUnsavedCommittedChanges())) |
| + if (!ignoreIsDirty && (this._uiSourceCode.isDirty() || WebInspector.persistence.hasUnsavedCommittedChanges(this._uiSourceCode))) |
| titleText = "*" + titleText; |
| this._treeElement.title = titleText; |