Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(354)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layer_viewer/PaintProfilerView.js

Issue 2358253002: DevTools: extract a component for layer viewer (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698