| 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 /** @enum {string} */ |
| 6 var QuickUnlockScreen = { |
| 7 AUTHENTICATE: 'quick-unlock-authenticate', |
| 8 CHOOSE_METHOD: 'quick-unlock-choose-method', |
| 9 SETUP_PIN: 'quick-unlock-setup-pin' |
| 10 }; |
| 11 |
| 12 /** @polymerBehavior */ |
| 13 var QuickUnlockRoutingBehavior = { |
| 14 properties: { |
| 15 currentRoute: { |
| 16 type: Object, |
| 17 notify: true, |
| 18 } |
| 19 }, |
| 20 |
| 21 /** |
| 22 * Returns true if the given screen is active. |
| 23 * @param {!QuickUnlockScreen} screen |
| 24 * @return {!boolean} |
| 25 */ |
| 26 isScreenActive: function(screen) { |
| 27 var subpage = this.currentRoute.subpage; |
| 28 return subpage.length > 0 && subpage[subpage.length - 1] == screen; |
| 29 }, |
| 30 }; |
| OLD | NEW |