1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
* @fileoverview
* 'settings-autofill-page' is the settings page containing settings for
* passwords, payment methods and addresses.
*/
Polymer({
is: 'settings-autofill-page',
behaviors: [PrefsBehavior],
properties: {
/** @private Filter applied to passwords and password exceptions. */
passwordFilter_: String,
/** @private {!Map<string, string>} */
focusConfig_: {
type: Object,
value: function() {
const map = new Map();
if (settings.routes.PASSWORDS) {
map.set(settings.routes.PASSWORDS.path, '#passwordManagerButton');
}
if (settings.routes.PAYMENTS) {
map.set(settings.routes.PAYMENTS.path, '#paymentManagerButton');
}
if (settings.routes.ADDRESSES) {
map.set(settings.routes.ADDRESSES.path, '#addressesManagerButton');
}
return map;
},
},
},
/**
* Shows the manage addresses sub page.
* @param {!Event} event
* @private
*/
onAddressesClick_: function(event) {
settings.navigateTo(settings.routes.ADDRESSES);
},
/**
* Shows the manage payment methods sub page.
* @private
*/
onPaymentsClick_: function() {
settings.navigateTo(settings.routes.PAYMENTS);
},
/**
* Shows a page to manage passwords. This is either the passwords sub page or
* the Google Password Manager page.
* @private
*/
onPasswordsClick_: function() {
PasswordManagerImpl.getInstance().recordPasswordsPageAccessInSettings();
loadTimeData.getBoolean('navigateToGooglePasswordManager') ?
settings.OpenWindowProxyImpl.getInstance().openURL(
loadTimeData.getString('googlePasswordManagerUrl')) :
settings.navigateTo(settings.routes.PASSWORDS);
},
});
|