| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 contentEncoded = contentProvider.contentEncoded; | 517 contentEncoded = contentProvider.contentEncoded; |
| 518 if (contentProvider instanceof WebInspector.NetworkRequest) | 518 if (contentProvider instanceof WebInspector.NetworkRequest) |
| 519 contentEncoded = contentProvider.contentEncoded; | 519 contentEncoded = contentProvider.contentEncoded; |
| 520 var response = { | 520 var response = { |
| 521 encoding: contentEncoded && content ? "base64" : "", | 521 encoding: contentEncoded && content ? "base64" : "", |
| 522 content: content | 522 content: content |
| 523 }; | 523 }; |
| 524 this._dispatchCallback(message.requestId, port, response); | 524 this._dispatchCallback(message.requestId, port, response); |
| 525 } | 525 } |
| 526 | 526 |
| 527 contentProvider.requestContent(onContentAvailable.bind(this)); | 527 contentProvider.requestContent().then(onContentAvailable.bind(this)); |
| 528 }, | 528 }, |
| 529 | 529 |
| 530 _onGetRequestContent: function(message, port) | 530 _onGetRequestContent: function(message, port) |
| 531 { | 531 { |
| 532 var request = this._requestById(message.id); | 532 var request = this._requestById(message.id); |
| 533 if (!request) | 533 if (!request) |
| 534 return this._status.E_NOTFOUND(message.id); | 534 return this._status.E_NOTFOUND(message.id); |
| 535 this._getResourceContent(request, message, port); | 535 this._getResourceContent(request, message, port); |
| 536 }, | 536 }, |
| 537 | 537 |
| (...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 /** | 1081 /** |
| 1082 * @typedef {{code: string, description: string, details: !Array.<*>}} | 1082 * @typedef {{code: string, description: string, details: !Array.<*>}} |
| 1083 */ | 1083 */ |
| 1084 WebInspector.ExtensionStatus.Record; | 1084 WebInspector.ExtensionStatus.Record; |
| 1085 | 1085 |
| 1086 WebInspector.extensionAPI = {}; | 1086 WebInspector.extensionAPI = {}; |
| 1087 defineCommonExtensionSymbols(WebInspector.extensionAPI); | 1087 defineCommonExtensionSymbols(WebInspector.extensionAPI); |
| 1088 | 1088 |
| 1089 /** @type {!WebInspector.ExtensionServer} */ | 1089 /** @type {!WebInspector.ExtensionServer} */ |
| 1090 WebInspector.extensionServer; | 1090 WebInspector.extensionServer; |
| OLD | NEW |