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

Side by Side Diff: Source/devtools/front_end/sdk/ScriptSnippetModel.js

Issue 464963002: DevTools: Make UISourceCode Target-agnostic (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 { 511 {
512 var snippetId = this.snippetIdForSourceURL(script.sourceURL); 512 var snippetId = this.snippetIdForSourceURL(script.sourceURL);
513 if (!snippetId) 513 if (!snippetId)
514 return; 514 return;
515 var uiSourceCode = this._scriptSnippetModel._uiSourceCodeForSnippetId[sn ippetId]; 515 var uiSourceCode = this._scriptSnippetModel._uiSourceCodeForSnippetId[sn ippetId];
516 516
517 if (!uiSourceCode || this._evaluationSourceURL(uiSourceCode) !== script. sourceURL) 517 if (!uiSourceCode || this._evaluationSourceURL(uiSourceCode) !== script. sourceURL)
518 return; 518 return;
519 519
520 console.assert(!this._scriptForUISourceCode.get(uiSourceCode)); 520 console.assert(!this._scriptForUISourceCode.get(uiSourceCode));
521 uiSourceCode.setSourceMappingForTarget(this._target, this); 521 WebInspector.debuggerWorkspaceBinding.setSourceMapping(this._target, uiS ourceCode, this);
522 this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode; 522 this._uiSourceCodeForScriptId[script.scriptId] = uiSourceCode;
523 this._scriptForUISourceCode.put(uiSourceCode, script); 523 this._scriptForUISourceCode.put(uiSourceCode, script);
524 WebInspector.debuggerWorkspaceBinding.pushSourceMapping(script, this); 524 WebInspector.debuggerWorkspaceBinding.pushSourceMapping(script, this);
525 }, 525 },
526 526
527 /** 527 /**
528 * @param {!WebInspector.UISourceCode} uiSourceCode 528 * @param {!WebInspector.UISourceCode} uiSourceCode
529 * @param {!Array.<!{breakpoint: !WebInspector.BreakpointManager.Breakpoint, uiLocation: !WebInspector.UILocation}>} breakpointLocations 529 * @param {!Array.<!{breakpoint: !WebInspector.BreakpointManager.Breakpoint, uiLocation: !WebInspector.UILocation}>} breakpointLocations
530 */ 530 */
531 _restoreBreakpoints: function(uiSourceCode, breakpointLocations) 531 _restoreBreakpoints: function(uiSourceCode, breakpointLocations)
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/ResourceScriptMapping.js ('k') | Source/devtools/front_end/sdk/UISourceCode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698