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

Side by Side Diff: Source/devtools/front_end/NetworkPanel.js

Issue 212933011: Persist network panel resource type filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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 | « Source/devtools/front_end/FilterBar.js ('k') | Source/devtools/front_end/Settings.js » ('j') | 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 }; 102 };
103 WebInspector.NetworkLogView._defaultRefreshDelay = 500; 103 WebInspector.NetworkLogView._defaultRefreshDelay = 500;
104 104
105 WebInspector.NetworkLogView.prototype = { 105 WebInspector.NetworkLogView.prototype = {
106 _addFilters: function() 106 _addFilters: function()
107 { 107 {
108 this._textFilterUI = new WebInspector.TextFilterUI(); 108 this._textFilterUI = new WebInspector.TextFilterUI();
109 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC hanged, this._filterChanged, this); 109 this._textFilterUI.addEventListener(WebInspector.FilterUI.Events.FilterC hanged, this._filterChanged, this);
110 this._filterBar.addFilter(this._textFilterUI); 110 this._filterBar.addFilter(this._textFilterUI);
111 111
112 this._resourceTypeFilterUI = new WebInspector.NamedBitSetFilterUI(); 112 var types = [];
113 for (var typeId in WebInspector.resourceTypes) { 113 for (var typeId in WebInspector.resourceTypes) {
114 var resourceType = WebInspector.resourceTypes[typeId]; 114 var resourceType = WebInspector.resourceTypes[typeId];
115 this._resourceTypeFilterUI.addBit(resourceType.name(), resourceType. categoryTitle()); 115 types.push({name: resourceType.name(), label: resourceType.categoryT itle()});
116 } 116 }
117 this._resourceTypeFilterUI = new WebInspector.NamedBitSetFilterUI(types, WebInspector.settings.networkResourceTypeFilters);
117 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this); 118 this._resourceTypeFilterUI.addEventListener(WebInspector.FilterUI.Events .FilterChanged, this._filterChanged.bind(this), this);
118 this._filterBar.addFilter(this._resourceTypeFilterUI); 119 this._filterBar.addFilter(this._resourceTypeFilterUI);
119 120
120 var dataURLSetting = WebInspector.settings.networkHideDataURL; 121 var dataURLSetting = WebInspector.settings.networkHideDataURL;
121 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting); 122 this._dataURLFilterUI = new WebInspector.CheckboxFilterUI("hide-data-url ", WebInspector.UIString("Hide data URLs"), true, dataURLSetting);
122 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this); 123 this._dataURLFilterUI.addEventListener(WebInspector.FilterUI.Events.Filt erChanged, this._filterChanged.bind(this), this);
123 this._filterBar.addFilter(this._dataURLFilterUI); 124 this._filterBar.addFilter(this._dataURLFilterUI);
124 }, 125 },
125 126
126 _resetSuggestionBuilder: function() 127 _resetSuggestionBuilder: function()
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2874 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b) 2875 WebInspector.NetworkDataGridNode.RequestPropertyComparator = function(propertyNa me, revert, a, b)
2875 { 2876 {
2876 var aValue = a._request[propertyName]; 2877 var aValue = a._request[propertyName];
2877 var bValue = b._request[propertyName]; 2878 var bValue = b._request[propertyName];
2878 if (aValue > bValue) 2879 if (aValue > bValue)
2879 return revert ? -1 : 1; 2880 return revert ? -1 : 1;
2880 if (bValue > aValue) 2881 if (bValue > aValue)
2881 return revert ? 1 : -1; 2882 return revert ? 1 : -1;
2882 return 0; 2883 return 0;
2883 } 2884 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/FilterBar.js ('k') | Source/devtools/front_end/Settings.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698