Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Side by Side Diff: chrome/browser/resources/settings/people_page/quick_unlock_routing_behavior.js

Issue 2156413002: Settings Router Refactor: Migrate to settings.Route.navigateTo calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use timing fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 /** @enum {string} */ 5 /** @enum {string} */
6 var QuickUnlockScreen = { 6 var QuickUnlockScreen = {
7 AUTHENTICATE: 'quick-unlock-authenticate', 7 AUTHENTICATE: 'quick-unlock-authenticate',
8 CHOOSE_METHOD: 'quick-unlock-choose-method', 8 CHOOSE_METHOD: 'quick-unlock-choose-method',
9 SETUP_PIN: 'quick-unlock-setup-pin' 9 SETUP_PIN: 'quick-unlock-setup-pin'
10 }; 10 };
11 11
12 /** @polymerBehavior */ 12 /** @polymerBehavior */
13 var QuickUnlockRoutingBehavior = { 13 var QuickUnlockRoutingBehavior = {
14 properties: { 14 properties: {
15 /** @type {SettingsRoute} */ 15 /** @type {!settings.Route} */
16 currentRoute: { 16 currentRoute: {
17 type: Object, 17 type: Object,
18 notify: true, 18 notify: true,
19 } 19 }
20 }, 20 },
21 21
22 /** 22 /**
23 * Returns true if the given screen is active. 23 * Returns true if the given screen is active.
24 * @param {!QuickUnlockScreen} screen 24 * @param {!QuickUnlockScreen} screen
25 * @return {!boolean} 25 * @return {!boolean}
26 */ 26 */
27 isScreenActive: function(screen) { 27 isScreenActive: function(screen) {
28 var subpage = this.currentRoute.subpage; 28 var subpage = this.currentRoute.subpage;
29 return subpage.length > 0 && subpage[subpage.length - 1] == screen; 29 return subpage.length > 0 && subpage[subpage.length - 1] == screen;
30 }, 30 },
31 }; 31 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698