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

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

Issue 2545983002: DevTools: Use TextPrompt for FilterBar instead of input element (Closed)
Patch Set: Use textWithCurrentSuggestion Created 4 years 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
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 } 436 }
437 437
438 _resetSuggestionBuilder() { 438 _resetSuggestionBuilder() {
439 this._suggestionBuilder = new Network.FilterSuggestionBuilder(Network.Networ kLogView._searchKeys); 439 this._suggestionBuilder = new Network.FilterSuggestionBuilder(Network.Networ kLogView._searchKeys);
440 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.Is, Networ k.NetworkLogView.IsFilterType.Running); 440 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.Is, Networ k.NetworkLogView.IsFilterType.Running);
441 this._suggestionBuilder.addItem( 441 this._suggestionBuilder.addItem(
442 Network.NetworkLogView.FilterType.Is, Network.NetworkLogView.IsFilterTyp e.FromCache); 442 Network.NetworkLogView.FilterType.Is, Network.NetworkLogView.IsFilterTyp e.FromCache);
443 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '100'); 443 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '100');
444 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '10k'); 444 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '10k');
445 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '1M'); 445 this._suggestionBuilder.addItem(Network.NetworkLogView.FilterType.LargerThan , '1M');
446 this._textFilterUI.setSuggestionBuilder(this._suggestionBuilder); 446 this._textFilterUI.setSuggestionProvider(this._suggestionBuilder.completions .bind(this._suggestionBuilder));
447 } 447 }
448 448
449 /** 449 /**
450 * @param {!Common.Event} event 450 * @param {!Common.Event} event
451 */ 451 */
452 _filterChanged(event) { 452 _filterChanged(event) {
453 this.removeAllNodeHighlights(); 453 this.removeAllNodeHighlights();
454 this._parseFilterQuery(this._textFilterUI.value()); 454 this._parseFilterQuery(this._textFilterUI.value());
455 this._filterRequests(); 455 this._filterRequests();
456 } 456 }
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1713 Running: 'running', 1713 Running: 'running',
1714 FromCache: 'from-cache' 1714 FromCache: 'from-cache'
1715 }; 1715 };
1716 1716
1717 /** @type {!Array<string>} */ 1717 /** @type {!Array<string>} */
1718 Network.NetworkLogView._searchKeys = 1718 Network.NetworkLogView._searchKeys =
1719 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog View.FilterType[key]); 1719 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog View.FilterType[key]);
1720 1720
1721 /** @typedef {function(!SDK.NetworkRequest): boolean} */ 1721 /** @typedef {function(!SDK.NetworkRequest): boolean} */
1722 Network.NetworkLogView.Filter; 1722 Network.NetworkLogView.Filter;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698