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

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

Issue 254613002: DevTools: add Tracing agent on back-end (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed Created 6 years, 8 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
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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 Events: "Events", 136 Events: "Events",
137 Frames: "Frames" 137 Frames: "Frames"
138 }; 138 };
139 139
140 // Define row and header height, should be in sync with styles for timeline grap hs. 140 // Define row and header height, should be in sync with styles for timeline grap hs.
141 WebInspector.TimelinePanel.rowHeight = 18; 141 WebInspector.TimelinePanel.rowHeight = 18;
142 WebInspector.TimelinePanel.headerHeight = 20; 142 WebInspector.TimelinePanel.headerHeight = 20;
143 143
144 WebInspector.TimelinePanel.durationFilterPresetsMs = [0, 1, 15]; 144 WebInspector.TimelinePanel.durationFilterPresetsMs = [0, 1, 15];
145 145
146 WebInspector.TimelinePanel.defaultTracingCategoryFilter = "*,disabled-by-default -cc.debug,disabled-by-default-devtools.timeline";
147
146 WebInspector.TimelinePanel.prototype = { 148 WebInspector.TimelinePanel.prototype = {
147 /** 149 /**
148 * @return {?WebInspector.SearchableView} 150 * @return {?WebInspector.SearchableView}
149 */ 151 */
150 searchableView: function() 152 searchableView: function()
151 { 153 {
152 return this._searchableView; 154 return this._searchableView;
153 }, 155 },
154 156
155 wasShown: function() 157 wasShown: function()
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 }, 245 },
244 246
245 /** 247 /**
246 * @return {!WebInspector.TracingModel} 248 * @return {!WebInspector.TracingModel}
247 */ 249 */
248 _tracingModel: function() 250 _tracingModel: function()
249 { 251 {
250 if (!this._lazyTracingModel) { 252 if (!this._lazyTracingModel) {
251 this._lazyTracingModel = new WebInspector.TracingModel(); 253 this._lazyTracingModel = new WebInspector.TracingModel();
252 this._lazyTracingModel.addEventListener(WebInspector.TracingModel.Ev ents.BufferUsage, this._onTracingBufferUsage, this); 254 this._lazyTracingModel.addEventListener(WebInspector.TracingModel.Ev ents.BufferUsage, this._onTracingBufferUsage, this);
255 this._lazyTracingModel.enable(WebInspector.TimelinePanel.defaultTrac ingCategoryFilter);
253 } 256 }
254 return this._lazyTracingModel; 257 return this._lazyTracingModel;
255 }, 258 },
256 259
257 /** 260 /**
258 * @return {!WebInspector.TimelineView} 261 * @return {!WebInspector.TimelineView}
259 */ 262 */
260 _timelineView: function() 263 _timelineView: function()
261 { 264 {
262 if (!this._lazyTimelineView) 265 if (!this._lazyTimelineView)
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 }, 618 },
616 619
617 /** 620 /**
618 * @param {boolean} userInitiated 621 * @param {boolean} userInitiated
619 */ 622 */
620 _startRecording: function(userInitiated) 623 _startRecording: function(userInitiated)
621 { 624 {
622 this._userInitiatedRecording = userInitiated; 625 this._userInitiatedRecording = userInitiated;
623 this._model.startRecording(this._captureStacksSetting.get(), this._captu reMemorySetting.get()); 626 this._model.startRecording(this._captureStacksSetting.get(), this._captu reMemorySetting.get());
624 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled()) 627 if (WebInspector.experimentsSettings.timelineTracingMode.isEnabled())
625 this._tracingModel().start(WebInspector.TimelineManager.defaultTraci ngCategories, ""); 628 this._tracingModel().start(WebInspector.TimelinePanel.defaultTracing CategoryFilter, "");
626 for (var i = 0; i < this._overviewControls.length; ++i) 629 for (var i = 0; i < this._overviewControls.length; ++i)
627 this._overviewControls[i].timelineStarted(); 630 this._overviewControls[i].timelineStarted();
628 631
629 if (userInitiated) 632 if (userInitiated)
630 WebInspector.userMetrics.TimelineStarted.record(); 633 WebInspector.userMetrics.TimelineStarted.record();
631 }, 634 },
632 635
633 _stopRecording: function() 636 _stopRecording: function()
634 { 637 {
635 this._userInitiatedRecording = false; 638 this._userInitiatedRecording = false;
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 * @param {!WebInspector.TimelineModel.Record} record 1254 * @param {!WebInspector.TimelineModel.Record} record
1252 * @return {boolean} 1255 * @return {boolean}
1253 */ 1256 */
1254 accept: function(record) 1257 accept: function(record)
1255 { 1258 {
1256 return !this._hiddenRecords[record.type]; 1259 return !this._hiddenRecords[record.type];
1257 }, 1260 },
1258 1261
1259 __proto__: WebInspector.TimelineModel.Filter.prototype 1262 __proto__: WebInspector.TimelineModel.Filter.prototype
1260 } 1263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698