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

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

Issue 2466473003: [Devtools] Fixed contextmenu in network timeline experiment. (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 elementsToRestoreScrollPositionsFor: function() 328 elementsToRestoreScrollPositionsFor: function()
329 { 329 {
330 if (!this._dataGrid) // Not initialized yet. 330 if (!this._dataGrid) // Not initialized yet.
331 return []; 331 return [];
332 return [this._dataGrid.scrollContainer]; 332 return [this._dataGrid.scrollContainer];
333 }, 333 },
334 334
335 _setupDataGrid: function() 335 _setupDataGrid: function()
336 { 336 {
337 this._dataGrid = this._columns.dataGrid(); 337 this._dataGrid = this._columns.dataGrid();
338 this._dataGrid.setRowContextMenuCallback(this._onRowContextMenu.bind(thi s)); 338 this._dataGrid.setRowContextMenuCallback((contextMenu, node) => this.han dleContextMenuForRequest(contextMenu, node.request()));
339 this._dataGrid.setStickToBottom(true); 339 this._dataGrid.setStickToBottom(true);
340 this._dataGrid.setName("networkLog"); 340 this._dataGrid.setName("networkLog");
341 this._dataGrid.setResizeMethod(WebInspector.DataGrid.ResizeMethod.Last); 341 this._dataGrid.setResizeMethod(WebInspector.DataGrid.ResizeMethod.Last);
342 this._dataGrid.element.classList.add("network-log-grid"); 342 this._dataGrid.element.classList.add("network-log-grid");
343 this._dataGrid.element.addEventListener("mousedown", this._dataGridMouse Down.bind(this), true); 343 this._dataGrid.element.addEventListener("mousedown", this._dataGridMouse Down.bind(this), true);
344 this._dataGrid.element.addEventListener("mousemove", this._dataGridMouse Move.bind(this), true); 344 this._dataGrid.element.addEventListener("mousemove", this._dataGridMouse Move.bind(this), true);
345 this._dataGrid.element.addEventListener("mouseleave", this._dataGridMous eLeave.bind(this), true); 345 this._dataGrid.element.addEventListener("mouseleave", this._dataGridMous eLeave.bind(this), true);
346 }, 346 },
347 347
348 /** 348 /**
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
873 /** 873 /**
874 * @param {boolean} gridMode 874 * @param {boolean} gridMode
875 */ 875 */
876 switchViewMode: function(gridMode) 876 switchViewMode: function(gridMode)
877 { 877 {
878 this._columns.switchViewMode(gridMode); 878 this._columns.switchViewMode(gridMode);
879 }, 879 },
880 880
881 /** 881 /**
882 * @param {!WebInspector.ContextMenu} contextMenu 882 * @param {!WebInspector.ContextMenu} contextMenu
883 * @param {!WebInspector.DataGridNode} node 883 * @param {!WebInspector.NetworkRequest} request
884 */ 884 */
885 _onRowContextMenu: function(contextMenu, node) 885 handleContextMenuForRequest: function(contextMenu, request)
886 { 886 {
887 var request = node.request();
888
889 contextMenu.appendApplicableItems(request); 887 contextMenu.appendApplicableItems(request);
890 var copyMenu = contextMenu.appendSubMenuItem(WebInspector.UIString("Copy ")); 888 var copyMenu = contextMenu.appendSubMenuItem(WebInspector.UIString("Copy "));
891 if (request) { 889 if (request) {
892 copyMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFr ontendHost.copyText.bind(InspectorFrontendHost, request.contentURL())); 890 copyMenu.appendItem(WebInspector.copyLinkAddressLabel(), InspectorFr ontendHost.copyText.bind(InspectorFrontendHost, request.contentURL()));
893 copyMenu.appendSeparator(); 891 copyMenu.appendSeparator();
894 892
895 if (request.requestHeadersText()) 893 if (request.requestHeadersText())
896 copyMenu.appendItem(WebInspector.UIString.capitalize("Copy ^requ est ^headers"), this._copyRequestHeaders.bind(this, request)); 894 copyMenu.appendItem(WebInspector.UIString.capitalize("Copy ^requ est ^headers"), this._copyRequestHeaders.bind(this, request));
897 if (request.responseHeadersText) 895 if (request.responseHeadersText)
898 copyMenu.appendItem(WebInspector.UIString.capitalize("Copy ^resp onse ^headers"), this._copyResponseHeaders.bind(this, request)); 896 copyMenu.appendItem(WebInspector.UIString.capitalize("Copy ^resp onse ^headers"), this._copyResponseHeaders.bind(this, request));
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after
1770 * @return {boolean} 1768 * @return {boolean}
1771 */ 1769 */
1772 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request) 1770 WebInspector.NetworkLogView._requestTimeFilter = function(windowStart, windowEnd , request)
1773 { 1771 {
1774 if (request.issueTime() > windowEnd) 1772 if (request.issueTime() > windowEnd)
1775 return false; 1773 return false;
1776 if (request.endTime !== -1 && request.endTime < windowStart) 1774 if (request.endTime !== -1 && request.endTime < windowStart)
1777 return false; 1775 return false;
1778 return true; 1776 return true;
1779 }; 1777 };
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/network/NetworkLogViewColumns.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698