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

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

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 */ 413 */
414 isNode() { 414 isNode() {
415 return false; 415 return false;
416 } 416 }
417 }; 417 };
418 418
419 419
420 SDK.RemoteObjectImpl = class extends SDK.RemoteObject { 420 SDK.RemoteObjectImpl = class extends SDK.RemoteObject {
421 /** 421 /**
422 * @param {!SDK.RuntimeModel} runtimeModel 422 * @param {!SDK.RuntimeModel} runtimeModel
423 * @param {!Protocol.RuntimeAgent} runtimeAgent
423 * @param {string|undefined} objectId 424 * @param {string|undefined} objectId
424 * @param {string} type 425 * @param {string} type
425 * @param {string|undefined} subtype 426 * @param {string|undefined} subtype
426 * @param {*} value 427 * @param {*} value
427 * @param {!Protocol.Runtime.UnserializableValue=} unserializableValue 428 * @param {!Protocol.Runtime.UnserializableValue=} unserializableValue
428 * @param {string=} description 429 * @param {string=} description
429 * @param {!Protocol.Runtime.ObjectPreview=} preview 430 * @param {!Protocol.Runtime.ObjectPreview=} preview
430 * @param {!Protocol.Runtime.CustomPreview=} customPreview 431 * @param {!Protocol.Runtime.CustomPreview=} customPreview
431 */ 432 */
432 constructor(runtimeModel, objectId, type, subtype, value, unserializableValue, description, preview, customPreview) { 433 constructor(
434 runtimeModel, runtimeAgent, objectId, type, subtype, value, unserializable Value, description, preview,
435 customPreview) {
433 super(); 436 super();
434 437
435 this._runtimeModel = runtimeModel; 438 this._runtimeModel = runtimeModel;
436 this._runtimeAgent = runtimeModel.target().runtimeAgent(); 439 this._runtimeAgent = runtimeAgent;
437 440
438 this._type = type; 441 this._type = type;
439 this._subtype = subtype; 442 this._subtype = subtype;
440 if (objectId) { 443 if (objectId) {
441 // handle 444 // handle
442 this._objectId = objectId; 445 this._objectId = objectId;
443 this._description = description; 446 this._description = description;
444 this._hasChildren = (type !== 'symbol'); 447 this._hasChildren = (type !== 'symbol');
445 this._preview = preview; 448 this._preview = preview;
446 } else { 449 } else {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 */ 819 */
817 isNode() { 820 isNode() {
818 return !!this._objectId && this.type === 'object' && this.subtype === 'node' ; 821 return !!this._objectId && this.type === 'object' && this.subtype === 'node' ;
819 } 822 }
820 }; 823 };
821 824
822 825
823 SDK.ScopeRemoteObject = class extends SDK.RemoteObjectImpl { 826 SDK.ScopeRemoteObject = class extends SDK.RemoteObjectImpl {
824 /** 827 /**
825 * @param {!SDK.RuntimeModel} runtimeModel 828 * @param {!SDK.RuntimeModel} runtimeModel
829 * @param {!Protocol.RuntimeAgent} runtimeAgent
826 * @param {string|undefined} objectId 830 * @param {string|undefined} objectId
827 * @param {!SDK.ScopeRef} scopeRef 831 * @param {!SDK.ScopeRef} scopeRef
828 * @param {string} type 832 * @param {string} type
829 * @param {string|undefined} subtype 833 * @param {string|undefined} subtype
830 * @param {*} value 834 * @param {*} value
831 * @param {!Protocol.Runtime.UnserializableValue=} unserializableValue 835 * @param {!Protocol.Runtime.UnserializableValue=} unserializableValue
832 * @param {string=} description 836 * @param {string=} description
833 * @param {!Protocol.Runtime.ObjectPreview=} preview 837 * @param {!Protocol.Runtime.ObjectPreview=} preview
834 */ 838 */
835 constructor(runtimeModel, objectId, scopeRef, type, subtype, value, unserializ ableValue, description, preview) { 839 constructor(
836 super(runtimeModel, objectId, type, subtype, value, unserializableValue, des cription, preview); 840 runtimeModel, runtimeAgent, objectId, scopeRef, type, subtype, value, unse rializableValue, description, preview) {
841 super(runtimeModel, runtimeAgent, objectId, type, subtype, value, unserializ ableValue, description, preview);
837 this._scopeRef = scopeRef; 842 this._scopeRef = scopeRef;
838 this._savedScopeProperties = undefined; 843 this._savedScopeProperties = undefined;
839 } 844 }
840 845
841 /** 846 /**
842 * @override 847 * @override
843 * @param {boolean} ownProperties 848 * @param {boolean} ownProperties
844 * @param {boolean} accessorPropertiesOnly 849 * @param {boolean} accessorPropertiesOnly
845 * @param {boolean} generatePreview 850 * @param {boolean} generatePreview
846 * @param {function(?Array.<!SDK.RemoteObjectProperty>, ?Array.<!SDK.RemoteObj ectProperty>)} callback 851 * @param {function(?Array.<!SDK.RemoteObjectProperty>, ?Array.<!SDK.RemoteObj ectProperty>)} callback
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 * @const 1423 * @const
1419 * @type {!RegExp} 1424 * @type {!RegExp}
1420 */ 1425 */
1421 SDK.RemoteObject._descriptionLengthParenRegex = /\(([0-9]+)\)/; 1426 SDK.RemoteObject._descriptionLengthParenRegex = /\(([0-9]+)\)/;
1422 1427
1423 /** 1428 /**
1424 * @const 1429 * @const
1425 * @type {!RegExp} 1430 * @type {!RegExp}
1426 */ 1431 */
1427 SDK.RemoteObject._descriptionLengthSquareRegex = /\[([0-9]+)\]/; 1432 SDK.RemoteObject._descriptionLengthSquareRegex = /\[([0-9]+)\]/;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698