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

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

Issue 2868543002: DevTools: move FileSystemMapping under persistence/ module (Closed)
Patch Set: fix copyright Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js b/third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js
index a5612b4163a9e53c232667a363ddcec901582224..761c21e4e2d547700e86ec1f12fddcf93be1c422 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/DefaultMapping.js
@@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
+ * @implements {Persistence.MappingSystem}
* @unrestricted
*/
Persistence.DefaultMapping = class {
/**
* @param {!Workspace.Workspace} workspace
- * @param {!Workspace.FileSystemMapping} fileSystemMapping
+ * @param {!Persistence.FileSystemMapping} fileSystemMapping
* @param {function(!Persistence.PersistenceBinding)} onBindingCreated
* @param {function(!Persistence.PersistenceBinding)} onBindingRemoved
*/
@@ -23,8 +24,10 @@ Persistence.DefaultMapping = class {
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeAdded, this._onUISourceCodeAdded, this),
workspace.addEventListener(Workspace.Workspace.Events.UISourceCodeRemoved, this._onUISourceCodeRemoved, this),
workspace.addEventListener(Workspace.Workspace.Events.ProjectRemoved, this._onProjectRemoved, this),
- this._fileSystemMapping.addEventListener(Workspace.FileSystemMapping.Events.FileMappingAdded, this._remap, this),
- this._fileSystemMapping.addEventListener(Workspace.FileSystemMapping.Events.FileMappingRemoved, this._remap, this)
+ this._fileSystemMapping.addEventListener(
+ Persistence.FileSystemMapping.Events.FileMappingAdded, this._remap, this),
+ this._fileSystemMapping.addEventListener(
+ Persistence.FileSystemMapping.Events.FileMappingRemoved, this._remap, this)
];
this._remap();
}
@@ -133,6 +136,9 @@ Persistence.DefaultMapping = class {
this._bind(binding.network);
}
+ /**
+ * @override
+ */
dispose() {
for (var binding of this._bindings.valuesArray())
this._unbind(binding.network);

Powered by Google App Engine
This is Rietveld 408576698