Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 405 { | 405 { |
| 406 var request = /** @type {?WebInspector.NetworkRequest} */ (event.data); | 406 var request = /** @type {?WebInspector.NetworkRequest} */ (event.data); |
| 407 this._showRequest(request); | 407 this._showRequest(request); |
| 408 }, | 408 }, |
| 409 | 409 |
| 410 /** | 410 /** |
| 411 * @param {?WebInspector.NetworkRequest} request | 411 * @param {?WebInspector.NetworkRequest} request |
| 412 */ | 412 */ |
| 413 _showRequest: function(request) | 413 _showRequest: function(request) |
| 414 { | 414 { |
| 415 if (Runtime.experiments.isEnabled("networkCanvasTimeline")) { | |
| 416 var lastSideBarSize = this._previousSideBarWidth || this._splitWidge t.sidebarSize(); | |
|
dgozman
2016/10/07 21:39:57
I don't get why we need this.
allada
2016/10/08 00:13:32
Done.
| |
| 417 this._previousSideBarWidth = this._splitWidget.sidebarSize(); | |
| 418 } | |
| 419 | |
| 415 if (this._networkItemView) { | 420 if (this._networkItemView) { |
| 416 this._networkItemView.detach(); | 421 this._networkItemView.detach(); |
| 417 this._networkItemView = null; | 422 this._networkItemView = null; |
| 418 } | 423 } |
| 419 | 424 |
| 420 if (request) { | 425 if (request) { |
| 421 this._networkItemView = new WebInspector.NetworkItemView(request, th is._networkLogView.timeCalculator()); | 426 this._networkItemView = new WebInspector.NetworkItemView(request, th is._networkLogView.timeCalculator()); |
| 427 if (Runtime.experiments.isEnabled("networkCanvasTimeline")) { | |
| 428 this._splitWidget.setMainWidget(this._detailsWidget); | |
| 429 this._splitWidget.setSidebarSize(lastSideBarSize); | |
| 430 } | |
| 422 this._networkItemView.leftToolbar().appendToolbarItem(new WebInspect or.ToolbarItem(this._closeButtonElement)); | 431 this._networkItemView.leftToolbar().appendToolbarItem(new WebInspect or.ToolbarItem(this._closeButtonElement)); |
| 423 this._networkItemView.show(this._detailsWidget.element); | 432 this._networkItemView.show(this._detailsWidget.element); |
| 424 this._splitWidget.showBoth(); | 433 this._splitWidget.showBoth(); |
| 425 } else { | 434 } else { |
| 426 this._splitWidget.hideMain(); | 435 this._splitWidget.hideMain(); |
| 427 this._networkLogView.clearSelection(); | 436 this._networkLogView.clearSelection(); |
| 428 } | 437 } |
| 429 this._updateUI(); | 438 this._updateUI(); |
| 430 }, | 439 }, |
| 431 | 440 |
| 432 _updateUI: function() | 441 _updateUI: function() |
| 433 { | 442 { |
| 434 this._detailsWidget.element.classList.toggle("network-details-view-tall- header", this._networkLogLargeRowsSetting.get()); | 443 this._detailsWidget.element.classList.toggle("network-details-view-tall- header", this._networkLogLargeRowsSetting.get()); |
| 435 this._networkLogView.switchViewMode(!this._splitWidget.isResizable()); | 444 this._networkLogView.switchViewMode(!this._networkItemView); |
| 436 }, | 445 }, |
| 437 | 446 |
| 438 /** | 447 /** |
| 439 * @override | 448 * @override |
| 440 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig | 449 * @param {!WebInspector.SearchableView.SearchConfig} searchConfig |
| 441 * @param {boolean} shouldJump | 450 * @param {boolean} shouldJump |
| 442 * @param {boolean=} jumpBackwards | 451 * @param {boolean=} jumpBackwards |
| 443 */ | 452 */ |
| 444 performSearch: function(searchConfig, shouldJump, jumpBackwards) | 453 performSearch: function(searchConfig, shouldJump, jumpBackwards) |
| 445 { | 454 { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 769 * @return {boolean} | 778 * @return {boolean} |
| 770 */ | 779 */ |
| 771 handleAction: function(context, actionId) | 780 handleAction: function(context, actionId) |
| 772 { | 781 { |
| 773 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); | 782 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); |
| 774 console.assert(panel && panel instanceof WebInspector.NetworkPanel); | 783 console.assert(panel && panel instanceof WebInspector.NetworkPanel); |
| 775 panel._toggleRecording(); | 784 panel._toggleRecording(); |
| 776 return true; | 785 return true; |
| 777 } | 786 } |
| 778 } | 787 } |
| OLD | NEW |