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

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

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 continue; 152 continue;
153 this._sourceMapForURL.put(sourceURL, sourceMap); 153 this._sourceMapForURL.put(sourceURL, sourceMap);
154 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works pace.uiSourceCodeForURL(sourceURL)) { 154 if (!this._workspace.hasMappingForURL(sourceURL) && !this._works pace.uiSourceCodeForURL(sourceURL)) {
155 var contentProvider = sourceMap.sourceContentProvider(source URL, WebInspector.resourceTypes.Script); 155 var contentProvider = sourceMap.sourceContentProvider(source URL, WebInspector.resourceTypes.Script);
156 this._networkWorkspaceBinding.addFileForURL(sourceURL, conte ntProvider, script.isContentScript()); 156 this._networkWorkspaceBinding.addFileForURL(sourceURL, conte ntProvider, script.isContentScript());
157 } 157 }
158 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL) ; 158 var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL) ;
159 if (uiSourceCode) 159 if (uiSourceCode)
160 this._bindUISourceCode(uiSourceCode); 160 this._bindUISourceCode(uiSourceCode);
161 else 161 else
162 this._target.consoleModel.showErrorMessage(WebInspector.UISt ring("Failed to locate workspace file mapped to URL %s from source map %s", sour ceURL, sourceMap.url())); 162 WebInspector.console.error(WebInspector.UIString("Failed to locate workspace file mapped to URL %s from source map %s", sourceURL, sourceMap .url()));
163 } 163 }
164 script.updateLocations(); 164 script.updateLocations();
165 } 165 }
166 }, 166 },
167 167
168 /** 168 /**
169 * @return {boolean} 169 * @return {boolean}
170 */ 170 */
171 isIdentity: function() 171 isIdentity: function()
172 { 172 {
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 this._sourceMapForScriptId = {}; 294 this._sourceMapForScriptId = {};
295 this._scriptForSourceMap.clear(); 295 this._scriptForSourceMap.clear();
296 this._sourceMapForURL.clear(); 296 this._sourceMapForURL.clear();
297 }, 297 },
298 298
299 dispose: function() 299 dispose: function()
300 { 300 {
301 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this); 301 this._workspace.removeEventListener(WebInspector.Workspace.Events.UISour ceCodeAdded, this._uiSourceCodeAddedToWorkspace, this);
302 } 302 }
303 } 303 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/CSSStyleModel.js ('k') | Source/devtools/front_end/sdk/ConsoleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698