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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layer_viewer/Layers3DView.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) 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 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 } 659 }
660 660
661 /** 661 /**
662 * @param {string} caption 662 * @param {string} caption
663 * @param {string} name 663 * @param {string} name
664 * @param {boolean} value 664 * @param {boolean} value
665 * @param {!UI.Toolbar} toolbar 665 * @param {!UI.Toolbar} toolbar
666 * @return {!Common.Setting} 666 * @return {!Common.Setting}
667 */ 667 */
668 _createVisibilitySetting(caption, name, value, toolbar) { 668 _createVisibilitySetting(caption, name, value, toolbar) {
669 var checkbox = new UI.ToolbarCheckbox(Common.UIString(caption));
670 toolbar.appendToolbarItem(checkbox);
671 var setting = Common.settings.createSetting(name, value); 669 var setting = Common.settings.createSetting(name, value);
672 UI.SettingsUI.bindCheckbox(checkbox.inputElement, setting); 670 setting.setTitle(Common.UIString(caption));
673 setting.addChangeListener(this._update, this); 671 setting.addChangeListener(this._update, this);
672 toolbar.appendToolbarItem(new UI.ToolbarSettingCheckbox(setting));
674 return setting; 673 return setting;
675 } 674 }
676 675
677 _initToolbar() { 676 _initToolbar() {
678 this._panelToolbar = this._transformController.toolbar(); 677 this._panelToolbar = this._transformController.toolbar();
679 this.contentElement.appendChild(this._panelToolbar.element); 678 this.contentElement.appendChild(this._panelToolbar.element);
680 this._showSlowScrollRectsSetting = 679 this._showSlowScrollRectsSetting =
681 this._createVisibilitySetting('Slow scroll rects', 'frameViewerShowSlowS crollRects', true, this._panelToolbar); 680 this._createVisibilitySetting('Slow scroll rects', 'frameViewerShowSlowS crollRects', true, this._panelToolbar);
682 this._showPaintsSetting = 681 this._showPaintsSetting =
683 this._createVisibilitySetting('Paints', 'frameViewerShowPaints', true, t his._panelToolbar); 682 this._createVisibilitySetting('Paints', 'frameViewerShowPaints', true, t his._panelToolbar);
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 * @return {!Promise} 1175 * @return {!Promise}
1177 */ 1176 */
1178 update(glContext, scale) { 1177 update(glContext, scale) {
1179 this._gl = glContext; 1178 this._gl = glContext;
1180 this.scale = scale; 1179 this.scale = scale;
1181 return this.snapshot.replay(null, null, scale).then(imageURL => imageURL && UI.loadImage(imageURL)).then(image => { 1180 return this.snapshot.replay(null, null, scale).then(imageURL => imageURL && UI.loadImage(imageURL)).then(image => {
1182 this.texture = image && LayerViewer.LayerTextureManager._createTextureForI mage(glContext, image); 1181 this.texture = image && LayerViewer.LayerTextureManager._createTextureForI mage(glContext, image);
1183 }); 1182 });
1184 } 1183 }
1185 }; 1184 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698