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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/timeline/CountersGraph.js

Issue 2678623002: DevTools: pass title when creating settings (Closed)
Patch Set: ac Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 * @param {!Timeline.CountersGraph.Counter} counter 372 * @param {!Timeline.CountersGraph.Counter} counter
373 * @param {(function(number): string)|undefined} formatter 373 * @param {(function(number): string)|undefined} formatter
374 */ 374 */
375 constructor(countersPane, title, currentValueLabel, graphColor, counter, forma tter) { 375 constructor(countersPane, title, currentValueLabel, graphColor, counter, forma tter) {
376 this._countersPane = countersPane; 376 this._countersPane = countersPane;
377 this.counter = counter; 377 this.counter = counter;
378 this._formatter = formatter || Number.withThousandsSeparator; 378 this._formatter = formatter || Number.withThousandsSeparator;
379 var container = countersPane._infoWidget.element.createChild('div', 'memory- counter-selector-info'); 379 var container = countersPane._infoWidget.element.createChild('div', 'memory- counter-selector-info');
380 380
381 this._setting = Common.settings.createSetting('timelineCountersGraph-' + tit le, true); 381 this._setting = Common.settings.createSetting('timelineCountersGraph-' + tit le, true);
382 this._filter = new UI.ToolbarCheckbox(title, title, this._setting); 382 this._setting.setTitle(title);
383 this._filter = new UI.ToolbarSettingCheckbox(this._setting, title);
383 this._filter.inputElement.classList.add('-theme-preserve'); 384 this._filter.inputElement.classList.add('-theme-preserve');
384 var color = Common.Color.parse(graphColor).setAlpha(0.5).asString(Common.Col or.Format.RGBA); 385 var color = Common.Color.parse(graphColor).setAlpha(0.5).asString(Common.Col or.Format.RGBA);
385 if (color) { 386 if (color) {
386 this._filter.element.backgroundColor = color; 387 this._filter.element.backgroundColor = color;
387 this._filter.element.borderColor = 'transparent'; 388 this._filter.element.borderColor = 'transparent';
388 } 389 }
389 this._filter.inputElement.addEventListener('click', this._toggleCounterGraph .bind(this)); 390 this._filter.inputElement.addEventListener('click', this._toggleCounterGraph .bind(this));
390 container.appendChild(this._filter.element); 391 container.appendChild(this._filter.element);
391 this._range = this._filter.element.createChild('span', 'range'); 392 this._range = this._filter.element.createChild('span', 'range');
392 393
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 } 596 }
596 597
597 /** 598 /**
598 * @override 599 * @override
599 * @return {number} 600 * @return {number}
600 */ 601 */
601 boundarySpan() { 602 boundarySpan() {
602 return this._maximumBoundary - this._minimumBoundary; 603 return this._maximumBoundary - this._minimumBoundary;
603 } 604 }
604 }; 605 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698