OLD | NEW |
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // Create model. | 77 // Create model. |
78 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) { | 78 if (WebInspector.experimentsSettings.timelineOnTraceEvents.isEnabled()) { |
79 this._tracingModel = new WebInspector.TracingModel(WebInspector.targetMa
nager.mainTarget()); | 79 this._tracingModel = new WebInspector.TracingModel(WebInspector.targetMa
nager.mainTarget()); |
80 this._tracingModel.addEventListener(WebInspector.TracingModel.Events.Buf
ferUsage, this._onTracingBufferUsage, this); | 80 this._tracingModel.addEventListener(WebInspector.TracingModel.Events.Buf
ferUsage, this._onTracingBufferUsage, this); |
81 | 81 |
82 this._uiUtils = new WebInspector.TracingTimelineUIUtils(); | 82 this._uiUtils = new WebInspector.TracingTimelineUIUtils(); |
83 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this.
_tracingModel, this._uiUtils.hiddenRecordsFilter()); | 83 this._tracingTimelineModel = new WebInspector.TracingTimelineModel(this.
_tracingModel, this._uiUtils.hiddenRecordsFilter()); |
84 this._model = this._tracingTimelineModel; | 84 this._model = this._tracingTimelineModel; |
85 } else { | 85 } else { |
86 this._uiUtils = new WebInspector.TimelineUIUtilsImpl(); | 86 this._uiUtils = new WebInspector.TimelineUIUtilsImpl(); |
87 this._model = new WebInspector.TimelineModelImpl(WebInspector.timelineMa
nager); | 87 this._model = new WebInspector.TimelineModelImpl(); |
88 } | 88 } |
89 | 89 |
90 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); | 90 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); |
91 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop
ped, this._onRecordingStopped, this); | 91 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStop
ped, this._onRecordingStopped, this); |
92 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare
d, this._onRecordsCleared, this); | 92 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordsCleare
d, this._onRecordsCleared, this); |
93 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingProg
ress, this._onRecordingProgress, this); | 93 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingProg
ress, this._onRecordingProgress, this); |
94 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordFilterC
hanged, this._refreshViews, this); | 94 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordFilterC
hanged, this._refreshViews, this); |
95 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded,
this._onRecordAdded, this); | 95 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordAdded,
this._onRecordAdded, this); |
96 | 96 |
97 this._categoryFilter = new WebInspector.TimelineCategoryFilter(this._uiUtils
); | 97 this._categoryFilter = new WebInspector.TimelineCategoryFilter(this._uiUtils
); |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1032 } | 1032 } |
1033 switch (this._selection.type()) { | 1033 switch (this._selection.type()) { |
1034 case WebInspector.TimelineSelection.Type.Record: | 1034 case WebInspector.TimelineSelection.Type.Record: |
1035 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); | 1035 var record = /** @type {!WebInspector.TimelineModel.Record} */ (this
._selection.object()); |
1036 if (this._tracingTimelineModel) { | 1036 if (this._tracingTimelineModel) { |
1037 var event = record.traceEvent(); | 1037 var event = record.traceEvent(); |
1038 this._uiUtils.generateDetailsContent(record, this._model, this._
detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.bind(this,
event)); | 1038 this._uiUtils.generateDetailsContent(record, this._model, this._
detailsLinkifier, this._appendDetailsTabsForTraceEventAndShowDetails.bind(this,
event)); |
1039 break; | 1039 break; |
1040 } | 1040 } |
1041 var title = this._uiUtils.titleForRecord(record); | 1041 var title = this._uiUtils.titleForRecord(record); |
1042 this._uiUtils.generateDetailsContent(record, this._model, this._deta
ilsLinkifier, this.showInDetails.bind(this, title), this._model.loadedFromFile()
); | 1042 this._uiUtils.generateDetailsContent(record, this._model, this._deta
ilsLinkifier, this.showInDetails.bind(this, title)); |
1043 break; | 1043 break; |
1044 case WebInspector.TimelineSelection.Type.TraceEvent: | 1044 case WebInspector.TimelineSelection.Type.TraceEvent: |
1045 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); | 1045 var event = /** @type {!WebInspector.TracingModel.Event} */ (this._s
election.object()); |
1046 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th
is._tracingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTrac
eEventAndShowDetails.bind(this, event)); | 1046 WebInspector.TracingTimelineUIUtils.buildTraceEventDetails(event, th
is._tracingTimelineModel, this._detailsLinkifier, this._appendDetailsTabsForTrac
eEventAndShowDetails.bind(this, event)); |
1047 break; | 1047 break; |
1048 case WebInspector.TimelineSelection.Type.Frame: | 1048 case WebInspector.TimelineSelection.Type.Frame: |
1049 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); | 1049 var frame = /** @type {!WebInspector.TimelineFrame} */ (this._select
ion.object()); |
1050 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns
pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram
e)); | 1050 this.showInDetails(WebInspector.UIString("Frame Statistics"), WebIns
pector.TimelineUIUtils.generateDetailsContentForFrame(this._lazyFrameModel, fram
e)); |
1051 if (frame.layerTree) { | 1051 if (frame.layerTree) { |
1052 var layersView = this._layersView(); | 1052 var layersView = this._layersView(); |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 * @param {!WebInspector.TimelineModel.Record} record | 1480 * @param {!WebInspector.TimelineModel.Record} record |
1481 * @return {boolean} | 1481 * @return {boolean} |
1482 */ | 1482 */ |
1483 accept: function(record) | 1483 accept: function(record) |
1484 { | 1484 { |
1485 return !this._regex || this._uiUtils.testContentMatching(record, this._r
egex); | 1485 return !this._regex || this._uiUtils.testContentMatching(record, this._r
egex); |
1486 }, | 1486 }, |
1487 | 1487 |
1488 __proto__: WebInspector.TimelineModel.Filter.prototype | 1488 __proto__: WebInspector.TimelineModel.Filter.prototype |
1489 } | 1489 } |
OLD | NEW |