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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 this._linkifier = new WebInspector.Linkifier(); | 67 this._linkifier = new WebInspector.Linkifier(); |
68 | 68 |
69 this._allowPopover = true; | 69 this._allowPopover = true; |
70 | 70 |
71 /** @type {number} */ | 71 /** @type {number} */ |
72 this._rowHeight = 0; | 72 this._rowHeight = 0; |
73 | 73 |
74 this._addFilters(); | 74 this._addFilters(); |
75 this._resetSuggestionBuilder(); | 75 this._resetSuggestionBuilder(); |
76 this._initializeView(); | 76 this._initializeView(); |
77 this._recordButton.toggled = true; | 77 this._toggleRecordButton(true); |
78 | 78 |
79 WebInspector.targetManager.observeTargets(this); | 79 WebInspector.targetManager.observeTargets(this); |
80 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this
); | 80 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestStarted, this._onRequestStarted, this
); |
81 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestUpdated, this._onRequestUpdated, this
); | 81 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestUpdated, this._onRequestUpdated, this
); |
82 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestFinished, this._onRequestUpdated, thi
s); | 82 WebInspector.targetManager.addModelListener(WebInspector.NetworkManager, Web
Inspector.NetworkManager.EventTypes.RequestFinished, this._onRequestUpdated, thi
s); |
83 | 83 |
84 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._willReloadPage,
this); | 84 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.WillReloadPage, this._willReloadPage,
this); |
85 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNav
igated, this); | 85 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.MainFrameNavigated, this._mainFrameNav
igated, this); |
86 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this); | 86 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this); |
87 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._domContentLoad
edEventFired, this); | 87 WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel,
WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, this._domContentLoad
edEventFired, this); |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 this._timelineGrid.hideEventDividers(); | 719 this._timelineGrid.hideEventDividers(); |
720 else | 720 else |
721 this._timelineGrid.showEventDividers(); | 721 this._timelineGrid.showEventDividers(); |
722 | 722 |
723 this._invalidateAllItems(); | 723 this._invalidateAllItems(); |
724 this.refresh(); | 724 this.refresh(); |
725 }, | 725 }, |
726 | 726 |
727 _createStatusbarButtons: function() | 727 _createStatusbarButtons: function() |
728 { | 728 { |
729 this._recordButton = new WebInspector.StatusBarButton(WebInspector.UIStr
ing("Record Network Log"), "record-profile-status-bar-item"); | 729 this._recordButton = new WebInspector.StatusBarButton("", "record-profil
e-status-bar-item"); |
730 this._recordButton.addEventListener("click", this._onRecordButtonClicked
, this); | 730 this._recordButton.addEventListener("click", this._onRecordButtonClicked
, this); |
731 | 731 |
732 this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIStri
ng("Clear"), "clear-status-bar-item"); | 732 this._clearButton = new WebInspector.StatusBarButton(WebInspector.UIStri
ng("Clear"), "clear-status-bar-item"); |
733 this._clearButton.addEventListener("click", this._reset, this); | 733 this._clearButton.addEventListener("click", this._reset, this); |
734 | 734 |
735 this._largerRequestsButton = new WebInspector.StatusBarButton(WebInspect
or.UIString("Use small resource rows."), "network-larger-resources-status-bar-it
em"); | 735 this._largerRequestsButton = new WebInspector.StatusBarButton(WebInspect
or.UIString("Use small resource rows."), "network-larger-resources-status-bar-it
em"); |
736 this._largerRequestsButton.toggled = WebInspector.settings.resourcesLarg
eRows.get(); | 736 this._largerRequestsButton.toggled = WebInspector.settings.resourcesLarg
eRows.get(); |
737 this._largerRequestsButton.addEventListener("click", this._toggleLargerR
equests, this); | 737 this._largerRequestsButton.addEventListener("click", this._toggleLargerR
equests, this); |
738 | 738 |
739 this._preserveLogCheckbox = new WebInspector.StatusBarCheckbox(WebInspec
tor.UIString("Preserve log")); | 739 this._preserveLogCheckbox = new WebInspector.StatusBarCheckbox(WebInspec
tor.UIString("Preserve log")); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 } | 832 } |
833 | 833 |
834 this._staleRequestIds = {}; | 834 this._staleRequestIds = {}; |
835 this._updateSummaryBar(); | 835 this._updateSummaryBar(); |
836 }, | 836 }, |
837 | 837 |
838 _onRecordButtonClicked: function() | 838 _onRecordButtonClicked: function() |
839 { | 839 { |
840 if (!this._recordButton.toggled) | 840 if (!this._recordButton.toggled) |
841 this._reset(); | 841 this._reset(); |
842 this._recordButton.toggled = !this._recordButton.toggled; | 842 this._toggleRecordButton(!this._recordButton.toggled); |
| 843 }, |
| 844 |
| 845 /** |
| 846 * @param {boolean} toggled |
| 847 */ |
| 848 _toggleRecordButton: function(toggled) |
| 849 { |
| 850 this._recordButton.toggled = toggled; |
| 851 this._recordButton.title = toggled ? WebInspector.UIString("Stop Recordi
ng Network Log") : WebInspector.UIString("Record Network Log"); |
843 }, | 852 }, |
844 | 853 |
845 _reset: function() | 854 _reset: function() |
846 { | 855 { |
847 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Vie
wCleared); | 856 this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.Vie
wCleared); |
848 | 857 |
849 this._clearSearchMatchedList(); | 858 this._clearSearchMatchedList(); |
850 if (this._popoverHelper) | 859 if (this._popoverHelper) |
851 this._popoverHelper.hidePopover(); | 860 this._popoverHelper.hidePopover(); |
852 | 861 |
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3131 | 3140 |
3132 WebInspector.NetworkPanelFactory.prototype = { | 3141 WebInspector.NetworkPanelFactory.prototype = { |
3133 /** | 3142 /** |
3134 * @return {!WebInspector.Panel} | 3143 * @return {!WebInspector.Panel} |
3135 */ | 3144 */ |
3136 createPanel: function() | 3145 createPanel: function() |
3137 { | 3146 { |
3138 return WebInspector.NetworkPanel._instance(); | 3147 return WebInspector.NetworkPanel._instance(); |
3139 } | 3148 } |
3140 } | 3149 } |
OLD | NEW |