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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
278 * @return {!WebInspector.TimelineView} | 278 * @return {!WebInspector.TimelineView} |
279 */ | 279 */ |
280 _timelineView: function() | 280 _timelineView: function() |
281 { | 281 { |
282 if (!this._lazyTimelineView) | 282 if (!this._lazyTimelineView) |
283 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m odel, this._uiUtils); | 283 this._lazyTimelineView = new WebInspector.TimelineView(this, this._m odel, this._uiUtils); |
284 return this._lazyTimelineView; | 284 return this._lazyTimelineView; |
285 }, | 285 }, |
286 | 286 |
287 /** | 287 /** |
288 * @param {!WebInspector.TracingModel.Event} traceEvent | |
289 */ | |
290 _selectPaintEvent: function(traceEvent) | |
caseq
2014/07/17 13:12:22
Why is is specific to paint?
malch
2014/07/17 15:17:44
Done.
| |
291 { | |
292 var eventRecord = undefined; | |
293 | |
294 function findRecordWithEvent(record) | |
295 { | |
296 if (record.traceEvent() === traceEvent) { | |
297 eventRecord = record; | |
298 return true; | |
299 } | |
300 return false; | |
301 } | |
302 | |
303 this._model.forAllRecords(findRecordWithEvent); | |
304 if (eventRecord) { | |
305 var selection = WebInspector.TimelineSelection.fromRecord(eventRecor d); | |
306 this.select(selection); | |
307 } | |
308 }, | |
309 | |
310 /** | |
288 * @return {!WebInspector.View} | 311 * @return {!WebInspector.View} |
289 */ | 312 */ |
290 _layersView: function() | 313 _layersView: function() |
291 { | 314 { |
292 if (this._lazyLayersView) | 315 if (this._lazyLayersView) |
293 return this._lazyLayersView; | 316 return this._lazyLayersView; |
294 this._lazyLayersView = new WebInspector.TimelineLayersView(); | 317 this._lazyLayersView = new WebInspector.TimelineLayersView(); |
318 this._lazyLayersView.setSelectPaintEventCallback(this._selectPaintEvent. bind(this)); | |
295 return this._lazyLayersView; | 319 return this._lazyLayersView; |
296 }, | 320 }, |
297 | 321 |
298 _paintProfilerView: function() | 322 _paintProfilerView: function() |
299 { | 323 { |
300 if (this._lazyPaintProfilerView) | 324 if (this._lazyPaintProfilerView) |
301 return this._lazyPaintProfilerView; | 325 return this._lazyPaintProfilerView; |
302 this._lazyPaintProfilerView = new WebInspector.TimelinePaintProfilerView (); | 326 this._lazyPaintProfilerView = new WebInspector.TimelinePaintProfilerView (); |
303 return this._lazyPaintProfilerView; | 327 return this._lazyPaintProfilerView; |
304 }, | 328 }, |
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1477 * @param {!WebInspector.TimelineModel.Record} record | 1501 * @param {!WebInspector.TimelineModel.Record} record |
1478 * @return {boolean} | 1502 * @return {boolean} |
1479 */ | 1503 */ |
1480 accept: function(record) | 1504 accept: function(record) |
1481 { | 1505 { |
1482 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); | 1506 return !this._regex || this._uiUtils.testContentMatching(record, this._r egex); |
1483 }, | 1507 }, |
1484 | 1508 |
1485 __proto__: WebInspector.TimelineModel.Filter.prototype | 1509 __proto__: WebInspector.TimelineModel.Filter.prototype |
1486 } | 1510 } |
OLD | NEW |