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

Side by Side Diff: Source/devtools/front_end/sdk/CompilerScriptMapping.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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 if (!sourceMap) 189 if (!sourceMap)
190 return true; 190 return true;
191 return !!sourceMap.findEntryReversed(uiSourceCode.url, lineNumber, 0); 191 return !!sourceMap.findEntryReversed(uiSourceCode.url, lineNumber, 0);
192 }, 192 },
193 193
194 /** 194 /**
195 * @param {!WebInspector.UISourceCode} uiSourceCode 195 * @param {!WebInspector.UISourceCode} uiSourceCode
196 */ 196 */
197 _bindUISourceCode: function(uiSourceCode) 197 _bindUISourceCode: function(uiSourceCode)
198 { 198 {
199 uiSourceCode.setSourceMappingForTarget(this._target, this); 199 this._debuggerWorkspaceBinding.setSourceMapping(this._target, uiSourceCo de, this);
200 }, 200 },
201 201
202 /** 202 /**
203 * @param {!WebInspector.UISourceCode} uiSourceCode 203 * @param {!WebInspector.UISourceCode} uiSourceCode
204 */ 204 */
205 _unbindUISourceCode: function(uiSourceCode) 205 _unbindUISourceCode: function(uiSourceCode)
206 { 206 {
207 uiSourceCode.setSourceMappingForTarget(this._target, null); 207 this._debuggerWorkspaceBinding.setSourceMapping(this._target, uiSourceCo de, null);
208 }, 208 },
209 209
210 /** 210 /**
211 * @param {!WebInspector.Event} event 211 * @param {!WebInspector.Event} event
212 */ 212 */
213 _uiSourceCodeAddedToWorkspace: function(event) 213 _uiSourceCodeAddedToWorkspace: function(event)
214 { 214 {
215 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); 215 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data );
216 if (!uiSourceCode.url || !this._sourceMapForURL.get(uiSourceCode.url)) 216 if (!uiSourceCode.url || !this._sourceMapForURL.get(uiSourceCode.url))
217 return; 217 return;
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 this._sourceMapForScriptId = {}; 297 this._sourceMapForScriptId = {};
298 this._scriptForSourceMap.clear(); 298 this._scriptForSourceMap.clear();
299 this._sourceMapForURL.clear(); 299 this._sourceMapForURL.clear();
300 }, 300 },
301 301
302 dispose: function() 302 dispose: function()
303 { 303 {
304 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); 304 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this);
305 } 305 }
306 } 306 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/BreakpointManager.js ('k') | Source/devtools/front_end/sdk/DebuggerWorkspaceBinding.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698