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

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

Issue 2856863006: [Devtools] Fix network grouping experiment (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 if (!Runtime.experiments.isEnabled('networkGroupingRequests')) 188 if (!Runtime.experiments.isEnabled('networkGroupingRequests'))
189 return; 189 return;
190 /** @type {!Array<!{value: string, label: string, title: string}>} */ 190 /** @type {!Array<!{value: string, label: string, title: string}>} */
191 var options = [{value: '', label: Common.UIString('No grouping'), title: Com mon.UIString('No grouping')}]; 191 var options = [{value: '', label: Common.UIString('No grouping'), title: Com mon.UIString('No grouping')}];
192 for (var name of this._networkLogView.groupLookups().keys()) 192 for (var name of this._networkLogView.groupLookups().keys())
193 options.push({value: name, label: Common.UIString(name), title: Common.UIS tring(name)}); 193 options.push({value: name, label: Common.UIString(name), title: Common.UIS tring(name)});
194 194
195 var setting = Common.settings.createSetting('networkGrouping', ''); 195 var setting = Common.settings.createSetting('networkGrouping', '');
196 this._panelToolbar.appendToolbarItem(new UI.ToolbarSettingComboBox(options, setting, Common.UIString('Group by'))); 196 this._panelToolbar.appendToolbarItem(new UI.ToolbarSettingComboBox(options, setting, Common.UIString('Group by')));
197 setting.addChangeListener(event => this._networkLogView.setGrouping(/** @typ e {string} */ (event.data))); 197 setting.addChangeListener(event => this._networkLogView.setGrouping(/** @typ e {string} */ (event.data)));
198 this._networkLogView.setGrouping(/** @type {string} */ (setting.get()));
198 } 199 }
199 200
200 /** 201 /**
201 * @return {!UI.ToolbarComboBox} 202 * @return {!UI.ToolbarComboBox}
202 */ 203 */
203 _createNetworkConditionsSelect() { 204 _createNetworkConditionsSelect() {
204 var toolbarItem = new UI.ToolbarComboBox(null); 205 var toolbarItem = new UI.ToolbarComboBox(null);
205 toolbarItem.setMaxWidth(140); 206 toolbarItem.setMaxWidth(140);
206 NetworkConditions.NetworkConditionsSelector.decorateSelect(toolbarItem.selec tElement()); 207 NetworkConditions.NetworkConditionsSelector.decorateSelect(toolbarItem.selec tElement());
207 return toolbarItem; 208 return toolbarItem;
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 * @param {string} actionId 726 * @param {string} actionId
726 * @return {boolean} 727 * @return {boolean}
727 */ 728 */
728 handleAction(context, actionId) { 729 handleAction(context, actionId) {
729 var panel = UI.context.flavor(Network.NetworkPanel); 730 var panel = UI.context.flavor(Network.NetworkPanel);
730 console.assert(panel && panel instanceof Network.NetworkPanel); 731 console.assert(panel && panel instanceof Network.NetworkPanel);
731 panel._toggleRecording(); 732 panel._toggleRecording();
732 return true; 733 return true;
733 } 734 }
734 }; 735 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698