OLD | NEW |
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 Polymer({ | 10 Polymer({ |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 this.set('pref.value', n); | 112 this.set('pref.value', n); |
113 } else { | 113 } else { |
114 assert(this.pref.type == chrome.settingsPrivate.PrefType.STRING || | 114 assert(this.pref.type == chrome.settingsPrivate.PrefType.STRING || |
115 this.pref.type == chrome.settingsPrivate.PrefType.URL); | 115 this.pref.type == chrome.settingsPrivate.PrefType.URL); |
116 this.set('pref.value', this.value); | 116 this.set('pref.value', this.value); |
117 } | 117 } |
118 }, | 118 }, |
119 | 119 |
120 /** | 120 /** |
121 * @param {boolean} disabled | 121 * @param {boolean} disabled |
122 * @param {!chrome.settingsPrivate.PrefObject} pref | |
123 * @return {boolean} Whether the element should be disabled. | 122 * @return {boolean} Whether the element should be disabled. |
124 * @private | 123 * @private |
125 */ | 124 */ |
126 isDisabled_: function(disabled, pref) { | 125 isDisabled_: function(disabled) { |
127 return disabled || this.isPrefPolicyControlled(pref); | 126 return disabled || this.isPrefPolicyControlled(); |
128 }, | 127 }, |
129 }); | 128 }); |
OLD | NEW |