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

Side by Side Diff: webkit/glue/devtools/js/heap_profiler_panel.js

Issue 334046: DevTools: fix colors of heap snapshot summary bar. (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview Heap profiler panel implementation. 6 * @fileoverview Heap profiler panel implementation.
7 */ 7 */
8 8
9 WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) { 9 WebInspector.ProfilesPanel.prototype.addSnapshot = function(snapshot) {
10 snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number); 10 snapshot.title = WebInspector.UIString("Snapshot %d", snapshot.number);
(...skipping 16 matching lines...) Expand all
27 this.element.addStyleClass("heap-snapshot-view"); 27 this.element.addStyleClass("heap-snapshot-view");
28 28
29 this.parent = parent; 29 this.parent = parent;
30 this.parent.addEventListener("snapshot added", this._updateBaseOptions, this ); 30 this.parent.addEventListener("snapshot added", this._updateBaseOptions, this );
31 31
32 this.showCountAsPercent = true; 32 this.showCountAsPercent = true;
33 this.showSizeAsPercent = true; 33 this.showSizeAsPercent = true;
34 this.showCountDeltaAsPercent = true; 34 this.showCountDeltaAsPercent = true;
35 this.showSizeDeltaAsPercent = true; 35 this.showSizeDeltaAsPercent = true;
36 36
37 this.categories = {
38 code: new WebInspector.ResourceCategory("code", WebInspector.UIString("C ode"), "rgb(255,121,0)"),
39 data: new WebInspector.ResourceCategory("data", WebInspector.UIString("O bjects and Data"), "rgb(47,102,236)"),
40 other: new WebInspector.ResourceCategory("other", WebInspector.UIString( "Other"), "rgb(186,186,186)")
41 };
42
37 this.summaryBar = new WebInspector.SummaryBar(this.categories); 43 this.summaryBar = new WebInspector.SummaryBar(this.categories);
38 this.summaryBar.element.id = "heap-snapshot-summary"; 44 this.summaryBar.element.id = "heap-snapshot-summary";
39 this.summaryBar.calculator = new WebInspector.HeapSummaryCalculator(profile. used); 45 this.summaryBar.calculator = new WebInspector.HeapSummaryCalculator(profile. used);
40 this.element.appendChild(this.summaryBar.element); 46 this.element.appendChild(this.summaryBar.element);
41 47
42 var columns = { "cons": { title: WebInspector.UIString("Constructor"), discl osure: true, sortable: true }, 48 var columns = { "cons": { title: WebInspector.UIString("Constructor"), discl osure: true, sortable: true },
43 "count": { title: WebInspector.UIString("Count"), width: "54 px", sortable: true }, 49 "count": { title: WebInspector.UIString("Count"), width: "54 px", sortable: true },
44 "size": { title: WebInspector.UIString("Size"), width: "72px ", sort: "descending", sortable: true }, 50 "size": { title: WebInspector.UIString("Size"), width: "72px ", sort: "descending", sortable: true },
45 "countDelta": { title: WebInspector.UIString("\xb1 Count"), width: "72px", sortable: true }, 51 "countDelta": { title: WebInspector.UIString("\xb1 Count"), width: "72px", sortable: true },
46 "sizeDelta": { title: WebInspector.UIString("\xb1 Size"), wi dth: "72px", sortable: true } }; 52 "sizeDelta": { title: WebInspector.UIString("\xb1 Size"), wi dth: "72px", sortable: true } };
(...skipping 18 matching lines...) Expand all
65 this.percentButton = new WebInspector.StatusBarButton("", "percent-time-stat us-bar-item status-bar-item"); 71 this.percentButton = new WebInspector.StatusBarButton("", "percent-time-stat us-bar-item status-bar-item");
66 this.percentButton.addEventListener("click", this._percentClicked.bind(this) , false); 72 this.percentButton.addEventListener("click", this._percentClicked.bind(this) , false);
67 73
68 this.refresh(); 74 this.refresh();
69 75
70 this._updatePercentButton(); 76 this._updatePercentButton();
71 }; 77 };
72 78
73 WebInspector.HeapSnapshotView.prototype = { 79 WebInspector.HeapSnapshotView.prototype = {
74 80
75 get categories()
76 {
77 return {code: {title: WebInspector.UIString("Code"), color: {r: 255, g: 121, b: 0}}, data: {title: WebInspector.UIString("Objects and Data"), color: {r: 47, g: 102, b: 236}}, other: {title: WebInspector.UIString("Other"), color: {r: 186, g: 186, b: 186}}};
78 },
79
80 get statusBarItems() 81 get statusBarItems()
81 { 82 {
82 return [this.baseSelectElement, this.percentButton.element]; 83 return [this.baseSelectElement, this.percentButton.element];
83 }, 84 },
84 85
85 get profile() 86 get profile()
86 { 87 {
87 return this._profile; 88 return this._profile;
88 }, 89 },
89 90
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 707
707 708
708 (function() { 709 (function() {
709 var originalCreatePanels = WebInspector._createPanels; 710 var originalCreatePanels = WebInspector._createPanels;
710 WebInspector._createPanels = function() { 711 WebInspector._createPanels = function() {
711 originalCreatePanels.apply(this, arguments); 712 originalCreatePanels.apply(this, arguments);
712 if (WebInspector.panels.profiles) 713 if (WebInspector.panels.profiles)
713 WebInspector.panels.profiles.registerProfileType(new WebInspector.He apSnapshotProfileType()); 714 WebInspector.panels.profiles.registerProfileType(new WebInspector.He apSnapshotProfileType());
714 } 715 }
715 })(); 716 })();
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698