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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
576 * @param {string} methodName | 576 * @param {string} methodName |
577 * @param {!function(*)} callback | 577 * @param {!function(*)} callback |
578 */ | 578 */ |
579 _dispatchConnectionErrorResponse: function(domain, methodName, callback) | 579 _dispatchConnectionErrorResponse: function(domain, methodName, callback) |
580 { | 580 { |
581 var error = { message: "Connection is closed", code: InspectorBackendCl
ass._DevToolsErrorCode, data: null}; | 581 var error = { message: "Connection is closed", code: InspectorBackendCl
ass._DevToolsErrorCode, data: null}; |
582 var messageObject = {error: error}; | 582 var messageObject = {error: error}; |
583 setTimeout(InspectorBackendClass.AgentPrototype.prototype.dispatchRespon
se.bind(this.agent(domain), messageObject, methodName, callback), 0); | 583 setTimeout(InspectorBackendClass.AgentPrototype.prototype.dispatchRespon
se.bind(this.agent(domain), messageObject, methodName, callback), 0); |
584 }, | 584 }, |
585 | 585 |
| 586 /** |
| 587 * @return {boolean} |
| 588 */ |
| 589 isClosed: function() |
| 590 { |
| 591 return !this._isConnected; |
| 592 }, |
| 593 |
586 __proto__: WebInspector.Object.prototype | 594 __proto__: WebInspector.Object.prototype |
587 | 595 |
588 } | 596 } |
589 | 597 |
590 /** | 598 /** |
591 * @constructor | 599 * @constructor |
592 * @extends {InspectorBackendClass.Connection} | 600 * @extends {InspectorBackendClass.Connection} |
593 */ | 601 */ |
594 InspectorBackendClass.MainConnection = function() | 602 InspectorBackendClass.MainConnection = function() |
595 { | 603 { |
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 | 922 |
915 } | 923 } |
916 | 924 |
917 InspectorBackendClass.Options = { | 925 InspectorBackendClass.Options = { |
918 dumpInspectorTimeStats: false, | 926 dumpInspectorTimeStats: false, |
919 dumpInspectorProtocolMessages: false, | 927 dumpInspectorProtocolMessages: false, |
920 suppressRequestErrors: false | 928 suppressRequestErrors: false |
921 } | 929 } |
922 | 930 |
923 InspectorBackend = new InspectorBackendClass(); | 931 InspectorBackend = new InspectorBackendClass(); |
OLD | NEW |