Lines Matching full:pref
10 * Helper function update element's state from pref change event.
13 * @param {!Event} event The pref change event.
20 // managed. They cannot be enabled as a result of a pref being
50 // Listen to pref changes.
52 this.pref,
57 // Invert pref value if inverted_pref == true.
73 Preferences.setIntegerPref(self.pref,
77 Preferences.setBooleanPref(self.pref,
97 cr.defineProperty(PrefCheckbox, 'pref', cr.PropertyKind.ATTR);
106 * Whether to use inverted pref value.
128 // Listen to pref changes.
129 Preferences.getInstance().addEventListener(this.pref,
146 Preferences.setBooleanPref(self.pref,
149 Preferences.setIntegerPref(self.pref,
160 cr.defineProperty(PrefRadio, 'pref', cr.PropertyKind.ATTR);
183 // Listen to pref changes.
184 Preferences.getInstance().addEventListener(this.pref,
196 Preferences.setIntegerPref(self.pref, self.value, self.metric);
206 cr.defineProperty(PrefNumeric, 'pref', cr.PropertyKind.ATTR);
235 Preferences.setIntegerPref(self.pref, self.value, self.metric);
257 * If true, the associated pref will be modified on each onchange event;
258 * otherwise, the pref will only be modified on the onmouseup event after
269 // Update the UI when the pref changes.
271 this.pref, this.onPrefChange_.bind(this));
282 * Event listener that updates the UI when the underlying pref changes.
283 * @param {Event} event The event that details the pref change.
294 * onchange handler that sets the pref when the user changes the value of
307 * Sets the integer value of |pref| to the value of this element.
312 this.pref, this.mapValueToRange_(this.value), this.metric);
319 * onkeyup/onmouseup handler that modifies the pref if |continuous| is
352 cr.defineProperty(PrefRange, 'pref', cr.PropertyKind.ATTR);
376 // Listen to pref changes.
377 Preferences.getInstance().addEventListener(this.pref,
408 console.error('undefined data type for <select> pref');
414 Preferences.setIntegerPref(self.pref,
418 Preferences.setDoublePref(self.pref,
424 Preferences.setBooleanPref(self.pref, value, self.metric);
427 Preferences.setStringPref(self.pref,
431 console.error('unknown data type for <select> pref: ' +
442 cr.defineProperty(PrefSelect, 'pref', cr.PropertyKind.ATTR);
472 // Listen to pref changes.
473 Preferences.getInstance().addEventListener(this.pref,
486 Preferences.setIntegerPref(self.pref, self.value, self.metric);
489 Preferences.setDoublePref(self.pref, self.value, self.metric);
492 Preferences.setStringPref(self.pref, self.value, self.metric);
509 cr.defineProperty(PrefTextField, 'pref', cr.PropertyKind.ATTR);