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

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

Issue 1866213002: [DevTools] Move inspect from Inspector to Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inspector-connection
Patch Set: inspectRequested Created 4 years, 8 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 { 211 {
212 if (error) { 212 if (error) {
213 console.error(error); 213 console.error(error);
214 return; 214 return;
215 } 215 }
216 if (callback) 216 if (callback)
217 callback(result, exceptionDetails); 217 callback(result, exceptionDetails);
218 } 218 }
219 }, 219 },
220 220
221 /**
222 * @param {!RuntimeAgent.RemoteObject} payload
223 * @param {!Object=} hints
224 */
225 _inspectRequested: function(payload, hints)
226 {
227 var object = this.createRemoteObject(payload);
228
229 if (object.isNode()) {
230 WebInspector.Revealer.revealPromise(object).then(object.release.bind (object));
231 return;
232 }
233
234 if (object.type === "function") {
235 WebInspector.RemoteFunction.objectAsFunction(object).targetFunctionD etails().then(didGetDetails);
236 return;
237 }
238
239 /**
240 * @param {?WebInspector.DebuggerModel.FunctionDetails} response
241 */
242 function didGetDetails(response)
243 {
244 object.release();
245 if (!response || !response.location)
246 return;
247 WebInspector.Revealer.reveal(response.location);
248 }
249
250 if (hints.copyToClipboard)
251 InspectorFrontendHost.copyText(object.value);
252 object.release();
253 },
254
221 __proto__: WebInspector.SDKModel.prototype 255 __proto__: WebInspector.SDKModel.prototype
222 } 256 }
223 257
224 /** 258 /**
225 * @constructor 259 * @constructor
226 * @implements {RuntimeAgent.Dispatcher} 260 * @implements {RuntimeAgent.Dispatcher}
227 * @param {!WebInspector.RuntimeModel} runtimeModel 261 * @param {!WebInspector.RuntimeModel} runtimeModel
228 */ 262 */
229 WebInspector.RuntimeDispatcher = function(runtimeModel) 263 WebInspector.RuntimeDispatcher = function(runtimeModel)
230 { 264 {
(...skipping 18 matching lines...) Expand all
249 { 283 {
250 this._runtimeModel._executionContextDestroyed(executionContextId); 284 this._runtimeModel._executionContextDestroyed(executionContextId);
251 }, 285 },
252 286
253 /** 287 /**
254 * @override 288 * @override
255 */ 289 */
256 executionContextsCleared: function() 290 executionContextsCleared: function()
257 { 291 {
258 this._runtimeModel._executionContextsCleared(); 292 this._runtimeModel._executionContextsCleared();
293 },
294
295 /**
296 * @override
297 * @param {!RuntimeAgent.RemoteObject} payload
298 * @param {!Object=} hints
299 */
300 inspectRequested: function(payload, hints)
301 {
302 this._runtimeModel._inspectRequested(payload, hints);
259 } 303 }
260
261 } 304 }
262 305
263 /** 306 /**
264 * @constructor 307 * @constructor
265 * @extends {WebInspector.SDKObject} 308 * @extends {WebInspector.SDKObject}
266 * @param {!WebInspector.Target} target 309 * @param {!WebInspector.Target} target
267 * @param {number} id 310 * @param {number} id
268 * @param {string} name 311 * @param {string} name
269 * @param {string} origin 312 * @param {string} origin
270 * @param {boolean} isDefault 313 * @param {boolean} isDefault
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 /** 736 /**
694 * @param {string} listenerType 737 * @param {string} listenerType
695 */ 738 */
696 setListenerType: function(listenerType) 739 setListenerType: function(listenerType)
697 { 740 {
698 this._listenerType = listenerType; 741 this._listenerType = listenerType;
699 }, 742 },
700 743
701 __proto__: WebInspector.SDKObject.prototype 744 __proto__: WebInspector.SDKObject.prototype
702 } 745 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/main/Main.js ('k') | third_party/WebKit/Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698