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

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

Issue 557013005: DevTools: extract TracingManager from TracingModel (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: review comments addressed Created 6 years, 3 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 this.registerRequiredCSS("layersPanel.css"); 42 this.registerRequiredCSS("layersPanel.css");
43 this.registerRequiredCSS("filter.css"); 43 this.registerRequiredCSS("filter.css");
44 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), f alse); 44 this.element.addEventListener("contextmenu", this._contextMenu.bind(this), f alse);
45 45
46 this._detailsLinkifier = new WebInspector.Linkifier(); 46 this._detailsLinkifier = new WebInspector.Linkifier();
47 this._windowStartTime = 0; 47 this._windowStartTime = 0;
48 this._windowEndTime = Infinity; 48 this._windowEndTime = Infinity;
49 49
50 // Create model. 50 // Create model.
51 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) { 51 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) {
52 this._tracingManager = new WebInspector.TracingManager();
53 this._tracingManager.addEventListener(WebInspector.TracingManager.Events .BufferUsage, this._onTracingBufferUsage, this);
54
52 this._tracingModel = new WebInspector.TracingModel(); 55 this._tracingModel = new WebInspector.TracingModel();
53 this._tracingModel.addEventListener(WebInspector.TracingModel.Events.Buf ferUsage, this._onTracingBufferUsage, this);
54
55 this._uiUtils = new WebInspector.TracingTimelineUIUtils(); 56 this._uiUtils = new WebInspector.TracingTimelineUIUtils();
56 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this. _tracingModel, this._uiUtils.hiddenRecordsFilter()); 57 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this. _tracingManager, this._tracingModel, this._uiUtils.hiddenRecordsFilter());
57 this._model = this._tracingTimelineModel; 58 this._model = this._tracingTimelineModel;
58 } else { 59 } else {
59 this._uiUtils = new WebInspector.TimelineUIUtilsImpl(); 60 this._uiUtils = new WebInspector.TimelineUIUtilsImpl();
60 this._model = new WebInspector.TimelineModelImpl(); 61 this._model = new WebInspector.TimelineModelImpl();
61 } 62 }
62 63
63 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar ted, this._onRecordingStarted, this); 64 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar ted, this._onRecordingStarted, this);
64 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop ped, this._onRecordingStopped, this); 65 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop ped, this._onRecordingStopped, this);
65 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare d, this._onRecordsCleared, this); 66 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare d, this._onRecordsCleared, this);
66 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingProg ress, this._onRecordingProgress, this); 67 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingProg ress, this._onRecordingProgress, this);
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 * @param {!WebInspector.TimelineModel.Record} record 1414 * @param {!WebInspector.TimelineModel.Record} record
1414 * @return {boolean} 1415 * @return {boolean}
1415 */ 1416 */
1416 accept: function(record) 1417 accept: function(record)
1417 { 1418 {
1418 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); 1419 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex);
1419 }, 1420 },
1420 1421
1421 __proto__: WebInspector.TimelineModel.Filter.prototype 1422 __proto__: WebInspector.TimelineModel.Filter.prototype
1422 } 1423 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/TracingModel.js ('k') | Source/devtools/front_end/timeline/TracingTimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698