| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 /** @type {?PerfUI.FilmStripView} */ | 45 /** @type {?PerfUI.FilmStripView} */ |
| 46 this._filmStripView = null; | 46 this._filmStripView = null; |
| 47 /** @type {?Network.NetworkPanel.FilmStripRecorder} */ | 47 /** @type {?Network.NetworkPanel.FilmStripRecorder} */ |
| 48 this._filmStripRecorder = null; | 48 this._filmStripRecorder = null; |
| 49 | 49 |
| 50 this._panelToolbar = new UI.Toolbar('', this.element); | 50 this._panelToolbar = new UI.Toolbar('', this.element); |
| 51 this._filterBar = new UI.FilterBar('networkPanel', true); | 51 this._filterBar = new UI.FilterBar('networkPanel', true); |
| 52 this._filterBar.show(this.element); | 52 this._filterBar.show(this.element); |
| 53 | 53 |
| 54 this._filmStripPlaceholderElement = this.element.createChild('div'); |
| 55 |
| 54 // Create top overview component. | 56 // Create top overview component. |
| 55 this._overviewPane = new PerfUI.TimelineOverviewPane('network'); | 57 this._overviewPane = new PerfUI.TimelineOverviewPane('network'); |
| 56 this._overviewPane.addEventListener( | 58 this._overviewPane.addEventListener( |
| 57 PerfUI.TimelineOverviewPane.Events.WindowChanged, this._onWindowChanged.
bind(this)); | 59 PerfUI.TimelineOverviewPane.Events.WindowChanged, this._onWindowChanged.
bind(this)); |
| 58 this._overviewPane.element.id = 'network-overview-panel'; | 60 this._overviewPane.element.id = 'network-overview-panel'; |
| 59 this._networkOverview = new Network.NetworkOverview(); | 61 this._networkOverview = new Network.NetworkOverview(); |
| 60 this._overviewPane.setOverviewControls([this._networkOverview]); | 62 this._overviewPane.setOverviewControls([this._networkOverview]); |
| 63 this._overviewPlaceholderElement = this.element.createChild('div'); |
| 64 |
| 61 this._calculator = new Network.NetworkTransferTimeCalculator(); | 65 this._calculator = new Network.NetworkTransferTimeCalculator(); |
| 62 | 66 |
| 63 this._splitWidget = new UI.SplitWidget(true, false, 'networkPanelSplitViewSt
ate'); | 67 this._splitWidget = new UI.SplitWidget(true, false, 'networkPanelSplitViewSt
ate'); |
| 64 this._splitWidget.hideMain(); | 68 this._splitWidget.hideMain(); |
| 65 | 69 |
| 66 this._splitWidget.show(this.element); | 70 this._splitWidget.show(this.element); |
| 67 | 71 |
| 68 this._progressBarContainer = createElement('div'); | 72 this._progressBarContainer = createElement('div'); |
| 69 | 73 |
| 70 this._searchableView = new UI.SearchableView(this); | 74 this._searchableView = new UI.SearchableView(this); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 delete this._pendingStopTimer; | 293 delete this._pendingStopTimer; |
| 290 } | 294 } |
| 291 | 295 |
| 292 _toggleLargerRequests() { | 296 _toggleLargerRequests() { |
| 293 this._updateUI(); | 297 this._updateUI(); |
| 294 } | 298 } |
| 295 | 299 |
| 296 _toggleShowOverview() { | 300 _toggleShowOverview() { |
| 297 var toggled = this._networkLogShowOverviewSetting.get(); | 301 var toggled = this._networkLogShowOverviewSetting.get(); |
| 298 if (toggled) | 302 if (toggled) |
| 299 this._overviewPane.show(this.element, this._splitWidget.element); | 303 this._overviewPane.show(this._overviewPlaceholderElement); |
| 300 else | 304 else |
| 301 this._overviewPane.detach(); | 305 this._overviewPane.detach(); |
| 302 this.doResize(); | 306 this.doResize(); |
| 303 } | 307 } |
| 304 | 308 |
| 305 _toggleRecordFilmStrip() { | 309 _toggleRecordFilmStrip() { |
| 306 var toggled = this._networkRecordFilmStripSetting.get(); | 310 var toggled = this._networkRecordFilmStripSetting.get(); |
| 307 if (toggled && !this._filmStripRecorder) { | 311 if (toggled && !this._filmStripRecorder) { |
| 308 this._filmStripView = new PerfUI.FilmStripView(); | 312 this._filmStripView = new PerfUI.FilmStripView(); |
| 309 this._filmStripView.setMode(PerfUI.FilmStripView.Modes.FrameBased); | 313 this._filmStripView.setMode(PerfUI.FilmStripView.Modes.FrameBased); |
| 310 this._filmStripView.element.classList.add('network-film-strip'); | 314 this._filmStripView.element.classList.add('network-film-strip'); |
| 311 this._filmStripRecorder = | 315 this._filmStripRecorder = |
| 312 new Network.NetworkPanel.FilmStripRecorder(this._networkLogView.timeCa
lculator(), this._filmStripView); | 316 new Network.NetworkPanel.FilmStripRecorder(this._networkLogView.timeCa
lculator(), this._filmStripView); |
| 313 this._filmStripView.show(this.element, this._overviewPane.element); | 317 this._filmStripView.show(this._filmStripPlaceholderElement); |
| 314 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameSele
cted, this._onFilmFrameSelected, this); | 318 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameSele
cted, this._onFilmFrameSelected, this); |
| 315 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameEnte
r, this._onFilmFrameEnter, this); | 319 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameEnte
r, this._onFilmFrameEnter, this); |
| 316 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameExit
, this._onFilmFrameExit, this); | 320 this._filmStripView.addEventListener(PerfUI.FilmStripView.Events.FrameExit
, this._onFilmFrameExit, this); |
| 317 this._resetFilmStripView(); | 321 this._resetFilmStripView(); |
| 318 } | 322 } |
| 319 | 323 |
| 320 if (!toggled && this._filmStripRecorder) { | 324 if (!toggled && this._filmStripRecorder) { |
| 321 this._filmStripView.detach(); | 325 this._filmStripView.detach(); |
| 322 this._filmStripView = null; | 326 this._filmStripView = null; |
| 323 this._filmStripRecorder = null; | 327 this._filmStripRecorder = null; |
| (...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 * @param {string} actionId | 720 * @param {string} actionId |
| 717 * @return {boolean} | 721 * @return {boolean} |
| 718 */ | 722 */ |
| 719 handleAction(context, actionId) { | 723 handleAction(context, actionId) { |
| 720 var panel = UI.context.flavor(Network.NetworkPanel); | 724 var panel = UI.context.flavor(Network.NetworkPanel); |
| 721 console.assert(panel && panel instanceof Network.NetworkPanel); | 725 console.assert(panel && panel instanceof Network.NetworkPanel); |
| 722 panel._toggleRecording(); | 726 panel._toggleRecording(); |
| 723 return true; | 727 return true; |
| 724 } | 728 } |
| 725 }; | 729 }; |
| OLD | NEW |