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

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

Issue 2025953002: DevTools: generate class-per domain for remote debugging protocol. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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<!SecurityAgent.CertificateId, !Promise<!NetworkAgent.Certifi cateDetails>>} */
55 this._certificateDetailsCache = new Map(); 55 this._certificateDetailsCache = new Map();
56 56
57 this._bypassServiceWorkerSetting = WebInspector.settings.createSetting("bypa ssServiceWorker", false); 57 this._bypassServiceWorkerSetting = WebInspector.settings.createSetting("bypa ssServiceWorker", false);
58 if (this._bypassServiceWorkerSetting.get()) 58 if (this._bypassServiceWorkerSetting.get())
59 this._bypassServiceWorkerChanged(); 59 this._bypassServiceWorkerChanged();
60 this._bypassServiceWorkerSetting.addChangeListener(this._bypassServiceWorker Changed, this); 60 this._bypassServiceWorkerSetting.addChangeListener(this._bypassServiceWorker Changed, this);
61 61
62 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis abledSettingChanged, this); 62 WebInspector.moduleSetting("cacheDisabled").addChangeListener(this._cacheDis abledSettingChanged, this);
63 } 63 }
64 64
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 var enabled = /** @type {boolean} */ (event.data); 106 var enabled = /** @type {boolean} */ (event.data);
107 this._networkAgent.setCacheDisabled(enabled); 107 this._networkAgent.setCacheDisabled(enabled);
108 }, 108 },
109 109
110 dispose: function() 110 dispose: function()
111 { 111 {
112 WebInspector.moduleSetting("cacheDisabled").removeChangeListener(this._c acheDisabledSettingChanged, this); 112 WebInspector.moduleSetting("cacheDisabled").removeChangeListener(this._c acheDisabledSettingChanged, this);
113 }, 113 },
114 114
115 /** 115 /**
116 * @param {!NetworkAgent.CertificateId} certificateId 116 * @param {!SecurityAgent.CertificateId} certificateId
117 * @return {!Promise<!NetworkAgent.CertificateDetails>} 117 * @return {!Promise<!NetworkAgent.CertificateDetails>}
118 */ 118 */
119 certificateDetailsPromise: function(certificateId) 119 certificateDetailsPromise: function(certificateId)
120 { 120 {
121 var cachedPromise = this._certificateDetailsCache.get(certificateId); 121 var cachedPromise = this._certificateDetailsCache.get(certificateId);
122 if (cachedPromise) 122 if (cachedPromise)
123 return cachedPromise; 123 return cachedPromise;
124 124
125 /** 125 /**
126 * @this {WebInspector.NetworkManager} 126 * @this {WebInspector.NetworkManager}
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 target.networkAgent().clearBrowserCache(); 873 target.networkAgent().clearBrowserCache();
874 }, 874 },
875 875
876 clearBrowserCookies: function() 876 clearBrowserCookies: function()
877 { 877 {
878 for (var target of WebInspector.targetManager.targets()) 878 for (var target of WebInspector.targetManager.targets())
879 target.networkAgent().clearBrowserCookies(); 879 target.networkAgent().clearBrowserCookies();
880 }, 880 },
881 881
882 /** 882 /**
883 * @param {!NetworkAgent.CertificateId} certificateId 883 * @param {!SecurityAgent.CertificateId} certificateId
884 */ 884 */
885 showCertificateViewer: function(certificateId) 885 showCertificateViewer: function(certificateId)
886 { 886 {
887 var target = WebInspector.targetManager.mainTarget(); 887 var target = WebInspector.targetManager.mainTarget();
888 if (target) 888 if (target)
889 target.networkAgent().showCertificateViewer(certificateId); 889 target.networkAgent().showCertificateViewer(certificateId);
890 }, 890 },
891 891
892 /** 892 /**
893 * @param {string} url 893 * @param {string} url
(...skipping 13 matching lines...) Expand all
907 WebInspector.ResourceLoader.load(url, headers, callback); 907 WebInspector.ResourceLoader.load(url, headers, callback);
908 }, 908 },
909 909
910 __proto__: WebInspector.Object.prototype 910 __proto__: WebInspector.Object.prototype
911 } 911 }
912 912
913 /** 913 /**
914 * @type {!WebInspector.MultitargetNetworkManager} 914 * @type {!WebInspector.MultitargetNetworkManager}
915 */ 915 */
916 WebInspector.multitargetNetworkManager; 916 WebInspector.multitargetNetworkManager;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698