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

Unified Diff: chrome/browser/resources/settings/site_settings/category_default_setting.js

Issue 2762823002: MD Settings: minor cleanup of content settings code. (Closed)
Patch Set: fixes based on comments Created 3 years, 9 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/site_settings/category_default_setting.js
diff --git a/chrome/browser/resources/settings/site_settings/category_default_setting.js b/chrome/browser/resources/settings/site_settings/category_default_setting.js
index f481cc5da4e70946fdd431ff5e69be2ddac81274..c1c3c99b3f0a369ef80a21fc2b1e738f3b3651bb 100644
--- a/chrome/browser/resources/settings/site_settings/category_default_setting.js
+++ b/chrome/browser/resources/settings/site_settings/category_default_setting.js
@@ -50,6 +50,12 @@ Polymer({
/* Labels for the toggle on/off positions. */
toggleOffLabel: String,
toggleOnLabel: String,
+
+ subOptionLabel: String,
+ subOptionSecondary: {
+ type: String,
+ value: null, // Needs default value so binding fires upon initialization.
+ },
},
observers: [
@@ -208,5 +214,15 @@ Polymer({
isToggleDisabled_: function() {
return this.category == settings.ContentSettingsTypes.POPUPS &&
loadTimeData.getBoolean('isGuest');
+ },
+
+ /**
+ * Returns classname to indicate secondary label exists.
+ * @param {boolean} subOptionLabel
+ * @return {string}
+ * @private
+ */
+ subOptionClass_: function(subOptionLabel) {
+ return subOptionLabel ? 'two-line' : '';
}
});

Powered by Google App Engine
This is Rietveld 408576698