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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 this.doResize(); | 292 this.doResize(); |
293 }, | 293 }, |
294 | 294 |
295 _toggleRecordFilmStrip: function() | 295 _toggleRecordFilmStrip: function() |
296 { | 296 { |
297 var toggled = this._networkRecordFilmStripSetting.get(); | 297 var toggled = this._networkRecordFilmStripSetting.get(); |
298 if (toggled && !this._filmStripRecorder) { | 298 if (toggled && !this._filmStripRecorder) { |
299 this._filmStripView = new WebInspector.FilmStripView(); | 299 this._filmStripView = new WebInspector.FilmStripView(); |
300 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa
sed); | 300 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa
sed); |
301 this._filmStripView.element.classList.add("network-film-strip"); | 301 this._filmStripView.element.classList.add("network-film-strip"); |
302 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec
order(this._filmStripView); | 302 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec
order(this._networkLogView.timeCalculator(), this._filmStripView); |
303 this._filmStripView.show(this._searchableView.element, this._searcha
bleView.element.firstElementChild); | 303 this._filmStripView.show(this._searchableView.element, this._searcha
bleView.element.firstElementChild); |
304 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameSelected, this._onFilmFrameSelected, this); | 304 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameSelected, this._onFilmFrameSelected, this); |
305 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameEnter, this._onFilmFrameEnter, this); | 305 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameEnter, this._onFilmFrameEnter, this); |
306 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameExit, this._onFilmFrameExit, this); | 306 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even
ts.FrameExit, this._onFilmFrameExit, this); |
307 this._resetFilmStripView(); | 307 this._resetFilmStripView(); |
308 } | 308 } |
309 | 309 |
310 if (!toggled && this._filmStripRecorder) { | 310 if (!toggled && this._filmStripRecorder) { |
311 this._filmStripView.detach(); | 311 this._filmStripView.detach(); |
312 this._filmStripView = null; | 312 this._filmStripView = null; |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 */ | 663 */ |
664 createPanel: function() | 664 createPanel: function() |
665 { | 665 { |
666 return WebInspector.NetworkPanel._instance(); | 666 return WebInspector.NetworkPanel._instance(); |
667 } | 667 } |
668 } | 668 } |
669 | 669 |
670 /** | 670 /** |
671 * @constructor | 671 * @constructor |
672 * @implements {WebInspector.TracingManagerClient} | 672 * @implements {WebInspector.TracingManagerClient} |
| 673 * @param {!WebInspector.NetworkTimeCalculator} timeCalculator |
673 * @param {!WebInspector.FilmStripView} filmStripView | 674 * @param {!WebInspector.FilmStripView} filmStripView |
674 */ | 675 */ |
675 WebInspector.NetworkPanel.FilmStripRecorder = function(filmStripView) | 676 WebInspector.NetworkPanel.FilmStripRecorder = function(timeCalculator, filmStrip
View) |
676 { | 677 { |
| 678 this._timeCalculator = timeCalculator; |
677 this._filmStripView = filmStripView; | 679 this._filmStripView = filmStripView; |
678 } | 680 } |
679 | 681 |
680 WebInspector.NetworkPanel.FilmStripRecorder.prototype = { | 682 WebInspector.NetworkPanel.FilmStripRecorder.prototype = { |
681 /** | 683 /** |
682 * @override | 684 * @override |
683 */ | 685 */ |
684 tracingStarted: function() | 686 tracingStarted: function() |
685 { | 687 { |
686 }, | 688 }, |
687 | 689 |
688 /** | 690 /** |
689 * @override | 691 * @override |
690 * @param {!Array.<!WebInspector.TracingManager.EventPayload>} events | 692 * @param {!Array.<!WebInspector.TracingManager.EventPayload>} events |
691 */ | 693 */ |
692 traceEventsCollected: function(events) | 694 traceEventsCollected: function(events) |
693 { | 695 { |
694 if (this._tracingModel) | 696 if (this._tracingModel) |
695 this._tracingModel.addEvents(events); | 697 this._tracingModel.addEvents(events); |
696 }, | 698 }, |
697 | 699 |
698 /** | 700 /** |
699 * @override | 701 * @override |
700 */ | 702 */ |
701 tracingComplete: function() | 703 tracingComplete: function() |
702 { | 704 { |
703 if (!this._tracingModel) | 705 if (!this._tracingModel) |
704 return; | 706 return; |
705 this._tracingModel.tracingComplete(); | 707 this._tracingModel.tracingComplete(); |
706 this._callback(new WebInspector.FilmStripModel(this._tracingModel)); | 708 this._callback(new WebInspector.FilmStripModel(this._tracingModel, this.
_timeCalculator.minimumBoundary() * 1000)); |
707 delete this._callback; | 709 delete this._callback; |
708 }, | 710 }, |
709 | 711 |
710 /** | 712 /** |
711 * @override | 713 * @override |
712 */ | 714 */ |
713 tracingBufferUsage: function() | 715 tracingBufferUsage: function() |
714 { | 716 { |
715 }, | 717 }, |
716 | 718 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 * @param {!WebInspector.Context} context | 772 * @param {!WebInspector.Context} context |
771 * @param {string} actionId | 773 * @param {string} actionId |
772 */ | 774 */ |
773 handleAction: function(context, actionId) | 775 handleAction: function(context, actionId) |
774 { | 776 { |
775 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); | 777 var panel = WebInspector.context.flavor(WebInspector.NetworkPanel); |
776 console.assert(panel && panel instanceof WebInspector.NetworkPanel); | 778 console.assert(panel && panel instanceof WebInspector.NetworkPanel); |
777 panel._toggleRecording(); | 779 panel._toggleRecording(); |
778 } | 780 } |
779 } | 781 } |
OLD | NEW |