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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 369 |
370 | 370 |
371 /** | 371 /** |
372 * @constructor | 372 * @constructor |
373 * @extends {WebInspector.VBox} | 373 * @extends {WebInspector.VBox} |
374 * @param {!WebInspector.FlameChartDataProvider} dataProvider | 374 * @param {!WebInspector.FlameChartDataProvider} dataProvider |
375 */ | 375 */ |
376 WebInspector.CPUProfileFlameChart = function(dataProvider) | 376 WebInspector.CPUProfileFlameChart = function(dataProvider) |
377 { | 377 { |
378 WebInspector.VBox.call(this); | 378 WebInspector.VBox.call(this); |
379 this.registerRequiredCSS("flameChart.css"); | |
380 this.element.id = "cpu-flame-chart"; | 379 this.element.id = "cpu-flame-chart"; |
381 | 380 |
382 this._overviewPane = new WebInspector.CPUProfileFlameChart.OverviewPane(data
Provider); | 381 this._overviewPane = new WebInspector.CPUProfileFlameChart.OverviewPane(data
Provider); |
383 this._overviewPane.show(this.element); | 382 this._overviewPane.show(this.element); |
384 | 383 |
385 this._mainPane = new WebInspector.FlameChart(dataProvider, this._overviewPan
e, true); | 384 this._mainPane = new WebInspector.FlameChart(dataProvider, this._overviewPan
e, true); |
386 this._mainPane.show(this.element); | 385 this._mainPane.show(this.element); |
387 this._mainPane.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); | 386 this._mainPane.addEventListener(WebInspector.FlameChart.Events.EntrySelected
, this._onEntrySelected, this); |
388 this._overviewPane.addEventListener(WebInspector.OverviewGrid.Events.WindowC
hanged, this._onWindowChanged, this); | 387 this._overviewPane.addEventListener(WebInspector.OverviewGrid.Events.WindowC
hanged, this._onWindowChanged, this); |
389 } | 388 } |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 | 506 |
508 /** | 507 /** |
509 * @constructor | 508 * @constructor |
510 * @extends {WebInspector.VBox} | 509 * @extends {WebInspector.VBox} |
511 * @implements {WebInspector.FlameChartDelegate} | 510 * @implements {WebInspector.FlameChartDelegate} |
512 * @param {!WebInspector.FlameChartDataProvider} dataProvider | 511 * @param {!WebInspector.FlameChartDataProvider} dataProvider |
513 */ | 512 */ |
514 WebInspector.CPUProfileFlameChart.OverviewPane = function(dataProvider) | 513 WebInspector.CPUProfileFlameChart.OverviewPane = function(dataProvider) |
515 { | 514 { |
516 WebInspector.VBox.call(this); | 515 WebInspector.VBox.call(this); |
517 this.element.classList.add("flame-chart-overview-pane"); | 516 this.element.classList.add("cpu-profile-flame-chart-overview-pane"); |
518 this._overviewContainer = this.element.createChild("div", "overview-containe
r"); | 517 this._overviewContainer = this.element.createChild("div", "cpu-profile-flame
-chart-overview-container"); |
519 this._overviewGrid = new WebInspector.OverviewGrid("flame-chart"); | 518 this._overviewGrid = new WebInspector.OverviewGrid("cpu-profile-flame-chart"
); |
520 this._overviewGrid.element.classList.add("fill"); | 519 this._overviewGrid.element.classList.add("fill"); |
521 this._overviewCanvas = this._overviewContainer.createChild("canvas", "flame-
chart-overview-canvas"); | 520 this._overviewCanvas = this._overviewContainer.createChild("canvas", "cpu-pr
ofile-flame-chart-overview-canvas"); |
522 this._overviewContainer.appendChild(this._overviewGrid.element); | 521 this._overviewContainer.appendChild(this._overviewGrid.element); |
523 this._overviewCalculator = new WebInspector.CPUProfileFlameChart.OverviewCal
culator(); | 522 this._overviewCalculator = new WebInspector.CPUProfileFlameChart.OverviewCal
culator(); |
524 this._dataProvider = dataProvider; | 523 this._dataProvider = dataProvider; |
525 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.WindowC
hanged, this._onWindowChanged, this); | 524 this._overviewGrid.addEventListener(WebInspector.OverviewGrid.Events.WindowC
hanged, this._onWindowChanged, this); |
526 } | 525 } |
527 | 526 |
528 WebInspector.CPUProfileFlameChart.OverviewPane.prototype = { | 527 WebInspector.CPUProfileFlameChart.OverviewPane.prototype = { |
529 /** | 528 /** |
530 * @param {number} windowStartTime | 529 * @param {number} windowStartTime |
531 * @param {number} windowEndTime | 530 * @param {number} windowEndTime |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 { | 653 { |
655 var ratio = window.devicePixelRatio; | 654 var ratio = window.devicePixelRatio; |
656 this._overviewCanvas.width = width * ratio; | 655 this._overviewCanvas.width = width * ratio; |
657 this._overviewCanvas.height = height * ratio; | 656 this._overviewCanvas.height = height * ratio; |
658 this._overviewCanvas.style.width = width + "px"; | 657 this._overviewCanvas.style.width = width + "px"; |
659 this._overviewCanvas.style.height = height + "px"; | 658 this._overviewCanvas.style.height = height + "px"; |
660 }, | 659 }, |
661 | 660 |
662 __proto__: WebInspector.VBox.prototype | 661 __proto__: WebInspector.VBox.prototype |
663 } | 662 } |
OLD | NEW |