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

Unified Diff: chrome/browser/resources/settings/controls/controlled_button.js

Issue 2617533003: MD Settings: change most checkboxes to toggles (leave dialogs alone) (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/settings/controls/controlled_button.js
diff --git a/chrome/browser/resources/settings/controls/controlled_button.js b/chrome/browser/resources/settings/controls/controlled_button.js
index ac4428f338322d6b5c40e0ba7060bb574b79d2af..31a230892f75090fd751803d10e5630ab57b2101 100644
--- a/chrome/browser/resources/settings/controls/controlled_button.js
+++ b/chrome/browser/resources/settings/controls/controlled_button.js
@@ -5,9 +5,19 @@
Polymer({
is: 'controlled-button',
- behaviors: [CrPolicyPrefBehavior, PrefControlBehavior],
+ behaviors: [
+ CrPolicyPrefBehavior,
+ CrPolicyIndicatorBehavior,
+ PrefControlBehavior,
+ ],
properties: {
+ rightJustified: {
+ type: Boolean,
+ value: false,
+ reflectToAttribute: true,
+ },
+
/** @private */
controlled_: {
type: Boolean,
@@ -33,4 +43,15 @@ Polymer({
e.preventDefault();
e.stopPropagation();
},
+
+ /**
+ * @param {!chrome.settingsPrivate.ControlledBy} controlledBy
+ * @param {!chrome.settingsPrivate.Enforcement} enforcement
+ * @return {boolean} Whether to show a controlled by indicator.
+ * @private
+ */
+ showIndicator_: function(controlledBy, enforcement) {
+ var indicatorType = this.getIndicatorType(controlledBy, enforcement);
+ return this.isIndicatorVisible(indicatorType);
+ },
});

Powered by Google App Engine
This is Rietveld 408576698