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

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

Issue 2623743002: DevTools: extract modules (non-extensions) (Closed)
Patch Set: rebaseline Created 3 years, 11 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
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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 * @override 515 * @override
516 * @return {!Array.<!Element>} 516 * @return {!Array.<!Element>}
517 */ 517 */
518 elementsToRestoreScrollPositionsFor() { 518 elementsToRestoreScrollPositionsFor() {
519 if (!this._dataGrid) // Not initialized yet. 519 if (!this._dataGrid) // Not initialized yet.
520 return []; 520 return [];
521 return [this._dataGrid.scrollContainer]; 521 return [this._dataGrid.scrollContainer];
522 } 522 }
523 523
524 _setupDataGrid() { 524 _setupDataGrid() {
525 /** @type {!UI.SortableDataGrid<!Network.NetworkNode>} */ 525 /** @type {!DataGrid.SortableDataGrid<!Network.NetworkNode>} */
526 this._dataGrid = this._columns.dataGrid(); 526 this._dataGrid = this._columns.dataGrid();
527 this._dataGrid.setRowContextMenuCallback((contextMenu, node) => { 527 this._dataGrid.setRowContextMenuCallback((contextMenu, node) => {
528 var request = node.request(); 528 var request = node.request();
529 if (request) 529 if (request)
530 this.handleContextMenuForRequest(contextMenu, request); 530 this.handleContextMenuForRequest(contextMenu, request);
531 }); 531 });
532 this._dataGrid.setStickToBottom(true); 532 this._dataGrid.setStickToBottom(true);
533 this._dataGrid.setName('networkLog'); 533 this._dataGrid.setName('networkLog');
534 this._dataGrid.setResizeMethod(UI.DataGrid.ResizeMethod.Last); 534 this._dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last);
535 this._dataGrid.element.classList.add('network-log-grid'); 535 this._dataGrid.element.classList.add('network-log-grid');
536 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown .bind(this), true); 536 this._dataGrid.element.addEventListener('mousedown', this._dataGridMouseDown .bind(this), true);
537 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove .bind(this), true); 537 this._dataGrid.element.addEventListener('mousemove', this._dataGridMouseMove .bind(this), true);
538 this._dataGrid.element.addEventListener('mouseleave', () => this._setHovered Node(null), true); 538 this._dataGrid.element.addEventListener('mouseleave', () => this._setHovered Node(null), true);
539 } 539 }
540 540
541 /** 541 /**
542 * @param {!Event} event 542 * @param {!Event} event
543 */ 543 */
544 _dataGridMouseMove(event) { 544 _dataGridMouseMove(event) {
(...skipping 1174 matching lines...) Expand 10 before | Expand all | Expand 10 after
1719 Running: 'running', 1719 Running: 'running',
1720 FromCache: 'from-cache' 1720 FromCache: 'from-cache'
1721 }; 1721 };
1722 1722
1723 /** @type {!Array<string>} */ 1723 /** @type {!Array<string>} */
1724 Network.NetworkLogView._searchKeys = 1724 Network.NetworkLogView._searchKeys =
1725 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog View.FilterType[key]); 1725 Object.keys(Network.NetworkLogView.FilterType).map(key => Network.NetworkLog View.FilterType[key]);
1726 1726
1727 /** @typedef {function(!SDK.NetworkRequest): boolean} */ 1727 /** @typedef {function(!SDK.NetworkRequest): boolean} */
1728 Network.NetworkLogView.Filter; 1728 Network.NetworkLogView.Filter;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698