| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 A dialog allowing the user to turn off the Easy Unlock feature. | 6 * @fileoverview A dialog allowing the user to turn off the Easy Unlock feature. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 (function() { | 9 (function() { |
| 10 | 10 |
| 11 /** | 11 /** |
| 12 * Possible UI statuses for the EasyUnlockTurnOffDialogElement. | 12 * Possible UI statuses for the EasyUnlockTurnOffDialogElement. |
| 13 * See easy_unlock_settings_handler.cc. | 13 * See easy_unlock_settings_handler.cc. |
| 14 * @enum {string} | 14 * @enum {string} |
| 15 */ | 15 */ |
| 16 var EasyUnlockTurnOffStatus = { | 16 var EasyUnlockTurnOffStatus = { |
| 17 UNKNOWN: 'unknown', | 17 UNKNOWN: 'unknown', |
| 18 OFFLINE: 'offline', | 18 OFFLINE: 'offline', |
| 19 IDLE: 'idle', | 19 IDLE: 'idle', |
| 20 PENDING: 'pending', | 20 PENDING: 'pending', |
| 21 SERVER_ERROR: 'server-error', | 21 SERVER_ERROR: 'server-error', |
| 22 }; | 22 }; |
| 23 | 23 |
| 24 Polymer({ | 24 Polymer({ |
| 25 is: 'easy-unlock-turn-off-dialog', | 25 is: 'easy-unlock-turn-off-dialog', |
| 26 | 26 |
| 27 behaviors: [I18nBehavior, WebUIListenerBehavior], | 27 behaviors: [I18nBehavior, WebUIListenerBehavior], |
| 28 | 28 |
| 29 properties: { | 29 properties: { |
| 30 /** @private {!settings.EasyUnlockBrowserProxyImpl} */ | 30 /** @private {!settings.EasyUnlockBrowserProxy} */ |
| 31 browserProxy_: Object, | 31 browserProxy_: Object, |
| 32 | 32 |
| 33 /** @private {!EasyUnlockTurnOffStatus} */ | 33 /** @private {!EasyUnlockTurnOffStatus} */ |
| 34 status_: { | 34 status_: { |
| 35 type: String, | 35 type: String, |
| 36 value: EasyUnlockTurnOffStatus.UNKNOWN, | 36 value: EasyUnlockTurnOffStatus.UNKNOWN, |
| 37 }, | 37 }, |
| 38 | 38 |
| 39 /** @private {?WebUIListener} */ | 39 /** @private {?WebUIListener} */ |
| 40 turnOffStatusWebUiListener_: { | 40 turnOffStatusWebUiListener_: { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 * @return {boolean} | 197 * @return {boolean} |
| 198 * @private | 198 * @private |
| 199 */ | 199 */ |
| 200 isTurnOffButtonEnabled_: function(status) { | 200 isTurnOffButtonEnabled_: function(status) { |
| 201 return status == EasyUnlockTurnOffStatus.IDLE || | 201 return status == EasyUnlockTurnOffStatus.IDLE || |
| 202 status == EasyUnlockTurnOffStatus.SERVER_ERROR; | 202 status == EasyUnlockTurnOffStatus.SERVER_ERROR; |
| 203 }, | 203 }, |
| 204 }); | 204 }); |
| 205 | 205 |
| 206 })(); | 206 })(); |
| OLD | NEW |