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

Side by Side Diff: Source/devtools/front_end/ui/StatusBar.js

Issue 805853002: DevTools: Make labeled checkbox a web component (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ui/SettingsUI.js ('k') | Source/devtools/front_end/ui/UIUtils.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 748
749 /** 749 /**
750 * @constructor 750 * @constructor
751 * @extends {WebInspector.StatusBarItem} 751 * @extends {WebInspector.StatusBarItem}
752 * @param {string} text 752 * @param {string} text
753 * @param {string=} title 753 * @param {string=} title
754 * @param {!WebInspector.Setting=} setting 754 * @param {!WebInspector.Setting=} setting
755 */ 755 */
756 WebInspector.StatusBarCheckbox = function(text, title, setting) 756 WebInspector.StatusBarCheckbox = function(text, title, setting)
757 { 757 {
758 WebInspector.StatusBarItem.call(this, createElementWithClass("label", "check box")); 758 WebInspector.StatusBarItem.call(this, createCheckboxLabel(text));
759 this.inputElement = this.element.createChild("input"); 759 this.element.classList.add("checkbox");
760 this.inputElement.type = "checkbox"; 760 this.inputElement = this.element.checkboxElement;
761 this.element.createTextChild(text);
762 if (title) 761 if (title)
763 this.element.title = title; 762 this.element.title = title;
764 if (setting) 763 if (setting)
765 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting); 764 WebInspector.SettingsUI.bindCheckbox(this.inputElement, setting);
766 } 765 }
767 766
768 WebInspector.StatusBarCheckbox.prototype = { 767 WebInspector.StatusBarCheckbox.prototype = {
769 /** 768 /**
770 * @return {boolean} 769 * @return {boolean}
771 */ 770 */
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
879 * @param {!Element} element 878 * @param {!Element} element
880 */ 879 */
881 WebInspector.StatusBarItemWrapper = function(element) 880 WebInspector.StatusBarItemWrapper = function(element)
882 { 881 {
883 WebInspector.StatusBarItem.call(this, element, true); 882 WebInspector.StatusBarItem.call(this, element, true);
884 } 883 }
885 884
886 WebInspector.StatusBarItemWrapper.prototype = { 885 WebInspector.StatusBarItemWrapper.prototype = {
887 __proto__: WebInspector.StatusBarItem.prototype 886 __proto__: WebInspector.StatusBarItem.prototype
888 } 887 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/SettingsUI.js ('k') | Source/devtools/front_end/ui/UIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698