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

Side by Side Diff: Source/devtools/front_end/sdk/OverridesSupport.js

Issue 336393002: DevTools: quick fix for NetworkAgent.emulateNetworkConditions. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 PageAgent.setEmulatedMedia(this.settings.overrideCSSMedia.get() ? this.s ettings.emulatedCSSMedia.get() : ""); 816 PageAgent.setEmulatedMedia(this.settings.overrideCSSMedia.get() ? this.s ettings.emulatedCSSMedia.get() : "");
817 var targets = WebInspector.targetManager.targets(); 817 var targets = WebInspector.targetManager.targets();
818 for (var i = 0; i < targets.length; ++i) 818 for (var i = 0; i < targets.length; ++i)
819 targets[i].cssModel.mediaQueryResultChanged(); 819 targets[i].cssModel.mediaQueryResultChanged();
820 this.maybeHasActiveOverridesChanged(); 820 this.maybeHasActiveOverridesChanged();
821 }, 821 },
822 822
823 _networkConditionsChanged: function() 823 _networkConditionsChanged: function()
824 { 824 {
825 if (!this.settings.emulateNetworkConditions.get()) { 825 if (!this.settings.emulateNetworkConditions.get()) {
826 NetworkAgent.emulateNetworkConditions([], 0, false); 826 NetworkAgent.emulateNetworkConditions([], 0, false, 0, 0, 0);
827 } else { 827 } else {
828 var domainsString = this.settings.networkConditionsDomains.get().tri m(); 828 var domainsString = this.settings.networkConditionsDomains.get().tri m();
829 var domains = domainsString ? domainsString.split(",").map(function (s) { return s.trim(); }) : []; 829 var domains = domainsString ? domainsString.split(",").map(function (s) { return s.trim(); }) : [];
830 var throughput = this.settings.networkConditionsThroughput.get(); 830 var throughput = this.settings.networkConditionsThroughput.get();
831 var offline = !throughput; 831 var offline = !throughput;
832 NetworkAgent.emulateNetworkConditions(domains, throughput, offline); 832 NetworkAgent.emulateNetworkConditions(domains, throughput, offline, 0, throughput, throughput);
833 } 833 }
834 this.maybeHasActiveOverridesChanged(); 834 this.maybeHasActiveOverridesChanged();
835 }, 835 },
836 836
837 /** 837 /**
838 * @return {boolean} 838 * @return {boolean}
839 */ 839 */
840 showMetricsRulers: function() 840 showMetricsRulers: function()
841 { 841 {
842 var rulersInPageResizer = this._pageResizer && this.settings.emulateDevi ce.get(); 842 var rulersInPageResizer = this._pageResizer && this.settings.emulateDevi ce.get();
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 }, 1229 },
1230 1230
1231 __proto__: WebInspector.Object.prototype 1231 __proto__: WebInspector.Object.prototype
1232 } 1232 }
1233 1233
1234 1234
1235 /** 1235 /**
1236 * @type {!WebInspector.OverridesSupport} 1236 * @type {!WebInspector.OverridesSupport}
1237 */ 1237 */
1238 WebInspector.overridesSupport; 1238 WebInspector.overridesSupport;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698