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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.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 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 uiSourceCode.name(), [Workspace.projectTypes.Network, Workspace.projectT ypes.ContentScripts], 728 uiSourceCode.name(), [Workspace.projectTypes.Network, Workspace.projectT ypes.ContentScripts],
729 mapFileSystemToNetwork); 729 mapFileSystemToNetwork);
730 730
731 /** 731 /**
732 * @param {?Workspace.UISourceCode} networkUISourceCode 732 * @param {?Workspace.UISourceCode} networkUISourceCode
733 */ 733 */
734 function mapFileSystemToNetwork(networkUISourceCode) { 734 function mapFileSystemToNetwork(networkUISourceCode) {
735 if (!networkUISourceCode) 735 if (!networkUISourceCode)
736 return; 736 return;
737 var fileSystemPath = Persistence.FileSystemWorkspaceBinding.fileSystemPath (uiSourceCode.project().id()); 737 var fileSystemPath = Persistence.FileSystemWorkspaceBinding.fileSystemPath (uiSourceCode.project().id());
738 Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url( ), fileSystemPath, uiSourceCode.url()); 738 Persistence.fileSystemMapping.addMappingForResource(
739 networkUISourceCode.url(), fileSystemPath, uiSourceCode.url());
739 } 740 }
740 } 741 }
741 742
742 /** 743 /**
743 * @param {!Workspace.UISourceCode} networkUISourceCode 744 * @param {!Workspace.UISourceCode} networkUISourceCode
744 */ 745 */
745 mapNetworkToFileSystem(networkUISourceCode) { 746 mapNetworkToFileSystem(networkUISourceCode) {
746 Sources.SelectUISourceCodeForProjectTypesDialog.show( 747 Sources.SelectUISourceCodeForProjectTypesDialog.show(
747 networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetw orkToFileSystem); 748 networkUISourceCode.name(), [Workspace.projectTypes.FileSystem], mapNetw orkToFileSystem);
748 749
749 /** 750 /**
750 * @param {?Workspace.UISourceCode} uiSourceCode 751 * @param {?Workspace.UISourceCode} uiSourceCode
751 */ 752 */
752 function mapNetworkToFileSystem(uiSourceCode) { 753 function mapNetworkToFileSystem(uiSourceCode) {
753 if (!uiSourceCode) 754 if (!uiSourceCode)
754 return; 755 return;
755 var fileSystemPath = Persistence.FileSystemWorkspaceBinding.fileSystemPath (uiSourceCode.project().id()); 756 var fileSystemPath = Persistence.FileSystemWorkspaceBinding.fileSystemPath (uiSourceCode.project().id());
756 Workspace.fileSystemMapping.addMappingForResource(networkUISourceCode.url( ), fileSystemPath, uiSourceCode.url()); 757 Persistence.fileSystemMapping.addMappingForResource(
758 networkUISourceCode.url(), fileSystemPath, uiSourceCode.url());
757 } 759 }
758 } 760 }
759 761
760 /** 762 /**
761 * @param {!Workspace.UISourceCode} uiSourceCode 763 * @param {!Workspace.UISourceCode} uiSourceCode
762 */ 764 */
763 _removeNetworkMapping(uiSourceCode) { 765 _removeNetworkMapping(uiSourceCode) {
764 Workspace.fileSystemMapping.removeMappingForURL(uiSourceCode.url()); 766 Persistence.fileSystemMapping.removeMappingForURL(uiSourceCode.url());
765 } 767 }
766 768
767 /** 769 /**
768 * @param {!UI.ContextMenu} contextMenu 770 * @param {!UI.ContextMenu} contextMenu
769 * @param {!Workspace.UISourceCode} uiSourceCode 771 * @param {!Workspace.UISourceCode} uiSourceCode
770 */ 772 */
771 _appendUISourceCodeMappingItems(contextMenu, uiSourceCode) { 773 _appendUISourceCodeMappingItems(contextMenu, uiSourceCode) {
772 Sources.NavigatorView.appendAddFolderItem(contextMenu); 774 Sources.NavigatorView.appendAddFolderItem(contextMenu);
773 775
774 if (Runtime.experiments.isEnabled('persistence2')) 776 if (Runtime.experiments.isEnabled('persistence2'))
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1295 */ 1297 */
1296 willHide() { 1298 willHide() {
1297 UI.inspectorView.setDrawerMinimized(false); 1299 UI.inspectorView.setDrawerMinimized(false);
1298 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance())); 1300 setImmediate(() => Sources.SourcesPanel.updateResizerAndSidebarButtons(Sourc es.SourcesPanel.instance()));
1299 } 1301 }
1300 1302
1301 _showViewInWrapper() { 1303 _showViewInWrapper() {
1302 this._view.show(this.element); 1304 this._view.show(this.element);
1303 } 1305 }
1304 }; 1306 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698