| 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 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 var splitURL = sourceURL.substring(snippetPrefix.length).split("_"); | 391 var splitURL = sourceURL.substring(snippetPrefix.length).split("_"); |
| 392 var snippetId = splitURL[0]; | 392 var snippetId = splitURL[0]; |
| 393 return snippetId; | 393 return snippetId; |
| 394 }, | 394 }, |
| 395 | 395 |
| 396 __proto__: WebInspector.Object.prototype | 396 __proto__: WebInspector.Object.prototype |
| 397 } | 397 } |
| 398 | 398 |
| 399 /** | 399 /** |
| 400 * @constructor | 400 * @constructor |
| 401 * @implements {WebInspector.ScriptSourceMapping} | 401 * @implements {WebInspector.DebuggerSourceMapping} |
| 402 * @param {!WebInspector.Target} target | 402 * @param {!WebInspector.Target} target |
| 403 * @param {!WebInspector.ScriptSnippetModel} scriptSnippetModel | 403 * @param {!WebInspector.ScriptSnippetModel} scriptSnippetModel |
| 404 */ | 404 */ |
| 405 WebInspector.SnippetScriptMapping = function(target, scriptSnippetModel) | 405 WebInspector.SnippetScriptMapping = function(target, scriptSnippetModel) |
| 406 { | 406 { |
| 407 this._target = target; | 407 this._target = target; |
| 408 this._scriptSnippetModel = scriptSnippetModel; | 408 this._scriptSnippetModel = scriptSnippetModel; |
| 409 /** @type {!Object.<string, !WebInspector.UISourceCode>} */ | 409 /** @type {!Object.<string, !WebInspector.UISourceCode>} */ |
| 410 this._uiSourceCodeForScriptId = {}; | 410 this._uiSourceCodeForScriptId = {}; |
| 411 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.Script>} */ | 411 /** @type {!Map.<!WebInspector.UISourceCode, !WebInspector.Script>} */ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 }, | 460 }, |
| 461 | 461 |
| 462 _reset: function() | 462 _reset: function() |
| 463 { | 463 { |
| 464 this._uiSourceCodeForScriptId = {}; | 464 this._uiSourceCodeForScriptId = {}; |
| 465 this._scriptForUISourceCode.clear(); | 465 this._scriptForUISourceCode.clear(); |
| 466 this._evaluationIndexForUISourceCode.clear(); | 466 this._evaluationIndexForUISourceCode.clear(); |
| 467 }, | 467 }, |
| 468 | 468 |
| 469 /** | 469 /** |
| 470 * @param {!WebInspector.RawLocation} rawLocation | 470 * @param {!WebInspector.DebuggerModel.Location} rawLocation |
| 471 * @return {?WebInspector.UILocation} | 471 * @return {?WebInspector.UILocation} |
| 472 */ | 472 */ |
| 473 rawLocationToUILocation: function(rawLocation) | 473 rawLocationToUILocation: function(rawLocation) |
| 474 { | 474 { |
| 475 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */(rawLocation); | 475 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat
ion} */(rawLocation); |
| 476 var uiSourceCode = this._uiSourceCodeForScriptId[debuggerModelLocation.s
criptId]; | 476 var uiSourceCode = this._uiSourceCodeForScriptId[debuggerModelLocation.s
criptId]; |
| 477 if (!uiSourceCode) | 477 if (!uiSourceCode) |
| 478 return null; | 478 return null; |
| 479 | 479 |
| 480 return uiSourceCode.uiLocation(debuggerModelLocation.lineNumber, debugge
rModelLocation.columnNumber || 0); | 480 return uiSourceCode.uiLocation(debuggerModelLocation.lineNumber, debugge
rModelLocation.columnNumber || 0); |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 696 this._model.deleteScriptSnippet(path); | 696 this._model.deleteScriptSnippet(path); |
| 697 }, | 697 }, |
| 698 | 698 |
| 699 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype | 699 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype |
| 700 } | 700 } |
| 701 | 701 |
| 702 /** | 702 /** |
| 703 * @type {!WebInspector.ScriptSnippetModel} | 703 * @type {!WebInspector.ScriptSnippetModel} |
| 704 */ | 704 */ |
| 705 WebInspector.scriptSnippetModel; | 705 WebInspector.scriptSnippetModel; |
| OLD | NEW |