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

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

Issue 2889013002: DevTools: introduce uiSourceCode.mimeType() method (Closed)
Patch Set: address comments 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 /** 232 /**
233 * @return {string} 233 * @return {string}
234 */ 234 */
235 fileSystemPath() { 235 fileSystemPath() {
236 return this._fileSystemPath; 236 return this._fileSystemPath;
237 } 237 }
238 238
239 /** 239 /**
240 * @override
241 * @param {!Workspace.UISourceCode} uiSourceCode
242 * @return {string}
243 */
244 mimeType(uiSourceCode) {
245 return Common.ResourceType.mimeFromURL(uiSourceCode.url()) || 'text/plain';
246 }
247
248 /**
240 * @return {!Array<string>} 249 * @return {!Array<string>}
241 */ 250 */
242 initialGitFolders() { 251 initialGitFolders() {
243 return this._fileSystem.initialGitFolders().map(folder => this._fileSystemPa th + '/' + folder); 252 return this._fileSystem.initialGitFolders().map(folder => this._fileSystemPa th + '/' + folder);
244 } 253 }
245 254
246 /** 255 /**
247 * @param {!Workspace.UISourceCode} uiSourceCode 256 * @param {!Workspace.UISourceCode} uiSourceCode
248 * @return {string} 257 * @return {string}
249 */ 258 */
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata] = null; 592 uiSourceCode[Persistence.FileSystemWorkspaceBinding._metadata] = null;
584 uiSourceCode.checkContentUpdated(); 593 uiSourceCode.checkContentUpdated();
585 } 594 }
586 595
587 dispose() { 596 dispose() {
588 this.removeProject(); 597 this.removeProject();
589 } 598 }
590 }; 599 };
591 600
592 Persistence.FileSystemWorkspaceBinding._metadata = Symbol('FileSystemWorkspaceBi nding.Metadata'); 601 Persistence.FileSystemWorkspaceBinding._metadata = Symbol('FileSystemWorkspaceBi nding.Metadata');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698