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 26 matching lines...) Expand all Loading... |
37 { | 37 { |
38 WebInspector.SDKModel.call(this, WebInspector.NetworkManager, target); | 38 WebInspector.SDKModel.call(this, WebInspector.NetworkManager, target); |
39 this._dispatcher = new WebInspector.NetworkDispatcher(this); | 39 this._dispatcher = new WebInspector.NetworkDispatcher(this); |
40 this._target = target; | 40 this._target = target; |
41 this._networkAgent = target.networkAgent(); | 41 this._networkAgent = target.networkAgent(); |
42 target.registerNetworkDispatcher(this._dispatcher); | 42 target.registerNetworkDispatcher(this._dispatcher); |
43 if (WebInspector.moduleSetting("cacheDisabled").get()) | 43 if (WebInspector.moduleSetting("cacheDisabled").get()) |
44 this._networkAgent.setCacheDisabled(true); | 44 this._networkAgent.setCacheDisabled(true); |
45 if (WebInspector.moduleSetting("monitoringXHREnabled").get()) | 45 if (WebInspector.moduleSetting("monitoringXHREnabled").get()) |
46 this._networkAgent.setMonitoringXHREnabled(true); | 46 this._networkAgent.setMonitoringXHREnabled(true); |
47 | 47 this._networkAgent.enable(); |
48 // Limit buffer when talking to a remote device. | |
49 if (Runtime.queryParam("remoteFrontend") || Runtime.queryParam("ws")) | |
50 this._networkAgent.enable(10000000, 5000000); | |
51 else | |
52 this._networkAgent.enable(); | |
53 | 48 |
54 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific
ateDetails>>} */ | 49 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific
ateDetails>>} */ |
55 this._certificateDetailsCache = new Map(); | 50 this._certificateDetailsCache = new Map(); |
56 | 51 |
57 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis
abledSettingChanged, this); | 52 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis
abledSettingChanged, this); |
58 } | 53 } |
59 | 54 |
60 WebInspector.NetworkManager.EventTypes = { | 55 WebInspector.NetworkManager.EventTypes = { |
61 RequestStarted: "RequestStarted", | 56 RequestStarted: "RequestStarted", |
62 RequestUpdated: "RequestUpdated", | 57 RequestUpdated: "RequestUpdated", |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 WebInspector.ResourceLoader.load(url, headers, callback); | 880 WebInspector.ResourceLoader.load(url, headers, callback); |
886 }, | 881 }, |
887 | 882 |
888 __proto__: WebInspector.Object.prototype | 883 __proto__: WebInspector.Object.prototype |
889 } | 884 } |
890 | 885 |
891 /** | 886 /** |
892 * @type {!WebInspector.MultitargetNetworkManager} | 887 * @type {!WebInspector.MultitargetNetworkManager} |
893 */ | 888 */ |
894 WebInspector.multitargetNetworkManager; | 889 WebInspector.multitargetNetworkManager; |
OLD | NEW |