Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Side by Side Diff: Source/devtools/front_end/timeline/TimelinePanel.js

Issue 705273002: DevTools: loading timeline pretends it is recording w/ 0 events collected. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Pass fromFile as event data field Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
474 * @return {?WebInspector.ProgressIndicator} 474 * @return {?WebInspector.ProgressIndicator}
475 */ 475 */
476 _prepareToLoadTimeline: function() 476 _prepareToLoadTimeline: function()
477 { 477 {
478 if (this._operationInProgress) 478 if (this._operationInProgress)
479 return null; 479 return null;
480 if (this._recordingInProgress()) { 480 if (this._recordingInProgress()) {
481 this._updateToggleTimelineButton(false); 481 this._updateToggleTimelineButton(false);
482 this._stopRecording(); 482 this._stopRecording();
483 } 483 }
484
485 /**
486 * @this {!WebInspector.TimelinePanel}
487 */
488 function finishLoading()
489 {
490 this._setOperationInProgress(null);
491 this._updateToggleTimelineButton(false);
492 this._hideProgressPane();
493 }
484 var progressIndicator = new WebInspector.ProgressIndicator(); 494 var progressIndicator = new WebInspector.ProgressIndicator();
485 progressIndicator.addEventListener(WebInspector.Progress.Events.Done, th is._setOperationInProgress.bind(this, null)); 495 progressIndicator.addEventListener(WebInspector.Progress.Events.Done, fi nishLoading.bind(this));
486 this._setOperationInProgress(progressIndicator); 496 this._setOperationInProgress(progressIndicator);
487 return progressIndicator; 497 return progressIndicator;
488 }, 498 },
489 499
490 /** 500 /**
491 * @param {?WebInspector.ProgressIndicator} indicator 501 * @param {?WebInspector.ProgressIndicator} indicator
492 */ 502 */
493 _setOperationInProgress: function(indicator) 503 _setOperationInProgress: function(indicator)
494 { 504 {
495 this._operationInProgress = !!indicator; 505 this._operationInProgress = !!indicator;
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 if (this._lazyFrameModel) 749 if (this._lazyFrameModel)
740 this._lazyFrameModel.reset(); 750 this._lazyFrameModel.reset();
741 for (var i = 0; i < this._currentViews.length; ++i) 751 for (var i = 0; i < this._currentViews.length; ++i)
742 this._currentViews[i].reset(); 752 this._currentViews[i].reset();
743 for (var i = 0; i < this._overviewControls.length; ++i) 753 for (var i = 0; i < this._overviewControls.length; ++i)
744 this._overviewControls[i].reset(); 754 this._overviewControls[i].reset();
745 this._selection = null; 755 this._selection = null;
746 this._updateSelectionDetails(); 756 this._updateSelectionDetails();
747 }, 757 },
748 758
749 _onRecordingStarted: function() 759 /**
760 * @param {!WebInspector.Event} event
761 */
762 _onRecordingStarted: function(event)
750 { 763 {
751 this._updateToggleTimelineButton(true); 764 this._updateToggleTimelineButton(true);
752 this._updateProgress(WebInspector.UIString("%d events collected", 0)); 765 if (event.data && event.data.fromFile)
766 this._updateProgress(WebInspector.UIString("Loading from file..."));
767 else
768 this._updateProgress(WebInspector.UIString("%d events collected", 0) );
753 }, 769 },
754 770
755 _recordingInProgress: function() 771 _recordingInProgress: function()
756 { 772 {
757 return this.toggleTimelineButton.toggled; 773 return this.toggleTimelineButton.toggled;
758 }, 774 },
759 775
760 /** 776 /**
761 * @param {!WebInspector.Event} event 777 * @param {!WebInspector.Event} event
762 */ 778 */
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 1532
1517 WebInspector.TimelinePanelFactory.prototype = { 1533 WebInspector.TimelinePanelFactory.prototype = {
1518 /** 1534 /**
1519 * @return {!WebInspector.Panel} 1535 * @return {!WebInspector.Panel}
1520 */ 1536 */
1521 createPanel: function() 1537 createPanel: function()
1522 { 1538 {
1523 return WebInspector.TimelinePanel._instance(); 1539 return WebInspector.TimelinePanel._instance();
1524 } 1540 }
1525 } 1541 }
OLDNEW
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698