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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/snippets/ScriptSnippetModel.js

Issue 1707043002: [DevTools] Support CommandLineAPI in snippets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 }, 253 },
254 254
255 /** 255 /**
256 * @param {!RuntimeAgent.ScriptId} scriptId 256 * @param {!RuntimeAgent.ScriptId} scriptId
257 * @param {!WebInspector.ExecutionContext} executionContext 257 * @param {!WebInspector.ExecutionContext} executionContext
258 * @param {?string=} sourceURL 258 * @param {?string=} sourceURL
259 */ 259 */
260 _runScript: function(scriptId, executionContext, sourceURL) 260 _runScript: function(scriptId, executionContext, sourceURL)
261 { 261 {
262 var target = executionContext.target(); 262 var target = executionContext.target();
263 target.runtimeModel.runScript(scriptId, executionContext.id, "console", false, runCallback.bind(this, target)); 263 target.runtimeModel.runScript(scriptId, executionContext.id, "console", false, true, runCallback.bind(this, target));
264 264
265 /** 265 /**
266 * @param {!WebInspector.Target} target 266 * @param {!WebInspector.Target} target
267 * @param {?RuntimeAgent.RemoteObject} result 267 * @param {?RuntimeAgent.RemoteObject} result
268 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails 268 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails
269 * @this {WebInspector.ScriptSnippetModel} 269 * @this {WebInspector.ScriptSnippetModel}
270 */ 270 */
271 function runCallback(target, result, exceptionDetails) 271 function runCallback(target, result, exceptionDetails)
272 { 272 {
273 if (!exceptionDetails) 273 if (!exceptionDetails)
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 this._model.deleteScriptSnippet(url); 667 this._model.deleteScriptSnippet(url);
668 }, 668 },
669 669
670 __proto__: WebInspector.ContentProviderBasedProject.prototype 670 __proto__: WebInspector.ContentProviderBasedProject.prototype
671 } 671 }
672 672
673 /** 673 /**
674 * @type {!WebInspector.ScriptSnippetModel} 674 * @type {!WebInspector.ScriptSnippetModel}
675 */ 675 */
676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace); 676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect or.workspace);
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sdk/RuntimeModel.js ('k') | third_party/WebKit/Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698