Index: Source/devtools/front_end/StatusBarButton.js |
diff --git a/Source/devtools/front_end/StatusBarButton.js b/Source/devtools/front_end/StatusBarButton.js |
index 17b4078852c67411c6dfecd5319a279f5b07d60a..41c78f58fdd11f2b9d172e0563a508fdf85e23b8 100644 |
--- a/Source/devtools/front_end/StatusBarButton.js |
+++ b/Source/devtools/front_end/StatusBarButton.js |
@@ -497,3 +497,29 @@ WebInspector.StatusBarComboBox.prototype = { |
__proto__: WebInspector.StatusBarItem.prototype |
} |
+ |
+/** |
+ * @constructor |
+ * @extends {WebInspector.StatusBarItem} |
+ * @param {string} title |
+ */ |
+WebInspector.StatusBarCheckbox = function(title) |
+{ |
+ WebInspector.StatusBarItem.call(this, document.createElement("label")); |
+ this.element.classList.add("status-bar-item", "checkbox"); |
+ this._checkbox = this.element.createChild("input"); |
+ this._checkbox.type = "checkbox"; |
+ this.element.createTextChild(title); |
+} |
+ |
+WebInspector.StatusBarCheckbox.prototype = { |
+ /** |
+ * @return {boolean} |
+ */ |
+ checked: function() |
+ { |
+ return this._checkbox.checked; |
+ }, |
+ |
+ __proto__: WebInspector.StatusBarItem.prototype |
+} |