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

Side by Side Diff: Source/devtools/front_end/DefaultScriptMapping.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
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.DefaultScriptMapping.prototype = { 47 WebInspector.DefaultScriptMapping.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._uiSourceCodeForScriptId[script.scriptId]; 56 var uiSourceCode = this._uiSourceCodeForScriptId[script.scriptId];
57 var lineNumber = debuggerModelLocation.lineNumber; 57 var lineNumber = debuggerModelLocation.lineNumber;
58 var columnNumber = debuggerModelLocation.columnNumber || 0; 58 var columnNumber = debuggerModelLocation.columnNumber || 0;
59 return new WebInspector.UILocation(uiSourceCode, lineNumber, columnNumbe r); 59 return new WebInspector.UILocation(uiSourceCode, lineNumber, columnNumbe r);
60 }, 60 },
61 61
62 /** 62 /**
63 * @param {!WebInspector.UISourceCode} uiSourceCode 63 * @param {!WebInspector.UISourceCode} uiSourceCode
64 * @param {number} lineNumber 64 * @param {number} lineNumber
65 * @param {number} columnNumber 65 * @param {number} columnNumber
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 { 151 {
152 var contentProvider = script.isInlineScript() ? new WebInspector.Concate natedScriptsContentProvider([script]) : script; 152 var contentProvider = script.isInlineScript() ? new WebInspector.Concate natedScriptsContentProvider([script]) : script;
153 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL); 153 var splitURL = WebInspector.ParsedURL.splitURL(script.sourceURL);
154 var name = splitURL[splitURL.length - 1]; 154 var name = splitURL[splitURL.length - 1];
155 name = "VM" + script.scriptId + (name ? " " + name : ""); 155 name = "VM" + script.scriptId + (name ? " " + name : "");
156 return this.addContentProvider("", name, script.sourceURL, contentProvid er, false, script.isContentScript); 156 return this.addContentProvider("", name, script.sourceURL, contentProvid er, false, script.isContentScript);
157 }, 157 },
158 158
159 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype 159 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype
160 } 160 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/DebuggerModel.js ('k') | Source/devtools/front_end/EventListenersSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698