OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 * @param {!WebInspector.TimelineFrameModel} frameModel | 407 * @param {!WebInspector.TimelineFrameModel} frameModel |
408 */ | 408 */ |
409 WebInspector.TimelineFlameChart = function(delegate, model, frameModel) | 409 WebInspector.TimelineFlameChart = function(delegate, model, frameModel) |
410 { | 410 { |
411 WebInspector.VBox.call(this); | 411 WebInspector.VBox.call(this); |
412 this.element.classList.add("timeline-flamechart"); | 412 this.element.classList.add("timeline-flamechart"); |
413 this.registerRequiredCSS("flameChart.css"); | 413 this.registerRequiredCSS("flameChart.css"); |
414 this._delegate = delegate; | 414 this._delegate = delegate; |
415 this._model = model; | 415 this._model = model; |
416 this._dataProvider = new WebInspector.TimelineFlameChartDataProvider(model,
frameModel); | 416 this._dataProvider = new WebInspector.TimelineFlameChartDataProvider(model,
frameModel); |
417 this._mainView = new WebInspector.FlameChart.MainPane(this._dataProvider, th
is, true, true); | 417 this._mainView = new WebInspector.FlameChart(this._dataProvider, this, true,
true); |
418 this._mainView.show(this.element); | 418 this._mainView.show(this.element); |
419 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); | 419 this._model.addEventListener(WebInspector.TimelineModel.Events.RecordingStar
ted, this._onRecordingStarted, this); |
420 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); | 420 this._mainView.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); |
421 } | 421 } |
422 | 422 |
423 WebInspector.TimelineFlameChart.prototype = { | 423 WebInspector.TimelineFlameChart.prototype = { |
424 /** | 424 /** |
425 * @param {number} windowStartTime | 425 * @param {number} windowStartTime |
426 * @param {number} windowEndTime | 426 * @param {number} windowEndTime |
427 */ | 427 */ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 */ | 526 */ |
527 _onEntrySelected: function(event) | 527 _onEntrySelected: function(event) |
528 { | 528 { |
529 var entryIndex = event.data; | 529 var entryIndex = event.data; |
530 var record = this._dataProvider._records[entryIndex]; | 530 var record = this._dataProvider._records[entryIndex]; |
531 this._delegate.selectRecord(record); | 531 this._delegate.selectRecord(record); |
532 }, | 532 }, |
533 | 533 |
534 __proto__: WebInspector.VBox.prototype | 534 __proto__: WebInspector.VBox.prototype |
535 } | 535 } |
OLD | NEW |