| OLD | NEW |
| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 /** | 88 /** |
| 89 * @param {boolean} accessorPropertiesOnly | 89 * @param {boolean} accessorPropertiesOnly |
| 90 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We
bInspector.RemoteObjectProperty>)} callback | 90 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We
bInspector.RemoteObjectProperty>)} callback |
| 91 */ | 91 */ |
| 92 getAllProperties: function(accessorPropertiesOnly, callback) | 92 getAllProperties: function(accessorPropertiesOnly, callback) |
| 93 { | 93 { |
| 94 throw "Not implemented"; | 94 throw "Not implemented"; |
| 95 }, | 95 }, |
| 96 | 96 |
| 97 /** | 97 /** |
| 98 * @param {string} objectGroupName |
| 99 * @param {function(?Array<!WebInspector.RuntimeModel.ObjectEventListener>)}
callback |
| 100 */ |
| 101 getEventListeners: function(objectGroupName, callback) |
| 102 { |
| 103 throw "Not implemented"; |
| 104 }, |
| 105 |
| 106 /** |
| 98 * @param {!RuntimeAgent.CallArgument} name | 107 * @param {!RuntimeAgent.CallArgument} name |
| 99 * @param {function(string=)} callback | 108 * @param {function(string=)} callback |
| 100 */ | 109 */ |
| 101 deleteProperty: function(name, callback) | 110 deleteProperty: function(name, callback) |
| 102 { | 111 { |
| 103 throw "Not implemented"; | 112 throw "Not implemented"; |
| 104 }, | 113 }, |
| 105 | 114 |
| 106 /** | 115 /** |
| 107 * @param {function(this:Object, ...)} functionDeclaration | 116 * @param {function(this:Object, ...)} functionDeclaration |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 * @override | 376 * @override |
| 368 * @param {boolean} accessorPropertiesOnly | 377 * @param {boolean} accessorPropertiesOnly |
| 369 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We
bInspector.RemoteObjectProperty>)} callback | 378 * @param {function(?Array.<!WebInspector.RemoteObjectProperty>, ?Array.<!We
bInspector.RemoteObjectProperty>)} callback |
| 370 */ | 379 */ |
| 371 getAllProperties: function(accessorPropertiesOnly, callback) | 380 getAllProperties: function(accessorPropertiesOnly, callback) |
| 372 { | 381 { |
| 373 this.doGetProperties(false, accessorPropertiesOnly, false, callback); | 382 this.doGetProperties(false, accessorPropertiesOnly, false, callback); |
| 374 }, | 383 }, |
| 375 | 384 |
| 376 /** | 385 /** |
| 386 * @override |
| 387 * @param {string} objectGroupName |
| 388 * @param {function(?Array<!WebInspector.RuntimeModel.ObjectEventListener>)}
callback |
| 389 */ |
| 390 getEventListeners: function(objectGroupName, callback) |
| 391 { |
| 392 if (!this._objectId) { |
| 393 callback(null); |
| 394 return; |
| 395 } |
| 396 var description = this.description; |
| 397 /** |
| 398 * @this {!WebInspector.RemoteObject} |
| 399 * @param {?Protocol.Error} error |
| 400 * @param {!Array.<!RuntimeAgent.EventListener>} payloads |
| 401 */ |
| 402 function mycallback(error, payloads) |
| 403 { |
| 404 if (error) { |
| 405 callback(null); |
| 406 return; |
| 407 } |
| 408 callback(payloads.map(createEventListener.bind(this))); |
| 409 } |
| 410 /** |
| 411 * @this {!WebInspector.RemoteObject} |
| 412 * @param {!RuntimeAgent.EventListener} payload |
| 413 */ |
| 414 function createEventListener(payload) |
| 415 { |
| 416 return new WebInspector.RuntimeModel.ObjectEventListener(this._targe
t, payload, this.description || "Object"); |
| 417 } |
| 418 this._runtimeAgent.getEventListeners(this._objectId, objectGroupName, my
callback.bind(this)); |
| 419 }, |
| 420 |
| 421 /** |
| 377 * @param {!Array.<string>} propertyPath | 422 * @param {!Array.<string>} propertyPath |
| 378 * @param {function(?WebInspector.RemoteObject, boolean=)} callback | 423 * @param {function(?WebInspector.RemoteObject, boolean=)} callback |
| 379 */ | 424 */ |
| 380 getProperty: function(propertyPath, callback) | 425 getProperty: function(propertyPath, callback) |
| 381 { | 426 { |
| 382 /** | 427 /** |
| 383 * @param {string} arrayStr | 428 * @param {string} arrayStr |
| 384 * @suppressReceiverCheck | 429 * @suppressReceiverCheck |
| 385 * @this {Object} | 430 * @this {Object} |
| 386 */ | 431 */ |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1164 { | 1209 { |
| 1165 if (!this._cachedDescription) { | 1210 if (!this._cachedDescription) { |
| 1166 var children = this._children(); | 1211 var children = this._children(); |
| 1167 this._cachedDescription = "{" + this._formatValue(children[0].value)
+ " => " + this._formatValue(children[1].value) + "}"; | 1212 this._cachedDescription = "{" + this._formatValue(children[0].value)
+ " => " + this._formatValue(children[1].value) + "}"; |
| 1168 } | 1213 } |
| 1169 return this._cachedDescription; | 1214 return this._cachedDescription; |
| 1170 }, | 1215 }, |
| 1171 | 1216 |
| 1172 __proto__: WebInspector.LocalJSONObject.prototype | 1217 __proto__: WebInspector.LocalJSONObject.prototype |
| 1173 } | 1218 } |
| OLD | NEW |