Chromium Code Reviews| 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 /** | |
| 6 * @fileoverview Polymer element for displaying material design reset screen. | |
| 7 */ | |
| 8 | |
| 9 Polymer({ | |
| 10 is: 'oobe-reset-md', | |
| 11 | |
| 12 properties: { | |
| 13 /** | |
| 14 * State of the screen corresponding to the css style set by | |
| 15 * oobe_screen_reset.js. | |
| 16 * | |
| 17 * 1 - 'restart-required-view', | |
| 18 * 2 - 'powerwash-proposal-view', | |
| 19 * 4 - 'rollback-proposal-view', | |
|
jdufault
2017/04/06 01:04:52
Use separate variables instead of trying to encode
Wenzhao (Colin) Zang
2017/04/07 02:55:36
Done.
| |
| 20 * 8 - 'revert-promise-view', | |
| 21 * 0 - no state has been specified yet. | |
| 22 */ | |
| 23 uiState_: { | |
| 24 type: Number, | |
| 25 value: 0, | |
| 26 }, | |
| 27 | |
| 28 isOfficial_: Boolean, | |
| 29 }, | |
| 30 | |
| 31 getHidden_: function(uiState_, current) { | |
| 32 return !(uiState_ & current); | |
| 33 }, | |
| 34 | |
| 35 isHelpLinkHidden_: function(uiState_, isOfficial_) { | |
| 36 return !isOfficial_ || (uiState_ == 8); | |
| 37 }, | |
| 38 | |
| 39 /** | |
| 40 * On-tap event handler for cancel button. | |
| 41 */ | |
| 42 onCancelClicked_: function() { | |
| 43 chrome.send('login.ResetScreen.userActed', ['cancel-reset']); | |
| 44 }, | |
| 45 | |
| 46 /** | |
| 47 * On-tap event handler for restart button. | |
| 48 */ | |
| 49 onRestartClicked_: function() { | |
| 50 chrome.send('login.ResetScreen.userActed', ['restart-pressed']); | |
| 51 }, | |
| 52 | |
| 53 /** | |
| 54 * On-tap event handler for powerwash button. | |
| 55 */ | |
| 56 onPowerwashClicked_: function() { | |
| 57 chrome.send('login.ResetScreen.userActed', ['show-confirmation']); | |
| 58 }, | |
| 59 | |
| 60 /** | |
| 61 * On-tap event handler for learn more link. | |
| 62 */ | |
| 63 onLearnMoreClicked_: function() { | |
| 64 chrome.send('login.ResetScreen.userActed', ['learn-more-link']); | |
| 65 }, | |
| 66 }); | |
| OLD | NEW |