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

Side by Side Diff: Source/devtools/front_end/network/NetworkPanel.js

Issue 1208593003: DevTools: Make FilmStripView support custom status text. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 months 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 | « Source/devtools/front_end/components_lazy/FilmStripView.js ('k') | no next file » | 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) 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 { 280 {
281 this._reset(); 281 this._reset();
282 }, 282 },
283 283
284 _reset: function() 284 _reset: function()
285 { 285 {
286 this._calculator.reset(); 286 this._calculator.reset();
287 this._overviewPane.reset(); 287 this._overviewPane.reset();
288 this._networkLogView.reset(); 288 this._networkLogView.reset();
289 if (this._filmStripView) 289 if (this._filmStripView)
290 this._filmStripView.reset(); 290 this._resetFilmStripView();
291 }, 291 },
292 292
293 /** 293 /**
294 * @param {!WebInspector.Event} event 294 * @param {!WebInspector.Event} event
295 */ 295 */
296 _willReloadPage: function(event) 296 _willReloadPage: function(event)
297 { 297 {
298 if (!this._preserveLogCheckbox.checked()) 298 if (!this._preserveLogCheckbox.checked())
299 this._reset(); 299 this._reset();
300 this._toggleRecordButton(true); 300 this._toggleRecordButton(true);
(...skipping 30 matching lines...) Expand all
331 var toggled = this._networkRecordFilmStripSetting.get(); 331 var toggled = this._networkRecordFilmStripSetting.get();
332 if (toggled && !this._filmStripRecorder) { 332 if (toggled && !this._filmStripRecorder) {
333 this._filmStripView = new WebInspector.FilmStripView(); 333 this._filmStripView = new WebInspector.FilmStripView();
334 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa sed); 334 this._filmStripView.setMode(WebInspector.FilmStripView.Modes.FrameBa sed);
335 this._filmStripView.element.classList.add("network-film-strip"); 335 this._filmStripView.element.classList.add("network-film-strip");
336 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec order(this._filmStripView); 336 this._filmStripRecorder = new WebInspector.NetworkPanel.FilmStripRec order(this._filmStripView);
337 this._filmStripView.show(this._searchableView.element, this._searcha bleView.element.firstElementChild); 337 this._filmStripView.show(this._searchableView.element, this._searcha bleView.element.firstElementChild);
338 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameSelected, this._onFilmFrameSelected, this); 338 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameSelected, this._onFilmFrameSelected, this);
339 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameEnter, this._onFilmFrameEnter, this); 339 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameEnter, this._onFilmFrameEnter, this);
340 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameExit, this._onFilmFrameExit, this); 340 this._filmStripView.addEventListener(WebInspector.FilmStripView.Even ts.FrameExit, this._onFilmFrameExit, this);
341 this._resetFilmStripView();
341 } 342 }
342 343
343 if (!toggled && this._filmStripRecorder) { 344 if (!toggled && this._filmStripRecorder) {
344 this._filmStripView.detach(); 345 this._filmStripView.detach();
345 this._filmStripView = null; 346 this._filmStripView = null;
346 this._filmStripRecorder = null; 347 this._filmStripRecorder = null;
347 } 348 }
348 }, 349 },
349 350
351 _resetFilmStripView: function()
352 {
353 this._filmStripView.reset();
354 this._filmStripView.setStatusText(WebInspector.UIString("No frames recor ded. Reload page to start recording."));
355 },
356
350 /** 357 /**
351 * @return {boolean} 358 * @return {boolean}
352 */ 359 */
353 _isDetailsPaneAtBottom: function() 360 _isDetailsPaneAtBottom: function()
354 { 361 {
355 return WebInspector.moduleSetting("splitVerticallyWhenDockedToRight").ge t() && WebInspector.dockController.isVertical(); 362 return WebInspector.moduleSetting("splitVerticallyWhenDockedToRight").ge t() && WebInspector.dockController.isVertical();
356 }, 363 },
357 364
358 _dockSideChanged: function() 365 _dockSideChanged: function()
359 { 366 {
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 }, 769 },
763 770
764 startRecording: function() 771 startRecording: function()
765 { 772 {
766 if (this._target) 773 if (this._target)
767 return; 774 return;
768 775
769 this._target = WebInspector.targetManager.mainTarget(); 776 this._target = WebInspector.targetManager.mainTarget();
770 this._tracingModel = new WebInspector.TracingModel(new WebInspector.Temp FileBackingStorage("tracing")); 777 this._tracingModel = new WebInspector.TracingModel(new WebInspector.Temp FileBackingStorage("tracing"));
771 this._target.tracingManager.start(this, "-*,disabled-by-default-devtools .screenshot", ""); 778 this._target.tracingManager.start(this, "-*,disabled-by-default-devtools .screenshot", "");
772 this._filmStripView.setRecording(); 779 this._filmStripView.reset();
780 this._filmStripView.setStatusText(WebInspector.UIString("Recording frame s..."));
773 }, 781 },
774 782
775 /** 783 /**
776 * @return {boolean} 784 * @return {boolean}
777 */ 785 */
778 isRecording: function() 786 isRecording: function()
779 { 787 {
780 return !!this._target; 788 return !!this._target;
781 }, 789 },
782 790
783 /** 791 /**
784 * @param {function(?WebInspector.FilmStripModel)} callback 792 * @param {function(?WebInspector.FilmStripModel)} callback
785 */ 793 */
786 stopRecording: function(callback) 794 stopRecording: function(callback)
787 { 795 {
788 if (!this._target) 796 if (!this._target)
789 return; 797 return;
790 798
791 this._target.tracingManager.stop(); 799 this._target.tracingManager.stop();
792 this._target = null; 800 this._target = null;
793 this._callback = callback; 801 this._callback = callback;
794 this._filmStripView.setFetching(); 802 this._filmStripView.setStatusText(WebInspector.UIString("Fetching frames ..."));
795 } 803 }
796 } 804 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/components_lazy/FilmStripView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698