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

Side by Side Diff: Source/devtools/front_end/RemoteObject.js

Issue 206313004: DevTools: Rename WebInspector.DOMAgent into WebInspector.DOMModel (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase on master Created 6 years, 9 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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 * @param {string|undefined} objectId 226 * @param {string|undefined} objectId
227 * @param {string} type 227 * @param {string} type
228 * @param {string|undefined} subtype 228 * @param {string|undefined} subtype
229 * @param {*} value 229 * @param {*} value
230 * @param {string=} description 230 * @param {string=} description
231 * @param {!RuntimeAgent.ObjectPreview=} preview 231 * @param {!RuntimeAgent.ObjectPreview=} preview
232 */ 232 */
233 WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value, description, preview) 233 WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value, description, preview)
234 { 234 {
235 WebInspector.RemoteObject.call(this); 235 WebInspector.RemoteObject.call(this);
236
236 this._target = target; 237 this._target = target;
237 this._runtimeAgent = target.runtimeAgent(); 238 this._runtimeAgent = target.runtimeAgent();
238 this._domAgent = target.domModel; 239 this._domModel = target.domModel;
239 240
240 this._type = type; 241 this._type = type;
241 this._subtype = subtype; 242 this._subtype = subtype;
242 if (objectId) { 243 if (objectId) {
243 // handle 244 // handle
244 this._objectId = objectId; 245 this._objectId = objectId;
245 this._description = description; 246 this._description = description;
246 this._hasChildren = true; 247 this._hasChildren = true;
247 this._preview = preview; 248 this._preview = preview;
248 } else { 249 } else {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 callback(); 444 callback();
444 } 445 }
445 }, 446 },
446 447
447 /** 448 /**
448 * @param {function(?DOMAgent.NodeId)} callback 449 * @param {function(?DOMAgent.NodeId)} callback
449 */ 450 */
450 pushNodeToFrontend: function(callback) 451 pushNodeToFrontend: function(callback)
451 { 452 {
452 if (this._objectId) 453 if (this._objectId)
453 this._domAgent.pushNodeToFrontend(this._objectId, callback); 454 this._domModel.pushNodeToFrontend(this._objectId, callback);
454 else 455 else
455 callback(0); 456 callback(0);
456 }, 457 },
457 458
458 highlightAsDOMNode: function() 459 highlightAsDOMNode: function()
459 { 460 {
460 this._domAgent.highlightDOMNode(undefined, undefined, this._objectId); 461 this._domModel.highlightDOMNode(undefined, undefined, this._objectId);
461 }, 462 },
462 463
463 hideDOMNodeHighlight: function() 464 hideDOMNodeHighlight: function()
464 { 465 {
465 this._domAgent.hideDOMNodeHighlight(); 466 this._domModel.hideDOMNodeHighlight();
466 }, 467 },
467 468
468 /** 469 /**
469 * @param {function(this:Object, ...)} functionDeclaration 470 * @param {function(this:Object, ...)} functionDeclaration
470 * @param {!Array.<!RuntimeAgent.CallArgument>=} args 471 * @param {!Array.<!RuntimeAgent.CallArgument>=} args
471 * @param {function(?WebInspector.RemoteObject, boolean=)=} callback 472 * @param {function(?WebInspector.RemoteObject, boolean=)=} callback
472 */ 473 */
473 callFunction: function(functionDeclaration, args, callback) 474 callFunction: function(functionDeclaration, args, callback)
474 { 475 {
475 /** 476 /**
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 result = functionDeclaration.apply(target, rawArgs); 1013 result = functionDeclaration.apply(target, rawArgs);
1013 } catch (e) { 1014 } catch (e) {
1014 result = null; 1015 result = null;
1015 } 1016 }
1016 1017
1017 callback(result); 1018 callback(result);
1018 }, 1019 },
1019 1020
1020 __proto__: WebInspector.RemoteObject.prototype 1021 __proto__: WebInspector.RemoteObject.prototype
1021 } 1022 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/PlatformFontsSidebarPane.js ('k') | Source/devtools/front_end/ScreencastView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698