OLD | NEW |
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 Loading... |
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 Loading... |
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 }; |
OLD | NEW |