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

Side by Side Diff: Source/devtools/front_end/sdk/ScriptSnippetModel.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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 var breakpointLocations = this._removeBreakpoints(uiSourceCode); 232 var breakpointLocations = this._removeBreakpoints(uiSourceCode);
233 this._releaseSnippetScript(uiSourceCode); 233 this._releaseSnippetScript(uiSourceCode);
234 this._restoreBreakpoints(uiSourceCode, breakpointLocations); 234 this._restoreBreakpoints(uiSourceCode, breakpointLocations);
235 235
236 var target = executionContext.target(); 236 var target = executionContext.target();
237 var evaluationIndex = this._nextEvaluationIndex(); 237 var evaluationIndex = this._nextEvaluationIndex();
238 var mapping = this._mappingForTarget.get(target); 238 var mapping = this._mappingForTarget.get(target);
239 mapping._setEvaluationIndex(evaluationIndex, uiSourceCode); 239 mapping._setEvaluationIndex(evaluationIndex, uiSourceCode);
240 var evaluationUrl = mapping._evaluationSourceURL(uiSourceCode); 240 var evaluationUrl = mapping._evaluationSourceURL(uiSourceCode);
241 var expression = uiSourceCode.workingCopy(); 241 var expression = uiSourceCode.workingCopy();
242 target.consoleModel.show(); 242 WebInspector.console.show();
243 target.debuggerAgent().compileScript(expression, evaluationUrl, executio nContext.id, compileCallback.bind(this, target)); 243 target.debuggerAgent().compileScript(expression, evaluationUrl, executio nContext.id, compileCallback.bind(this, target));
244 244
245 /** 245 /**
246 * @param {!WebInspector.Target} target 246 * @param {!WebInspector.Target} target
247 * @param {?string} error 247 * @param {?string} error
248 * @param {!DebuggerAgent.ScriptId=} scriptId 248 * @param {!DebuggerAgent.ScriptId=} scriptId
249 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails 249 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails
250 * @this {WebInspector.ScriptSnippetModel} 250 * @this {WebInspector.ScriptSnippetModel}
251 */ 251 */
252 function compileCallback(target, error, scriptId, exceptionDetails) 252 function compileCallback(target, error, scriptId, exceptionDetails)
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 this._model.deleteScriptSnippet(path); 695 this._model.deleteScriptSnippet(path);
696 }, 696 },
697 697
698 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype 698 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype
699 } 699 }
700 700
701 /** 701 /**
702 * @type {!WebInspector.ScriptSnippetModel} 702 * @type {!WebInspector.ScriptSnippetModel}
703 */ 703 */
704 WebInspector.scriptSnippetModel; 704 WebInspector.scriptSnippetModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/SASSSourceMapping.js ('k') | Source/devtools/front_end/sdk/StylesSourceMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698