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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2506463002: DevTools: remove Bindings.NetworkMapping.addMapping/removeMapping methods (Closed)
Patch Set: rebaseline Created 4 years, 1 month 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/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index 2b371684dc75d8cbb2652219b881cb045c0e431a..92a6d0350dae8fc6e77fa7b02819892007c6f412 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -743,16 +743,16 @@ Sources.SourcesPanel = class extends UI.Panel {
mapFileSystemToNetwork(uiSourceCode) {
Sources.SelectUISourceCodeForProjectTypesDialog.show(
uiSourceCode.name(), [Workspace.projectTypes.Network, Workspace.projectTypes.ContentScripts],
- mapFileSystemToNetwork.bind(this));
+ mapFileSystemToNetwork);
/**
* @param {?Workspace.UISourceCode} networkUISourceCode
- * @this {Sources.SourcesPanel}
*/
function mapFileSystemToNetwork(networkUISourceCode) {
if (!networkUISourceCode)
return;
- this._networkMapping.addMapping(networkUISourceCode, uiSourceCode);
+ var fileSystemPath = Bindings.FileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id());
+ Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url(), fileSystemPath, uiSourceCode.url());
}
}
@@ -761,16 +761,16 @@ Sources.SourcesPanel = class extends UI.Panel {
*/
mapNetworkToFileSystem(networkUISourceCode) {
Sources.SelectUISourceCodeForProjectTypesDialog.show(
- networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetworkToFileSystem.bind(this));
+ networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetworkToFileSystem);
/**
* @param {?Workspace.UISourceCode} uiSourceCode
- * @this {Sources.SourcesPanel}
*/
function mapNetworkToFileSystem(uiSourceCode) {
if (!uiSourceCode)
return;
- this._networkMapping.addMapping(networkUISourceCode, uiSourceCode);
+ var fileSystemPath = Bindings.FileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id());
+ Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url(), fileSystemPath, uiSourceCode.url());
}
}
@@ -778,7 +778,7 @@ Sources.SourcesPanel = class extends UI.Panel {
* @param {!Workspace.UISourceCode} uiSourceCode
*/
_removeNetworkMapping(uiSourceCode) {
- this._networkMapping.removeMapping(uiSourceCode);
+ Workspace.fileSystemMapping.removeMappingForURL(uiSourceCode.url());
}
/**

Powered by Google App Engine
This is Rietveld 408576698