| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Persistence.DefaultMapping = class { | 7 Persistence.DefaultMapping = class { |
| 8 /** | 8 /** |
| 9 * @param {!Workspace.Workspace} workspace | 9 * @param {!Workspace.Workspace} workspace |
| 10 * @param {!Workspace.FileSystemMapping} fileSystemMapping | 10 * @param {!Workspace.FileSystemMapping} fileSystemMapping |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 * @param {!Common.Event} event | 127 * @param {!Common.Event} event |
| 128 */ | 128 */ |
| 129 _onFileSystemUISourceCodeRenamed(event) { | 129 _onFileSystemUISourceCodeRenamed(event) { |
| 130 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 130 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| 131 var binding = uiSourceCode[Persistence.DefaultMapping._binding]; | 131 var binding = uiSourceCode[Persistence.DefaultMapping._binding]; |
| 132 this._unbind(binding.network); | 132 this._unbind(binding.network); |
| 133 this._bind(binding.network); | 133 this._bind(binding.network); |
| 134 } | 134 } |
| 135 | 135 |
| 136 dispose() { | 136 dispose() { |
| 137 for (var binding of this._bindings.valuesArray()) |
| 138 this._unbind(binding.network); |
| 137 Common.EventTarget.removeEventListeners(this._eventListeners); | 139 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 138 } | 140 } |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 Persistence.DefaultMapping._binding = Symbol('DefaultMapping.Binding'); | 143 Persistence.DefaultMapping._binding = Symbol('DefaultMapping.Binding'); |
| OLD | NEW |