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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js

Issue 2422803002: DevTools: prefix node.js scripts's sourceURL with "file://" to make them a valid url (Closed)
Patch Set: WI.ParsedURL.platformPathToURL Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 23 matching lines...) Expand all
34 * @implements {WebInspector.ContentProvider} 34 * @implements {WebInspector.ContentProvider}
35 * @param {!WebInspector.Project} project 35 * @param {!WebInspector.Project} project
36 * @param {string} url 36 * @param {string} url
37 * @param {!WebInspector.ResourceType} contentType 37 * @param {!WebInspector.ResourceType} contentType
38 */ 38 */
39 WebInspector.UISourceCode = function(project, url, contentType) 39 WebInspector.UISourceCode = function(project, url, contentType)
40 { 40 {
41 this._project = project; 41 this._project = project;
42 this._url = url; 42 this._url = url;
43 43
44 var pathComponents = WebInspector.ParsedURL.splitURLIntoPathComponents(url); 44 var parsedURL = url.asParsedURL();
45 this._origin = pathComponents[0]; 45 if (parsedURL) {
46 this._parentURL = pathComponents.slice(0, -1).join("/"); 46 this._origin = parsedURL.securityOrigin();
47 this._name = pathComponents[pathComponents.length - 1]; 47 this._parentURL = this._origin + parsedURL.folderPathComponents;
48 this._name = parsedURL.lastPathComponent;
49 if (parsedURL.queryParams)
50 this._name += "?" + parsedURL.queryParams;
51 } else {
52 this._origin = "";
53 this._parentURL = "";
54 this._name = url;
55 }
48 56
49 this._contentType = contentType; 57 this._contentType = contentType;
50 /** @type {?function(?string)} */ 58 /** @type {?function(?string)} */
51 this._requestContentCallback = null; 59 this._requestContentCallback = null;
52 /** @type {?Promise<?string>} */ 60 /** @type {?Promise<?string>} */
53 this._requestContentPromise = null; 61 this._requestContentPromise = null;
54 /** @type {!Map<string, !Map<number, !WebInspector.UISourceCode.LineMarker>> } */ 62 /** @type {!Map<string, !Map<number, !WebInspector.UISourceCode.LineMarker>> } */
55 this._lineDecorations = new Map(); 63 this._lineDecorations = new Map();
56 64
57 /** @type {!Array.<!WebInspector.Revision>} */ 65 /** @type {!Array.<!WebInspector.Revision>} */
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 /** 983 /**
976 * @constructor 984 * @constructor
977 * @param {?Date} modificationTime 985 * @param {?Date} modificationTime
978 * @param {?number} contentSize 986 * @param {?number} contentSize
979 */ 987 */
980 WebInspector.UISourceCodeMetadata = function(modificationTime, contentSize) 988 WebInspector.UISourceCodeMetadata = function(modificationTime, contentSize)
981 { 989 {
982 this.modificationTime = modificationTime; 990 this.modificationTime = modificationTime;
983 this.contentSize = contentSize; 991 this.contentSize = contentSize;
984 } 992 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystemManager.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698