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

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

Issue 402633002: DevTools: Remove redundant dependency on target from TimelineFrameModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | 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.SDKObject} 9 * @extends {WebInspector.SDKObject}
10 */ 10 */
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 { 460 {
461 WebInspector.TracingModel.NamedObject.call(this); 461 WebInspector.TracingModel.NamedObject.call(this);
462 this._process = process; 462 this._process = process;
463 this._setName("Thread " + id); 463 this._setName("Thread " + id);
464 this._events = []; 464 this._events = [];
465 this._stack = []; 465 this._stack = [];
466 this._maxStackDepth = 0; 466 this._maxStackDepth = 0;
467 } 467 }
468 468
469 WebInspector.TracingModel.Thread.prototype = { 469 WebInspector.TracingModel.Thread.prototype = {
470
471 /**
472 * @return {?WebInspector.Target}
473 */
474 target: function()
475 {
476 //FIXME: correctly specify target
477 return WebInspector.targetManager.targets()[0];
478 },
479
470 /** 480 /**
471 * @param {!WebInspector.TracingModel.EventPayload} payload 481 * @param {!WebInspector.TracingModel.EventPayload} payload
472 * @return {?WebInspector.TracingModel.Event} event 482 * @return {?WebInspector.TracingModel.Event} event
473 */ 483 */
474 addEvent: function(payload) 484 addEvent: function(payload)
475 { 485 {
476 for (var top = this._stack.peekLast(); top && top.endTime && top.endTime <= payload.ts / 1000;) { 486 for (var top = this._stack.peekLast(); top && top.endTime && top.endTime <= payload.ts / 1000;) {
477 this._stack.pop(); 487 this._stack.pop();
478 top = this._stack.peekLast(); 488 top = this._stack.peekLast();
479 } 489 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 dataCollected: function(data) 561 dataCollected: function(data)
552 { 562 {
553 this._tracingModel._eventsCollected(data); 563 this._tracingModel._eventsCollected(data);
554 }, 564 },
555 565
556 tracingComplete: function() 566 tracingComplete: function()
557 { 567 {
558 this._tracingModel._tracingComplete(); 568 this._tracingModel._tracingComplete();
559 } 569 }
560 } 570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698