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

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

Issue 397823003: DevTools: Support multiple target in TimelineModelImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests Created 6 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 */ 150 */
151 startRecording: function(captureStacks, captureMemory, capturePictures) 151 startRecording: function(captureStacks, captureMemory, capturePictures)
152 { 152 {
153 }, 153 },
154 154
155 stopRecording: function() 155 stopRecording: function()
156 { 156 {
157 }, 157 },
158 158
159 /** 159 /**
160 * @return {boolean}
161 */
162 loadedFromFile: function()
163 {
164 return false;
165 },
166
167 /**
168 * @param {?function(!WebInspector.TimelineModel.Record)|?function(!WebInspe ctor.TimelineModel.Record,number)} preOrderCallback 160 * @param {?function(!WebInspector.TimelineModel.Record)|?function(!WebInspe ctor.TimelineModel.Record,number)} preOrderCallback
169 * @param {function(!WebInspector.TimelineModel.Record)|function(!WebInspect or.TimelineModel.Record,number)=} postOrderCallback 161 * @param {function(!WebInspector.TimelineModel.Record)|function(!WebInspect or.TimelineModel.Record,number)=} postOrderCallback
170 */ 162 */
171 forAllRecords: function(preOrderCallback, postOrderCallback) 163 forAllRecords: function(preOrderCallback, postOrderCallback)
172 { 164 {
173 WebInspector.TimelineModel.forAllRecords(this._records, preOrderCallback , postOrderCallback); 165 WebInspector.TimelineModel.forAllRecords(this._records, preOrderCallback , postOrderCallback);
174 }, 166 },
175 167
176 /** 168 /**
177 * @param {!WebInspector.TimelineModel.Filter} filter 169 * @param {!WebInspector.TimelineModel.Filter} filter
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 throw new Error("Not implemented"); 248 throw new Error("Not implemented");
257 }, 249 },
258 250
259 saveToFile: function() 251 saveToFile: function()
260 { 252 {
261 throw new Error("Not implemented"); 253 throw new Error("Not implemented");
262 }, 254 },
263 255
264 reset: function() 256 reset: function()
265 { 257 {
266 this._loadedFromFile = false;
267 this._records = []; 258 this._records = [];
268 this._minimumRecordTime = 0; 259 this._minimumRecordTime = 0;
269 this._maximumRecordTime = 0; 260 this._maximumRecordTime = 0;
270 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */ 261 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */
271 this._mainThreadTasks = []; 262 this._mainThreadTasks = [];
272 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */ 263 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */
273 this._gpuThreadTasks = []; 264 this._gpuThreadTasks = [];
274 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */ 265 /** @type {!Array.<!WebInspector.TimelineModel.Record>} */
275 this._eventDividerRecords = []; 266 this._eventDividerRecords = [];
276 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordsC leared); 267 this.dispatchEventToListeners(WebInspector.TimelineModel.Events.RecordsC leared);
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 function recordTimestampComparator(a, b) 554 function recordTimestampComparator(a, b)
564 { 555 {
565 // Never return 0, as the merge function will squash identical entri es. 556 // Never return 0, as the merge function will squash identical entri es.
566 return a.startTime() < b.startTime() ? -1 : 1; 557 return a.startTime() < b.startTime() ? -1 : 1;
567 } 558 }
568 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator); 559 var result = this._backgroundRecordsBuffer.mergeOrdered(records, recordT imestampComparator);
569 this._backgroundRecordsBuffer = []; 560 this._backgroundRecordsBuffer = [];
570 return result; 561 return result;
571 } 562 }
572 } 563 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/TimelineManager.js ('k') | Source/devtools/front_end/timeline/TimelineModelImpl.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698