| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 267 * @param {?function(*)} callback | 267 * @param {?function(*)} callback |
| 268 */ | 268 */ |
| 269 _wrapCallbackAndSendMessageObject: function(domain, method, params, callback
) | 269 _wrapCallbackAndSendMessageObject: function(domain, method, params, callback
) |
| 270 { | 270 { |
| 271 if (!this._isConnected && callback) { | 271 if (!this._isConnected && callback) { |
| 272 this._dispatchConnectionErrorResponse(domain, method, callback); | 272 this._dispatchConnectionErrorResponse(domain, method, callback); |
| 273 return; | 273 return; |
| 274 } | 274 } |
| 275 | 275 |
| 276 var messageObject = {}; | 276 var messageObject = {}; |
| 277 | |
| 278 var messageId = this.nextMessageId(); | 277 var messageId = this.nextMessageId(); |
| 279 messageObject.id = messageId; | 278 messageObject.id = messageId; |
| 280 | |
| 281 messageObject.method = method; | 279 messageObject.method = method; |
| 282 if (params) | 280 if (params) |
| 283 messageObject.params = params; | 281 messageObject.params = params; |
| 284 | 282 |
| 285 var wrappedCallback = this._wrap(callback, domain, method); | 283 var wrappedCallback = this._wrap(callback, domain, method); |
| 286 | 284 |
| 287 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages) | 285 if (InspectorBackendClass.Options.dumpInspectorProtocolMessages) |
| 288 this._dumpProtocolMessage("frontend: " + JSON.stringify(messageObjec
t)); | 286 this._dumpProtocolMessage("frontend: " + JSON.stringify(messageObjec
t)); |
| 289 | 287 |
| 290 this.sendMessage(messageObject); | 288 this.sendMessage(messageObject); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 } | 722 } |
| 725 } | 723 } |
| 726 | 724 |
| 727 InspectorBackendClass.Options = { | 725 InspectorBackendClass.Options = { |
| 728 dumpInspectorTimeStats: false, | 726 dumpInspectorTimeStats: false, |
| 729 dumpInspectorProtocolMessages: false, | 727 dumpInspectorProtocolMessages: false, |
| 730 suppressRequestErrors: false | 728 suppressRequestErrors: false |
| 731 } | 729 } |
| 732 | 730 |
| 733 InspectorBackend = new InspectorBackendClass(); | 731 InspectorBackend = new InspectorBackendClass(); |
| OLD | NEW |