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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/network/NetworkPanel.js

Issue 2758183002: DevTools: Fix Network panel warning icon display when offline/throttled (Closed)
Patch Set: Created 3 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
« no previous file with comments | « AUTHORS ('k') | 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2011 Google Inc. All rights reserved. 4 * Copyright (C) 2011 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 this._networkLogView.addEventListener( 108 this._networkLogView.addEventListener(
109 Network.NetworkLogView.Events.SearchIndexUpdated, this._onSearchIndexUpd ated, this); 109 Network.NetworkLogView.Events.SearchIndexUpdated, this._onSearchIndexUpd ated, this);
110 this._networkLogView.addEventListener(Network.NetworkLogView.Events.UpdateRe quest, this._onUpdateRequest, this); 110 this._networkLogView.addEventListener(Network.NetworkLogView.Events.UpdateRe quest, this._onUpdateRequest, this);
111 111
112 Components.DataSaverInfobar.maybeShowInPanel(this); 112 Components.DataSaverInfobar.maybeShowInPanel(this);
113 113
114 var blockedURLsSetting = Common.moduleSetting('networkBlockedURLs'); 114 var blockedURLsSetting = Common.moduleSetting('networkBlockedURLs');
115 blockedURLsSetting.addChangeListener(updateIconVisibility.bind(this)); 115 blockedURLsSetting.addChangeListener(updateIconVisibility.bind(this));
116 var requestBlockingEnabledSetting = Common.moduleSetting('requestBlockingEna bled'); 116 var requestBlockingEnabledSetting = Common.moduleSetting('requestBlockingEna bled');
117 requestBlockingEnabledSetting.addChangeListener(updateIconVisibility.bind(th is)); 117 requestBlockingEnabledSetting.addChangeListener(updateIconVisibility.bind(th is));
118 SDK.multitargetNetworkManager.addEventListener(
119 SDK.MultitargetNetworkManager.Events.ConditionsChanged, updateIconVisibi lity.bind(this));
118 120
119 updateIconVisibility.call(this); 121 updateIconVisibility.call(this);
120 122
121 /** 123 /**
122 * @this {Network.NetworkPanel} 124 * @this {Network.NetworkPanel}
123 */ 125 */
124 function updateIconVisibility() { 126 function updateIconVisibility() {
125 var icon = null; 127 var icon = null;
126 if (SDK.multitargetNetworkManager.isThrottling()) { 128 if (SDK.multitargetNetworkManager.isThrottling()) {
127 icon = UI.Icon.create('smallicon-warning'); 129 icon = UI.Icon.create('smallicon-warning');
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 * @param {string} actionId 771 * @param {string} actionId
770 * @return {boolean} 772 * @return {boolean}
771 */ 773 */
772 handleAction(context, actionId) { 774 handleAction(context, actionId) {
773 var panel = UI.context.flavor(Network.NetworkPanel); 775 var panel = UI.context.flavor(Network.NetworkPanel);
774 console.assert(panel && panel instanceof Network.NetworkPanel); 776 console.assert(panel && panel instanceof Network.NetworkPanel);
775 panel._toggleRecording(); 777 panel._toggleRecording();
776 return true; 778 return true;
777 } 779 }
778 }; 780 };
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698