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

Side by Side Diff: chrome/browser/resources/settings/controls/settings_input.js

Issue 1369403006: Add cr-policy-network-indicator and add to internet settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate policy indicator strings Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * `settings-input` is a single-line text field for user input associated 7 * `settings-input` is a single-line text field for user input associated
8 * with a pref value. 8 * with a pref value.
9 * 9 *
10 * @element settings-input 10 * @element settings-input
11 */ 11 */
12 Polymer({ 12 Polymer({
13 is: 'settings-input', 13 is: 'settings-input',
14 14
15 behaviors: [PolicyControllable], 15 behaviors: [CrPolicyPrefBehavior],
16 16
17 properties: { 17 properties: {
18 /** 18 /**
19 * The preference object to control. 19 * The preference object to control.
20 * @type {chrome.settingsPrivate.PrefObject|undefined} 20 * @type {!chrome.settingsPrivate.PrefObject|undefined}
21 */ 21 */
22 pref: { 22 pref: {
23 type: Object, 23 type: Object,
24 notify: true, 24 notify: true,
25 observer: 'prefChanged_' 25 observer: 'prefChanged_'
26 }, 26 },
27 27
28 /** 28 /**
29 * The current value of the input, reflected to/from |pref|. 29 * The current value of the input, reflected to/from |pref|.
30 */ 30 */
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 this.set('pref.value', n); 121 this.set('pref.value', n);
122 } else { 122 } else {
123 assert(this.pref.type == chrome.settingsPrivate.PrefType.STRING || 123 assert(this.pref.type == chrome.settingsPrivate.PrefType.STRING ||
124 this.pref.type == chrome.settingsPrivate.PrefType.URL); 124 this.pref.type == chrome.settingsPrivate.PrefType.URL);
125 this.set('pref.value', this.value); 125 this.set('pref.value', this.value);
126 } 126 }
127 }, 127 },
128 128
129 /** 129 /**
130 * @param {boolean} disabled 130 * @param {boolean} disabled
131 * @param {?chrome.settingsPrivate.PrefObject} pref 131 * @param {!chrome.settingsPrivate.PrefObject} pref
132 * @return {boolean} Whether the element should be disabled. 132 * @return {boolean} Whether the element should be disabled.
133 * @private 133 * @private
134 */ 134 */
135 isDisabled_: function(disabled, pref) { 135 isDisabled_: function(disabled, pref) {
136 return disabled || this.isPolicyControlled(pref); 136 return disabled || this.isPrefPolicyControlled(pref);
137 }, 137 },
138 }); 138 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698