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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 /** | 197 /** |
198 * @param {?WebInspector.FilmStripModel} filmStripModel | 198 * @param {?WebInspector.FilmStripModel} filmStripModel |
199 */ | 199 */ |
200 _filmStripAvailable: function(filmStripModel) | 200 _filmStripAvailable: function(filmStripModel) |
201 { | 201 { |
202 if (!filmStripModel) | 202 if (!filmStripModel) |
203 return; | 203 return; |
204 var calculator = this._networkLogView.timeCalculator(); | 204 var calculator = this._networkLogView.timeCalculator(); |
205 this._filmStripView.setModel(filmStripModel, calculator.minimumBoundary(
) * 1000, calculator.boundarySpan() * 1000); | 205 this._filmStripView.setModel(filmStripModel, calculator.minimumBoundary(
) * 1000, calculator.boundarySpan() * 1000); |
206 this._networkOverview.setFilmStripModel(filmStripModel); | 206 this._networkOverview.setFilmStripModel(filmStripModel); |
207 var timestamps = filmStripModel.frames().map((frame) => frame.timestamp
/ 1000); | 207 var timestamps = filmStripModel.frames().map(mapTimestamp); |
| 208 |
| 209 /** |
| 210 * @param {!WebInspector.FilmStripModel.Frame} frame |
| 211 * @return {number} |
| 212 */ |
| 213 function mapTimestamp(frame) |
| 214 { |
| 215 return frame.timestamp / 1000; |
| 216 } |
| 217 |
208 this._networkLogView.addFilmStripFrames(timestamps); | 218 this._networkLogView.addFilmStripFrames(timestamps); |
209 }, | 219 }, |
210 | 220 |
211 /** | 221 /** |
212 * @param {!Event} event | 222 * @param {!Event} event |
213 */ | 223 */ |
214 _onPreserveLogCheckboxChanged: function(event) | 224 _onPreserveLogCheckboxChanged: function(event) |
215 { | 225 { |
216 this._networkLogView.setPreserveLog(this._preserveLogCheckbox.checked())
; | 226 this._networkLogView.setPreserveLog(this._preserveLogCheckbox.checked())
; |
217 }, | 227 }, |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 { | 731 { |
722 if (!this._target) | 732 if (!this._target) |
723 return; | 733 return; |
724 | 734 |
725 this._target.tracingManager.stop(); | 735 this._target.tracingManager.stop(); |
726 this._target = null; | 736 this._target = null; |
727 this._callback = callback; | 737 this._callback = callback; |
728 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames
...")); | 738 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames
...")); |
729 } | 739 } |
730 } | 740 } |
OLD | NEW |