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

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

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: test fixed Created 4 years, 2 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 * @param {!Object} target 495 * @param {!Object} target
496 * @this {WebInspector.NetworkPanel} 496 * @this {WebInspector.NetworkPanel}
497 */ 497 */
498 appendApplicableItems: function(event, contextMenu, target) 498 appendApplicableItems: function(event, contextMenu, target)
499 { 499 {
500 /** 500 /**
501 * @this {WebInspector.NetworkPanel} 501 * @this {WebInspector.NetworkPanel}
502 */ 502 */
503 function reveal(request) 503 function reveal(request)
504 { 504 {
505 WebInspector.inspectorView.setCurrentPanel(this); 505 WebInspector.viewManager.showView("network").then(this.revealAndHigh lightRequest.bind(this, request));
506 this.revealAndHighlightRequest(request);
507 } 506 }
508 507
509 /** 508 /**
510 * @this {WebInspector.NetworkPanel} 509 * @this {WebInspector.NetworkPanel}
511 */ 510 */
512 function appendRevealItem(request) 511 function appendRevealItem(request)
513 { 512 {
514 contextMenu.appendItem(WebInspector.UIString.capitalize("Reveal in N etwork ^panel"), reveal.bind(this, request)); 513 contextMenu.appendItem(WebInspector.UIString.capitalize("Reveal in N etwork ^panel"), reveal.bind(this, request));
515 } 514 }
516 515
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 /** 616 /**
618 * @override 617 * @override
619 * @param {!Object} request 618 * @param {!Object} request
620 * @return {!Promise} 619 * @return {!Promise}
621 */ 620 */
622 reveal: function(request) 621 reveal: function(request)
623 { 622 {
624 if (!(request instanceof WebInspector.NetworkRequest)) 623 if (!(request instanceof WebInspector.NetworkRequest))
625 return Promise.reject(new Error("Internal error: not a network reque st")); 624 return Promise.reject(new Error("Internal error: not a network reque st"));
626 var panel = WebInspector.NetworkPanel._instance(); 625 var panel = WebInspector.NetworkPanel._instance();
627 WebInspector.inspectorView.setCurrentPanel(panel); 626 return WebInspector.viewManager.showView("network").then(panel.revealAnd HighlightRequest.bind(panel, request));
628 panel.revealAndHighlightRequest(request);
629 return Promise.resolve();
630 } 627 }
631 } 628 }
632 629
633
634 WebInspector.NetworkPanel.show = function()
635 {
636 WebInspector.inspectorView.setCurrentPanel(WebInspector.NetworkPanel._instan ce());
637 }
638
639 /** 630 /**
640 * @param {!Array<{filterType: !WebInspector.NetworkLogView.FilterType, filterVa lue: string}>} filters 631 * @param {!Array<{filterType: !WebInspector.NetworkLogView.FilterType, filterVa lue: string}>} filters
641 */ 632 */
642 WebInspector.NetworkPanel.revealAndFilter = function(filters) 633 WebInspector.NetworkPanel.revealAndFilter = function(filters)
643 { 634 {
644 var panel = WebInspector.NetworkPanel._instance(); 635 var panel = WebInspector.NetworkPanel._instance();
645 var filterString = ""; 636 var filterString = "";
646 for (var filter of filters) 637 for (var filter of filters)
647 filterString += `${filter.filterType}:${filter.filterValue} `; 638 filterString += `${filter.filterType}:${filter.filterValue} `;
648 panel._networkLogView.setTextFilterValue(filterString); 639 panel._networkLogView.setTextFilterValue(filterString);
649 WebInspector.inspectorView.setCurrentPanel(panel); 640 WebInspector.viewManager.showView("network");
650 } 641 }
651 642
652 /** 643 /**
653 * @return {!WebInspector.NetworkPanel} 644 * @return {!WebInspector.NetworkPanel}
654 */ 645 */
655 WebInspector.NetworkPanel._instance = function() 646 WebInspector.NetworkPanel._instance = function()
656 { 647 {
657 return /** @type {!WebInspector.NetworkPanel} */ (self.runtime.sharedInstanc e(WebInspector.NetworkPanel)); 648 return /** @type {!WebInspector.NetworkPanel} */ (self.runtime.sharedInstanc e(WebInspector.NetworkPanel));
658 } 649 }
659 650
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 * @return {boolean} 760 * @return {boolean}
770 */ 761 */
771 handleAction: function(context, actionId) 762 handleAction: function(context, actionId)
772 { 763 {
773 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); 764 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel);
774 console.assert(panel && panel instanceof WebInspector.NetworkPanel); 765 console.assert(panel && panel instanceof WebInspector.NetworkPanel);
775 panel._toggleRecording(); 766 panel._toggleRecording();
776 return true; 767 return true;
777 } 768 }
778 } 769 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698