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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 this._appendRemoteObjectItems(contextMenu, target); 736 this._appendRemoteObjectItems(contextMenu, target);
737 this._appendNetworkRequestItems(contextMenu, target); 737 this._appendNetworkRequestItems(contextMenu, target);
738 } 738 }
739 739
740 /** 740 /**
741 * @param {!Workspace.UISourceCode} uiSourceCode 741 * @param {!Workspace.UISourceCode} uiSourceCode
742 */ 742 */
743 mapFileSystemToNetwork(uiSourceCode) { 743 mapFileSystemToNetwork(uiSourceCode) {
744 Sources.SelectUISourceCodeForProjectTypesDialog.show( 744 Sources.SelectUISourceCodeForProjectTypesDialog.show(
745 uiSourceCode.name(), [Workspace.projectTypes.Network, Workspace.projectT ypes.ContentScripts], 745 uiSourceCode.name(), [Workspace.projectTypes.Network, Workspace.projectT ypes.ContentScripts],
746 mapFileSystemToNetwork.bind(this)); 746 mapFileSystemToNetwork);
747 747
748 /** 748 /**
749 * @param {?Workspace.UISourceCode} networkUISourceCode 749 * @param {?Workspace.UISourceCode} networkUISourceCode
750 * @this {Sources.SourcesPanel}
751 */ 750 */
752 function mapFileSystemToNetwork(networkUISourceCode) { 751 function mapFileSystemToNetwork(networkUISourceCode) {
753 if (!networkUISourceCode) 752 if (!networkUISourceCode)
754 return; 753 return;
755 this._networkMapping.addMapping(networkUISourceCode, uiSourceCode); 754 var fileSystemPath = Bindings.FileSystemWorkspaceBinding.fileSystemPath(ui SourceCode.project().id());
755 Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url( ), fileSystemPath, uiSourceCode.url());
756 } 756 }
757 } 757 }
758 758
759 /** 759 /**
760 * @param {!Workspace.UISourceCode} networkUISourceCode 760 * @param {!Workspace.UISourceCode} networkUISourceCode
761 */ 761 */
762 mapNetworkToFileSystem(networkUISourceCode) { 762 mapNetworkToFileSystem(networkUISourceCode) {
763 Sources.SelectUISourceCodeForProjectTypesDialog.show( 763 Sources.SelectUISourceCodeForProjectTypesDialog.show(
764 networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetw orkToFileSystem.bind(this)); 764 networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetw orkToFileSystem);
765 765
766 /** 766 /**
767 * @param {?Workspace.UISourceCode} uiSourceCode 767 * @param {?Workspace.UISourceCode} uiSourceCode
768 * @this {Sources.SourcesPanel}
769 */ 768 */
770 function mapNetworkToFileSystem(uiSourceCode) { 769 function mapNetworkToFileSystem(uiSourceCode) {
771 if (!uiSourceCode) 770 if (!uiSourceCode)
772 return; 771 return;
773 this._networkMapping.addMapping(networkUISourceCode, uiSourceCode); 772 var fileSystemPath = Bindings.FileSystemWorkspaceBinding.fileSystemPath(ui SourceCode.project().id());
773 Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url( ), fileSystemPath, uiSourceCode.url());
774 } 774 }
775 } 775 }
776 776
777 /** 777 /**
778 * @param {!Workspace.UISourceCode} uiSourceCode 778 * @param {!Workspace.UISourceCode} uiSourceCode
779 */ 779 */
780 _removeNetworkMapping(uiSourceCode) { 780 _removeNetworkMapping(uiSourceCode) {
781 this._networkMapping.removeMapping(uiSourceCode); 781 Workspace.fileSystemMapping.removeMappingForURL(uiSourceCode.url());
782 } 782 }
783 783
784 /** 784 /**
785 * @param {!UI.ContextMenu} contextMenu 785 * @param {!UI.ContextMenu} contextMenu
786 * @param {!Workspace.UISourceCode} uiSourceCode 786 * @param {!Workspace.UISourceCode} uiSourceCode
787 */ 787 */
788 _appendUISourceCodeMappingItems(contextMenu, uiSourceCode) { 788 _appendUISourceCodeMappingItems(contextMenu, uiSourceCode) {
789 Sources.NavigatorView.appendAddFolderItem(contextMenu); 789 Sources.NavigatorView.appendAddFolderItem(contextMenu);
790 790
791 if (Runtime.experiments.isEnabled('persistence2')) 791 if (Runtime.experiments.isEnabled('persistence2'))
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 */ 1323 */
1324 willHide() { 1324 willHide() {
1325 UI.inspectorView.setDrawerMinimized(false); 1325 UI.inspectorView.setDrawerMinimized(false);
1326 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance())); 1326 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance()));
1327 } 1327 }
1328 1328
1329 _showViewInWrapper() { 1329 _showViewInWrapper() {
1330 this._view.show(this.element); 1330 this._view.show(this.element);
1331 } 1331 }
1332 }; 1332 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698