Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js

Issue 1821103003: Reland of DevTools: Select max resource size in NetworkResourcesData depending on device capabilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 this._networkAgent.enable(); 47
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();
48 53
49 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific ateDetails>>} */ 54 /** @type {!Map<!NetworkAgent.CertificateId, !Promise<!NetworkAgent.Certific ateDetails>>} */
50 this._certificateDetailsCache = new Map(); 55 this._certificateDetailsCache = new Map();
51 56
52 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis abledSettingChanged, this); 57 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis abledSettingChanged, this);
53 } 58 }
54 59
55 WebInspector.NetworkManager.EventTypes = { 60 WebInspector.NetworkManager.EventTypes = {
56 RequestStarted: "RequestStarted", 61 RequestStarted: "RequestStarted",
57 RequestUpdated: "RequestUpdated", 62 RequestUpdated: "RequestUpdated",
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 WebInspector.ResourceLoader.load(url, headers, callback); 885 WebInspector.ResourceLoader.load(url, headers, callback);
881 }, 886 },
882 887
883 __proto__: WebInspector.Object.prototype 888 __proto__: WebInspector.Object.prototype
884 } 889 }
885 890
886 /** 891 /**
887 * @type {!WebInspector.MultitargetNetworkManager} 892 * @type {!WebInspector.MultitargetNetworkManager}
888 */ 893 */
889 WebInspector.multitargetNetworkManager; 894 WebInspector.multitargetNetworkManager;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp ('k') | third_party/WebKit/Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698