| 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 binding.fileSystem.removeEventListener( | 120 binding.fileSystem.removeEventListener( |
| 121 Workspace.UISourceCode.Events.TitleChanged, this._onFileSystemUISourceCo
deRenamed, this); | 121 Workspace.UISourceCode.Events.TitleChanged, this._onFileSystemUISourceCo
deRenamed, this); |
| 122 | 122 |
| 123 this._onBindingRemoved.call(null, binding); | 123 this._onBindingRemoved.call(null, binding); |
| 124 } | 124 } |
| 125 | 125 |
| 126 /** | 126 /** |
| 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.target); | 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 Common.EventTarget.removeEventListeners(this._eventListeners); | 137 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 138 } | 138 } |
| 139 }; | 139 }; |
| 140 | 140 |
| 141 Persistence.DefaultMapping._binding = Symbol('DefaultMapping.Binding'); | 141 Persistence.DefaultMapping._binding = Symbol('DefaultMapping.Binding'); |
| OLD | NEW |