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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/CPUProfileFlameChart.js

Issue 2879943003: DevTools: render product badges behind the setting. (Closed)
Patch Set: removed module from the list. Created 3 years, 7 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) 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 21 matching lines...) Expand all
32 * @implements {PerfUI.FlameChartDataProvider} 32 * @implements {PerfUI.FlameChartDataProvider}
33 * @unrestricted 33 * @unrestricted
34 */ 34 */
35 Profiler.ProfileFlameChartDataProvider = class { 35 Profiler.ProfileFlameChartDataProvider = class {
36 constructor() { 36 constructor() {
37 PerfUI.FlameChartDataProvider.call(this); 37 PerfUI.FlameChartDataProvider.call(this);
38 this._colorGenerator = Profiler.ProfileFlameChartDataProvider.colorGenerator (); 38 this._colorGenerator = Profiler.ProfileFlameChartDataProvider.colorGenerator ();
39 } 39 }
40 40
41 /** 41 /**
42 * @return {!PerfUI.FlameChart.ColorGenerator} 42 * @return {!Common.Color.Generator}
43 */ 43 */
44 static colorGenerator() { 44 static colorGenerator() {
45 if (!Profiler.ProfileFlameChartDataProvider._colorGenerator) { 45 if (!Profiler.ProfileFlameChartDataProvider._colorGenerator) {
46 var colorGenerator = new PerfUI.FlameChart.ColorGenerator( 46 var colorGenerator =
47 {min: 30, max: 330}, {min: 50, max: 80, count: 5}, {min: 80, max: 90, count: 3}); 47 new Common.Color.Generator({min: 30, max: 330}, {min: 50, max: 80, cou nt: 5}, {min: 80, max: 90, count: 3});
48 48
49 colorGenerator.setColorForID('(idle)', 'hsl(0, 0%, 94%)'); 49 colorGenerator.setColorForID('(idle)', 'hsl(0, 0%, 94%)');
50 colorGenerator.setColorForID('(program)', 'hsl(0, 0%, 80%)'); 50 colorGenerator.setColorForID('(program)', 'hsl(0, 0%, 80%)');
51 colorGenerator.setColorForID('(garbage collector)', 'hsl(0, 0%, 80%)'); 51 colorGenerator.setColorForID('(garbage collector)', 'hsl(0, 0%, 80%)');
52 Profiler.ProfileFlameChartDataProvider._colorGenerator = colorGenerator; 52 Profiler.ProfileFlameChartDataProvider._colorGenerator = colorGenerator;
53 } 53 }
54 return Profiler.ProfileFlameChartDataProvider._colorGenerator; 54 return Profiler.ProfileFlameChartDataProvider._colorGenerator;
55 } 55 }
56 56
57 /** 57 /**
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 * @param {number} height 551 * @param {number} height
552 */ 552 */
553 _resetCanvas(width, height) { 553 _resetCanvas(width, height) {
554 var ratio = window.devicePixelRatio; 554 var ratio = window.devicePixelRatio;
555 this._overviewCanvas.width = width * ratio; 555 this._overviewCanvas.width = width * ratio;
556 this._overviewCanvas.height = height * ratio; 556 this._overviewCanvas.height = height * ratio;
557 this._overviewCanvas.style.width = width + 'px'; 557 this._overviewCanvas.style.width = width + 'px';
558 this._overviewCanvas.style.height = height + 'px'; 558 this._overviewCanvas.style.height = height + 'px';
559 } 559 }
560 }; 560 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698