Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 17 matching lines...) Expand all Loading... | |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @constructor | 32 * @constructor |
| 33 * @param {function(string=)} showImageCallback | 33 * @param {function(string=)} showImageCallback |
| 34 * @extends {WebInspector.HBox} | 34 * @extends {WebInspector.HBox} |
| 35 */ | 35 */ |
| 36 WebInspector.PaintProfilerView = function(showImageCallback) | 36 WebInspector.PaintProfilerView = function(showImageCallback) |
| 37 { | 37 { |
| 38 WebInspector.HBox.call(this); | 38 WebInspector.HBox.call(this); |
|
dgozman
2016/09/22 16:35:34
Turn into web component as well?
| |
| 39 this.registerRequiredCSS("layer_viewer/paintProfiler.css"); | |
| 39 this.element.classList.add("paint-profiler-overview", "hbox"); | 40 this.element.classList.add("paint-profiler-overview", "hbox"); |
| 40 this._canvasContainer = this.element.createChild("div", "paint-profiler-canv as-container"); | 41 this._canvasContainer = this.element.createChild("div", "paint-profiler-canv as-container"); |
| 41 this._progressBanner = this.element.createChild("div", "banner hidden"); | 42 this._progressBanner = this.element.createChild("div", "banner hidden"); |
| 42 this._progressBanner.textContent = WebInspector.UIString("Profiling\u2026"); | 43 this._progressBanner.textContent = WebInspector.UIString("Profiling\u2026"); |
| 43 this._pieChart = new WebInspector.PieChart(55, this._formatPieChartTime.bind (this), true); | 44 this._pieChart = new WebInspector.PieChart(55, this._formatPieChartTime.bind (this), true); |
| 44 this._pieChart.element.classList.add("paint-profiler-pie-chart"); | 45 this._pieChart.element.classList.add("paint-profiler-pie-chart"); |
| 45 this.element.appendChild(this._pieChart.element); | 46 this.element.appendChild(this._pieChart.element); |
| 46 | 47 |
| 47 this._showImageCallback = showImageCallback; | 48 this._showImageCallback = showImageCallback; |
| 48 | 49 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 519 var method = logItem.method.toTitleCase(); | 520 var method = logItem.method.toTitleCase(); |
| 520 | 521 |
| 521 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie s(); | 522 var logItemCategories = WebInspector.PaintProfilerView._initLogItemCategorie s(); |
| 522 var result = logItemCategories[method]; | 523 var result = logItemCategories[method]; |
| 523 if (!result) { | 524 if (!result) { |
| 524 result = WebInspector.PaintProfilerView.categories()["misc"]; | 525 result = WebInspector.PaintProfilerView.categories()["misc"]; |
| 525 logItemCategories[method] = result; | 526 logItemCategories[method] = result; |
| 526 } | 527 } |
| 527 return result; | 528 return result; |
| 528 } | 529 } |
| OLD | NEW |