| 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 * The |name| is shown in the gui. The |value| us use to set or compare with | 6 * The |name| is shown in the gui. The |value| us use to set or compare with |
| 7 * the preference value. | 7 * the preference value. |
| 8 * @typedef {{ | 8 * @typedef {{ |
| 9 * name: string, | 9 * name: string, |
| 10 * value: (number|string) | 10 * value: (number|string) |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 * The value of the 'custom' item. | 68 * The value of the 'custom' item. |
| 69 * @private | 69 * @private |
| 70 */ | 70 */ |
| 71 notFoundValue_: { | 71 notFoundValue_: { |
| 72 type: String, | 72 type: String, |
| 73 value: 'SETTINGS_DROPDOWN_NOT_FOUND_ITEM', | 73 value: 'SETTINGS_DROPDOWN_NOT_FOUND_ITEM', |
| 74 }, | 74 }, |
| 75 }, | 75 }, |
| 76 | 76 |
| 77 behaviors: [ | 77 behaviors: [ |
| 78 I18nBehavior, | |
| 79 PrefControlBehavior, | 78 PrefControlBehavior, |
| 80 ], | 79 ], |
| 81 | 80 |
| 82 observers: [ | 81 observers: [ |
| 83 'checkSetup_(menuOptions)', | 82 'checkSetup_(menuOptions)', |
| 84 'updateSelected_(pref.value)', | 83 'updateSelected_(pref.value)', |
| 85 ], | 84 ], |
| 86 | 85 |
| 87 ready: function() { | 86 ready: function() { |
| 88 this.checkSetup_(this.menuOptions); | 87 this.checkSetup_(this.menuOptions); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 }, | 142 }, |
| 144 | 143 |
| 145 /** | 144 /** |
| 146 * @return {boolean} | 145 * @return {boolean} |
| 147 * @private | 146 * @private |
| 148 */ | 147 */ |
| 149 shouldDisableMenu_: function() { | 148 shouldDisableMenu_: function() { |
| 150 return this.disabled || !this.menuOptions.length; | 149 return this.disabled || !this.menuOptions.length; |
| 151 }, | 150 }, |
| 152 }); | 151 }); |
| OLD | NEW |