| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 this._projectDelegate.reset(); | 116 this._projectDelegate.reset(); |
| 117 }, | 117 }, |
| 118 | 118 |
| 119 dispose: function() | 119 dispose: function() |
| 120 { | 120 { |
| 121 this._workspace.removeProject(this._projectId); | 121 this._workspace.removeProject(this._projectId); |
| 122 } | 122 } |
| 123 } | 123 } |
| 124 | 124 |
| 125 /** | 125 /** |
| 126 * @param {string} projectId |
| 127 * @returns {number} |
| 128 */ |
| 129 WebInspector.DefaultScriptMapping.targetIdFromProjectId = function(projectId) |
| 130 { |
| 131 return projectId.startsWith("debugger:") ? parseInt(projectId.substring(9),
10) : -1; |
| 132 } |
| 133 |
| 134 /** |
| 126 * @constructor | 135 * @constructor |
| 127 * @param {!WebInspector.Workspace} workspace | 136 * @param {!WebInspector.Workspace} workspace |
| 128 * @param {string} id | 137 * @param {string} id |
| 129 * @param {!WebInspector.projectTypes} type | 138 * @param {!WebInspector.projectTypes} type |
| 130 * @extends {WebInspector.ContentProviderBasedProjectDelegate} | 139 * @extends {WebInspector.ContentProviderBasedProjectDelegate} |
| 131 */ | 140 */ |
| 132 WebInspector.DebuggerProjectDelegate = function(workspace, id, type) | 141 WebInspector.DebuggerProjectDelegate = function(workspace, id, type) |
| 133 { | 142 { |
| 134 WebInspector.ContentProviderBasedProjectDelegate.call(this, workspace, id, t
ype); | 143 WebInspector.ContentProviderBasedProjectDelegate.call(this, workspace, id, t
ype); |
| 135 } | 144 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 151 { | 160 { |
| 152 var contentProvider = script.isInlineScript() ? new WebInspector.Concate
natedScriptsContentProvider([script]) : script; | 161 var contentProvider = script.isInlineScript() ? new WebInspector.Concate
natedScriptsContentProvider([script]) : script; |
| 153 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL); | 162 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL); |
| 154 var name = splitURL[splitURL.length - 1]; | 163 var name = splitURL[splitURL.length - 1]; |
| 155 name = "VM" + script.scriptId + (name ? " " + name : ""); | 164 name = "VM" + script.scriptId + (name ? " " + name : ""); |
| 156 return this.addContentProvider("", name, script.sourceURL, contentProvid
er); | 165 return this.addContentProvider("", name, script.sourceURL, contentProvid
er); |
| 157 }, | 166 }, |
| 158 | 167 |
| 159 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype | 168 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype |
| 160 } | 169 } |
| OLD | NEW |