| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 /** @type {?WebInspector.FilmStripView} */ | 47 /** @type {?WebInspector.FilmStripView} */ |
| 48 this._filmStripView = null; | 48 this._filmStripView = null; |
| 49 /** @type {?WebInspector.NetworkPanel.FilmStripRecorder} */ | 49 /** @type {?WebInspector.NetworkPanel.FilmStripRecorder} */ |
| 50 this._filmStripRecorder = null; | 50 this._filmStripRecorder = null; |
| 51 | 51 |
| 52 this._panelToolbar = new WebInspector.Toolbar("", this.element); | 52 this._panelToolbar = new WebInspector.Toolbar("", this.element); |
| 53 this._filterBar = new WebInspector.FilterBar("networkPanel", true); | 53 this._filterBar = new WebInspector.FilterBar("networkPanel", true); |
| 54 this._filterBar.show(this.element); | 54 this._filterBar.show(this.element); |
| 55 | 55 |
| 56 this._searchableView = new WebInspector.SearchableView(this); | |
| 57 this._searchableView.setPlaceholder(WebInspector.UIString("Find by filename
or path")); | |
| 58 this._searchableView.show(this.element); | |
| 59 | |
| 60 // Create top overview component. | 56 // Create top overview component. |
| 61 this._overviewPane = new WebInspector.TimelineOverviewPane("network"); | 57 this._overviewPane = new WebInspector.TimelineOverviewPane("network"); |
| 62 this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events
.WindowChanged, this._onWindowChanged.bind(this)); | 58 this._overviewPane.addEventListener(WebInspector.TimelineOverviewPane.Events
.WindowChanged, this._onWindowChanged.bind(this)); |
| 63 this._overviewPane.element.id = "network-overview-panel"; | 59 this._overviewPane.element.id = "network-overview-panel"; |
| 64 this._networkOverview = new WebInspector.NetworkOverview(); | 60 this._networkOverview = new WebInspector.NetworkOverview(); |
| 65 this._overviewPane.setOverviewControls([this._networkOverview]); | 61 this._overviewPane.setOverviewControls([this._networkOverview]); |
| 66 this._calculator = new WebInspector.NetworkTransferTimeCalculator(); | 62 this._calculator = new WebInspector.NetworkTransferTimeCalculator(); |
| 67 | 63 |
| 68 this._splitWidget = new WebInspector.SplitWidget(true, false, "networkPanelS
plitViewState"); | 64 this._splitWidget = new WebInspector.SplitWidget(true, false, "networkPanelS
plitViewState"); |
| 69 this._splitWidget.hideMain(); | 65 this._splitWidget.hideMain(); |
| 70 | 66 |
| 71 this._splitWidget.show(this._searchableView.element); | 67 this._splitWidget.show(this.element); |
| 72 | 68 |
| 73 this._progressBarContainer = createElement("div"); | 69 this._progressBarContainer = createElement("div"); |
| 74 this._createToolbarButtons(); | 70 this._createToolbarButtons(); |
| 75 | 71 |
| 72 this._searchableView = new WebInspector.SearchableView(this); |
| 73 this._searchableView.setPlaceholder(WebInspector.UIString("Find by filename
or path")); |
| 74 |
| 76 /** @type {!WebInspector.NetworkLogView} */ | 75 /** @type {!WebInspector.NetworkLogView} */ |
| 77 this._networkLogView = new WebInspector.NetworkLogView(this._filterBar, this
._progressBarContainer, this._networkLogLargeRowsSetting); | 76 this._networkLogView = new WebInspector.NetworkLogView(this._filterBar, this
._progressBarContainer, this._networkLogLargeRowsSetting); |
| 78 this._splitWidget.setSidebarWidget(this._networkLogView); | 77 this._networkLogView.show(this._searchableView.element); |
| 78 |
| 79 this._splitWidget.setSidebarWidget(this._searchableView); |
| 79 | 80 |
| 80 this._detailsWidget = new WebInspector.VBox(); | 81 this._detailsWidget = new WebInspector.VBox(); |
| 81 this._detailsWidget.element.classList.add("network-details-view"); | 82 this._detailsWidget.element.classList.add("network-details-view"); |
| 82 this._splitWidget.setMainWidget(this._detailsWidget); | 83 this._splitWidget.setMainWidget(this._detailsWidget); |
| 83 | 84 |
| 84 this._closeButtonElement = createElementWithClass("div", "network-close-butt
on", "dt-close-button"); | 85 this._closeButtonElement = createElementWithClass("div", "network-close-butt
on", "dt-close-button"); |
| 85 this._closeButtonElement.addEventListener("click", this._showRequest.bind(th
is, null), false); | 86 this._closeButtonElement.addEventListener("click", this._showRequest.bind(th
is, null), false); |
| 86 | 87 |
| 87 this._networkLogShowOverviewSetting.addChangeListener(this._toggleShowOvervi
ew, this); | 88 this._networkLogShowOverviewSetting.addChangeListener(this._toggleShowOvervi
ew, this); |
| 88 this._networkLogLargeRowsSetting.addChangeListener(this._toggleLargerRequest
s, this); | 89 this._networkLogLargeRowsSetting.addChangeListener(this._toggleLargerRequest
s, this); |
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 | 277 |
| 277 _toggleLargerRequests: function() | 278 _toggleLargerRequests: function() |
| 278 { | 279 { |
| 279 this._updateUI(); | 280 this._updateUI(); |
| 280 }, | 281 }, |
| 281 | 282 |
| 282 _toggleShowOverview: function() | 283 _toggleShowOverview: function() |
| 283 { | 284 { |
| 284 var toggled = this._networkLogShowOverviewSetting.get(); | 285 var toggled = this._networkLogShowOverviewSetting.get(); |
| 285 if (toggled) | 286 if (toggled) |
| 286 this._overviewPane.show(this._searchableView.element, this._splitWid
get.element); | 287 this._overviewPane.show(this.element, this._splitWidget.element); |
| 287 else | 288 else |
| 288 this._overviewPane.detach(); | 289 this._overviewPane.detach(); |
| 289 this.doResize(); | 290 this.doResize(); |
| 290 }, | 291 }, |
| 291 | 292 |
| 292 _toggleRecordFilmStrip: function() | 293 _toggleRecordFilmStrip: function() |
| 293 { | 294 { |
| 294 var toggled = this._networkRecordFilmStripSetting.get(); | 295 var toggled = this._networkRecordFilmStripSetting.get(); |
| 295 if (toggled && !this._filmStripRecorder) { | 296 if (toggled && !this._filmStripRecorder) { |
| 296 this._filmStripView = new WebInspector.FilmStripView(); | 297 this._filmStripView = new WebInspector.FilmStripView(); |
| 297 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa
sed); | 298 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa
sed); |
| 298 this._filmStripView.element.classList.add("network-film-strip"); | 299 this._filmStripView.element.classList.add("network-film-strip"); |
| 299 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec
order(this._networkLogView.timeCalculator(), this._filmStripView); | 300 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec
order(this._networkLogView.timeCalculator(), this._filmStripView); |
| 300 this._filmStripView.show(this._searchableView.element, this._searcha
bleView.element.firstElementChild); | 301 this._filmStripView.show(this.element, this.element.firstElementChil
d); |
| 301 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameSelected, this._onFilmFrameSelected, this); | 302 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameSelected, this._onFilmFrameSelected, this); |
| 302 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameEnter, this._onFilmFrameEnter, this); | 303 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameEnter, this._onFilmFrameEnter, this); |
| 303 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameExit, this._onFilmFrameExit, this); | 304 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameExit, this._onFilmFrameExit, this); |
| 304 this._resetFilmStripView(); | 305 this._resetFilmStripView(); |
| 305 } | 306 } |
| 306 | 307 |
| 307 if (!toggled && this._filmStripRecorder) { | 308 if (!toggled && this._filmStripRecorder) { |
| 308 this._filmStripView.detach(); | 309 this._filmStripView.detach(); |
| 309 this._filmStripView = null; | 310 this._filmStripView = null; |
| 310 this._filmStripRecorder = null; | 311 this._filmStripRecorder = null; |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 * @return {boolean} | 791 * @return {boolean} |
| 791 */ | 792 */ |
| 792 handleAction: function(context, actionId) | 793 handleAction: function(context, actionId) |
| 793 { | 794 { |
| 794 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); | 795 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); |
| 795 console.assert(panel && panel instanceof WebInspector.NetworkPanel); | 796 console.assert(panel && panel instanceof WebInspector.NetworkPanel); |
| 796 panel._toggleRecording(); | 797 panel._toggleRecording(); |
| 797 return true; | 798 return true; |
| 798 } | 799 } |
| 799 } | 800 } |
| OLD | NEW |