OLD | NEW |
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 contentType: function() | 213 contentType: function() |
214 { | 214 { |
215 return this._contentType; | 215 return this._contentType; |
216 }, | 216 }, |
217 | 217 |
218 /** | 218 /** |
219 * @return {?WebInspector.ScriptFile} | 219 * @return {?WebInspector.ScriptFile} |
220 */ | 220 */ |
221 scriptFile: function() | 221 scriptFile: function() |
222 { | 222 { |
223 return this._scriptFile; | 223 if (this._sourceMapping instanceof WebInspector.SourceMappingWithScriptF
ile) { |
| 224 var mapping = /** @type {!WebInspector.SourceMappingWithScriptFile}
*/ (this._sourceMapping); |
| 225 return mapping.scriptFile(this); |
| 226 } |
| 227 return null; |
224 }, | 228 }, |
225 | 229 |
226 /** | 230 /** |
227 * @param {?WebInspector.ScriptFile} scriptFile | |
228 */ | |
229 setScriptFile: function(scriptFile) | |
230 { | |
231 this._scriptFile = scriptFile; | |
232 }, | |
233 | |
234 /** | |
235 * @return {!WebInspector.Project} | 231 * @return {!WebInspector.Project} |
236 */ | 232 */ |
237 project: function() | 233 project: function() |
238 { | 234 { |
239 return this._project; | 235 return this._project; |
240 }, | 236 }, |
241 | 237 |
242 /** | 238 /** |
243 * @param {function(?Date, ?number)} callback | 239 * @param {function(?Date, ?number)} callback |
244 */ | 240 */ |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1000 function persist() | 996 function persist() |
1001 { | 997 { |
1002 window.localStorage[key] = this._content; | 998 window.localStorage[key] = this._content; |
1003 window.localStorage["revision-history"] = JSON.stringify(registry); | 999 window.localStorage["revision-history"] = JSON.stringify(registry); |
1004 } | 1000 } |
1005 | 1001 |
1006 // Schedule async storage. | 1002 // Schedule async storage. |
1007 setTimeout(persist.bind(this), 0); | 1003 setTimeout(persist.bind(this), 0); |
1008 } | 1004 } |
1009 } | 1005 } |
OLD | NEW |