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

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

Issue 320523004: Timeline: fill frames according to CPU time spent per event category (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The Chromium Authors. All rights reserved. 2 * Copyright 2014 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /** 7 /**
8 * @constructor 8 * @constructor
9 * @extends {WebInspector.TargetAwareObject} 9 * @extends {WebInspector.TargetAwareObject}
10 */ 10 */
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 { 113 {
114 if (!this._active) { 114 if (!this._active) {
115 callback(); 115 callback();
116 return; 116 return;
117 } 117 }
118 this._pendingStopCallback = callback; 118 this._pendingStopCallback = callback;
119 TracingAgent.end(); 119 TracingAgent.end();
120 }, 120 },
121 121
122 /** 122 /**
123 * @param {string} sessionId
124 */
125 setSessionIdForTest: function(sessionId)
126 {
127 this._sessionId = sessionId;
128 },
129
130 /**
131 * @return {?string} 123 * @return {?string}
132 */ 124 */
133 sessionId: function() 125 sessionId: function()
134 { 126 {
135 return this._sessionId; 127 return this._sessionId;
136 }, 128 },
137 129
138 /** 130 /**
131 * @param {string} sessionId
132 * @param {!Array.<!WebInspector.TracingModel.EventPayload>} events
133 */
134 setEventsForTest: function(sessionId, events)
135 {
136 this.reset();
137 this._sessionId = sessionId;
138 this._eventsCollected(events);
139 this._tracingComplete();
140 },
141
142 /**
139 * @param {number} usage 143 * @param {number} usage
140 */ 144 */
141 _bufferUsage: function(usage) 145 _bufferUsage: function(usage)
142 { 146 {
143 this.dispatchEventToListeners(WebInspector.TracingModel.Events.BufferUsa ge, usage); 147 this.dispatchEventToListeners(WebInspector.TracingModel.Events.BufferUsa ge, usage);
144 }, 148 },
145 149
146 /** 150 /**
147 * @param {!Array.<!WebInspector.TracingModel.EventPayload>} events 151 * @param {!Array.<!WebInspector.TracingModel.EventPayload>} events
148 */ 152 */
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 dataCollected: function(data) 552 dataCollected: function(data)
549 { 553 {
550 this._tracingModel._eventsCollected(data); 554 this._tracingModel._eventsCollected(data);
551 }, 555 },
552 556
553 tracingComplete: function() 557 tracingComplete: function()
554 { 558 {
555 this._tracingModel._tracingComplete(); 559 this._tracingModel._tracingComplete();
556 } 560 }
557 } 561 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | Source/devtools/front_end/timeline/TracingTimelineUIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698