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 Polymer({ | 5 Polymer({ |
6 is: 'settings-passwords-and-forms-page', | 6 is: 'settings-passwords-and-forms-page', |
7 | 7 |
8 behaviors: [PrefsBehavior], | 8 behaviors: [PrefsBehavior], |
9 | 9 |
10 properties: { | 10 properties: { |
11 /** @private Filter applied to passwords and password exceptions. */ | 11 /** @private Filter applied to passwords and password exceptions. */ |
12 passwordFilter_: String, | 12 passwordFilter_: String, |
13 | 13 |
14 /** @type {?Map<string, string>} */ | 14 /** @type {?Map<string, string>} */ |
15 focusConfig: Object, | 15 focusConfig: Object, |
16 }, | 16 }, |
17 | 17 |
18 /** @override */ | 18 /** @override */ |
19 ready: function() { | 19 ready: function() { |
20 this.focusConfig_ = new Map(); | 20 this.focusConfig_ = new Map(); |
21 this.focusConfig_.set( | 21 if (settings.routes.AUTOFILL) { |
22 settings.Route.AUTOFILL.path, '#autofillManagerButton .subpage-arrow'); | 22 this.focusConfig_.set( |
23 this.focusConfig_.set( | 23 settings.routes.AUTOFILL.path, |
24 settings.Route.MANAGE_PASSWORDS.path, | 24 '#autofillManagerButton .subpage-arrow'); |
25 '#passwordManagerButton .subpage-arrow'); | 25 } |
| 26 if (settings.routes.MANAGE_PASSWORDS) { |
| 27 this.focusConfig_.set( |
| 28 settings.routes.MANAGE_PASSWORDS.path, |
| 29 '#passwordManagerButton .subpage-arrow'); |
| 30 } |
26 }, | 31 }, |
27 | 32 |
28 /** | 33 /** |
29 * Shows the manage autofill sub page. | 34 * Shows the manage autofill sub page. |
30 * @param {!Event} event | 35 * @param {!Event} event |
31 * @private | 36 * @private |
32 */ | 37 */ |
33 onAutofillTap_: function(event) { | 38 onAutofillTap_: function(event) { |
34 settings.navigateTo(settings.Route.AUTOFILL); | 39 settings.navigateTo(settings.routes.AUTOFILL); |
35 }, | 40 }, |
36 | 41 |
37 /** | 42 /** |
38 * Shows the manage passwords sub page. | 43 * Shows the manage passwords sub page. |
39 * @param {!Event} event | 44 * @param {!Event} event |
40 * @private | 45 * @private |
41 */ | 46 */ |
42 onPasswordsTap_: function(event) { | 47 onPasswordsTap_: function(event) { |
43 settings.navigateTo(settings.Route.MANAGE_PASSWORDS); | 48 settings.navigateTo(settings.routes.MANAGE_PASSWORDS); |
44 }, | 49 }, |
45 }); | 50 }); |
OLD | NEW |