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

Side by Side Diff: Source/devtools/front_end/ResourceScriptMapping.js

Issue 220903002: DevTools: wrap DebuggerAgent.Location with DebuggerModel.Location. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: All tests!!! Created 6 years, 8 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
« no previous file with comments | « Source/devtools/front_end/RemoteObject.js ('k') | Source/devtools/front_end/RuntimeModel.js » ('j') | 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) 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 } 45 }
46 46
47 WebInspector.ResourceScriptMapping.prototype = { 47 WebInspector.ResourceScriptMapping.prototype = {
48 /** 48 /**
49 * @param {!WebInspector.RawLocation} rawLocation 49 * @param {!WebInspector.RawLocation} rawLocation
50 * @return {?WebInspector.UILocation} 50 * @return {?WebInspector.UILocation}
51 */ 51 */
52 rawLocationToUILocation: function(rawLocation) 52 rawLocationToUILocation: function(rawLocation)
53 { 53 {
54 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat ion} */ (rawLocation); 54 var debuggerModelLocation = /** @type {!WebInspector.DebuggerModel.Locat ion} */ (rawLocation);
55 var script = this._debuggerModel.scriptForId(debuggerModelLocation.scrip tId); 55 var script = debuggerModelLocation.script();
56 var uiSourceCode = this._workspaceUISourceCodeForScript(script); 56 var uiSourceCode = this._workspaceUISourceCodeForScript(script);
57 if (!uiSourceCode) 57 if (!uiSourceCode)
58 return null; 58 return null;
59 var scriptFile = uiSourceCode.scriptFile(); 59 var scriptFile = uiSourceCode.scriptFile();
60 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg ingToVM()) || scriptFile.isDivergingFromVM())) 60 if (scriptFile && ((scriptFile.hasDivergedFromVM() && !scriptFile.isMerg ingToVM()) || scriptFile.isDivergingFromVM()))
61 return null; 61 return null;
62 return new WebInspector.UILocation(uiSourceCode, debuggerModelLocation.l ineNumber, debuggerModelLocation.columnNumber || 0); 62 return new WebInspector.UILocation(uiSourceCode, debuggerModelLocation.l ineNumber, debuggerModelLocation.columnNumber || 0);
63 }, 63 },
64 64
65 /** 65 /**
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 }, 375 },
376 376
377 dispose: function() 377 dispose: function()
378 { 378 {
379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this); 379 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyCommitted, this._workingCopyCommitted, this);
380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this); 380 this._uiSourceCode.removeEventListener(WebInspector.UISourceCode.Events. WorkingCopyChanged, this._workingCopyChanged, this);
381 }, 381 },
382 382
383 __proto__: WebInspector.Object.prototype 383 __proto__: WebInspector.Object.prototype
384 } 384 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/RemoteObject.js ('k') | Source/devtools/front_end/RuntimeModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698