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

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

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas Created 5 years, 3 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 return; 315 return;
316 } 316 }
317 317
318 if (returnByValue) 318 if (returnByValue)
319 callback(null, !!wasThrown, wasThrown ? null : result, exception Details); 319 callback(null, !!wasThrown, wasThrown ? null : result, exception Details);
320 else 320 else
321 callback(this.runtimeModel.createRemoteObject(result), !!wasThro wn, undefined, exceptionDetails); 321 callback(this.runtimeModel.createRemoteObject(result), !!wasThro wn, undefined, exceptionDetails);
322 } 322 }
323 this.target().runtimeAgent().evaluate(expression, objectGroup, includeCo mmandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, gene ratePreview, evalCallback.bind(this)); 323 this.target().runtimeAgent().evaluate(expression, objectGroup, includeCo mmandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, gene ratePreview, evalCallback.bind(this));
324 }, 324 },
325
326 /**
327 * @return {(!WebInspector.DebuggerModel.Location|undefined)}
328 */
329 pauseLocation: function() {
330 var frame = this.debuggerModel.selectedCallFrame();
331 if (frame) {
332 return frame.location();
333 }
334 return;
335 },
325 336
326 /** 337 /**
327 * @param {string} expressionString 338 * @param {string} expressionString
339 * @param {string} text
340 * @param {number} cursorOffset
328 * @param {string} prefix 341 * @param {string} prefix
329 * @param {boolean} force 342 * @param {boolean} force
330 * @param {function(!Array.<string>, number=)} completionsReadyCallback 343 * @param {function(!Array.<string>, number=)} completionsReadyCallback
331 */ 344 */
332 completionsForExpression: function(expressionString, prefix, force, completi onsReadyCallback) 345 completionsForExpression: function(expressionString, text, cursorOffset, pre fix, force, completionsReadyCallback)
333 { 346 {
334 var lastIndex = expressionString.length - 1; 347 var lastIndex = expressionString.length - 1;
335 348
336 var dotNotation = (expressionString[lastIndex] === "."); 349 var dotNotation = (expressionString[lastIndex] === ".");
337 var bracketNotation = (expressionString[lastIndex] === "["); 350 var bracketNotation = (expressionString[lastIndex] === "[");
338 351
339 if (dotNotation || bracketNotation) 352 if (dotNotation || bracketNotation)
340 expressionString = expressionString.substr(0, lastIndex); 353 expressionString = expressionString.substr(0, lastIndex);
341 354
342 if (expressionString && parseInt(expressionString, 10) == expressionStri ng) { 355 if (expressionString && parseInt(expressionString, 10) == expressionStri ng) {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 /** 566 /**
554 * @return {!RuntimeAgent.RemoteObjectId} 567 * @return {!RuntimeAgent.RemoteObjectId}
555 */ 568 */
556 objectId: function() 569 objectId: function()
557 { 570 {
558 return this._objectId; 571 return this._objectId;
559 }, 572 },
560 573
561 __proto__: WebInspector.SDKObject.prototype 574 __proto__: WebInspector.SDKObject.prototype
562 } 575 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/ConsoleModel.js ('k') | Source/devtools/front_end/source_frame/CodeMirrorTextEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698