| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // Limit buffer when talking to a remote device. | 48 // Limit buffer when talking to a remote device. |
| 49 if (Runtime.queryParam("remoteFrontend") || Runtime.queryParam("ws")) | 49 if (Runtime.queryParam("remoteFrontend") || Runtime.queryParam("ws")) |
| 50 this._networkAgent.enable(10000000, 5000000); | 50 this._networkAgent.enable(10000000, 5000000); |
| 51 else | 51 else |
| 52 this._networkAgent.enable(); | 52 this._networkAgent.enable(); |
| 53 | 53 |
| 54 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific
ateDetails>>} */ | 54 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific
ateDetails>>} */ |
| 55 this._certificateDetailsCache = new Map(); | 55 this._certificateDetailsCache = new Map(); |
| 56 | 56 |
| 57 this._bypassServiceWorkerSetting = WebInspector.settings.createSetting("bypa
ssServiceWorker", false); |
| 58 if (this._bypassServiceWorkerSetting.get()) |
| 59 this._bypassServiceWorkerChanged(); |
| 60 this._bypassServiceWorkerSetting.addChangeListener(this._bypassServiceWorker
Changed, this); |
| 61 |
| 57 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis
abledSettingChanged, this); | 62 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis
abledSettingChanged, this); |
| 58 } | 63 } |
| 59 | 64 |
| 60 WebInspector.NetworkManager.EventTypes = { | 65 WebInspector.NetworkManager.EventTypes = { |
| 61 RequestStarted: "RequestStarted", | 66 RequestStarted: "RequestStarted", |
| 62 RequestUpdated: "RequestUpdated", | 67 RequestUpdated: "RequestUpdated", |
| 63 RequestFinished: "RequestFinished", | 68 RequestFinished: "RequestFinished", |
| 64 RequestUpdateDropped: "RequestUpdateDropped", | 69 RequestUpdateDropped: "RequestUpdateDropped", |
| 65 ResponseReceived: "ResponseReceived" | 70 ResponseReceived: "ResponseReceived" |
| 66 } | 71 } |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 } | 143 } |
| 139 this._networkAgent.getCertificateDetails(certificateId, innerCallbac
k); | 144 this._networkAgent.getCertificateDetails(certificateId, innerCallbac
k); |
| 140 } | 145 } |
| 141 | 146 |
| 142 var promise = new Promise(executor.bind(this)); | 147 var promise = new Promise(executor.bind(this)); |
| 143 | 148 |
| 144 this._certificateDetailsCache.set(certificateId, promise); | 149 this._certificateDetailsCache.set(certificateId, promise); |
| 145 return promise; | 150 return promise; |
| 146 }, | 151 }, |
| 147 | 152 |
| 153 /** |
| 154 * @return {!WebInspector.Setting} |
| 155 */ |
| 156 bypassServiceWorkerSetting: function() |
| 157 { |
| 158 return this._bypassServiceWorkerSetting; |
| 159 }, |
| 160 |
| 161 _bypassServiceWorkerChanged: function() |
| 162 { |
| 163 this._networkAgent.setBypassServiceWorker(this._bypassServiceWorkerSetti
ng.get()); |
| 164 }, |
| 165 |
| 148 __proto__: WebInspector.SDKModel.prototype | 166 __proto__: WebInspector.SDKModel.prototype |
| 149 } | 167 } |
| 150 | 168 |
| 151 /** | 169 /** |
| 152 * @constructor | 170 * @constructor |
| 153 * @implements {NetworkAgent.Dispatcher} | 171 * @implements {NetworkAgent.Dispatcher} |
| 154 */ | 172 */ |
| 155 WebInspector.NetworkDispatcher = function(manager) | 173 WebInspector.NetworkDispatcher = function(manager) |
| 156 { | 174 { |
| 157 this._manager = manager; | 175 this._manager = manager; |
| (...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 WebInspector.ResourceLoader.load(url, headers, callback); | 905 WebInspector.ResourceLoader.load(url, headers, callback); |
| 888 }, | 906 }, |
| 889 | 907 |
| 890 __proto__: WebInspector.Object.prototype | 908 __proto__: WebInspector.Object.prototype |
| 891 } | 909 } |
| 892 | 910 |
| 893 /** | 911 /** |
| 894 * @type {!WebInspector.MultitargetNetworkManager} | 912 * @type {!WebInspector.MultitargetNetworkManager} |
| 895 */ | 913 */ |
| 896 WebInspector.multitargetNetworkManager; | 914 WebInspector.multitargetNetworkManager; |
| OLD | NEW |