| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Polymer({ |
| 6 is: 'controlled-button', |
| 7 |
| 8 behaviors: [CrPolicyPrefBehavior, PrefControlBehavior], |
| 9 |
| 10 properties: { |
| 11 disabled_: { |
| 12 type: Boolean, |
| 13 computed: 'computeDisabled_(pref.*)', |
| 14 }, |
| 15 }, |
| 16 |
| 17 /** |
| 18 * @param {!chrome.settingsPrivate.PrefObject} pref |
| 19 * @return {boolean} Whether the button should be disabled. |
| 20 * @private |
| 21 */ |
| 22 computeDisabled_: function(pref) { |
| 23 return this.isPrefPolicyControlled(pref); |
| 24 }, |
| 25 }); |
| OLD | NEW |