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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js

Issue 2784733002: DevTools: prepare tests for Persistence2.0 release (Closed)
Patch Set: address comments + three special tests Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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
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');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698