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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-manage-profile' is the settings subpage containing controls to | 7 * 'settings-manage-profile' is the settings subpage containing controls to |
8 * edit a profile's name, icon, and desktop shortcut. | 8 * edit a profile's name, icon, and desktop shortcut. |
9 */ | 9 */ |
10 Polymer({ | 10 Polymer({ |
(...skipping 15 matching lines...) Expand all Loading... | |
26 /** | 26 /** |
27 * The available icons for selection. | 27 * The available icons for selection. |
28 * @type {!Array<string>} | 28 * @type {!Array<string>} |
29 */ | 29 */ |
30 availableIcons: { | 30 availableIcons: { |
31 type: Array, | 31 type: Array, |
32 value: function() { return []; }, | 32 value: function() { return []; }, |
33 }, | 33 }, |
34 | 34 |
35 /** | 35 /** |
36 * The current sync status. | |
37 * @type {?settings.SyncStatus} | |
38 */ | |
39 syncStatus: Object, | |
40 | |
41 /** | |
36 * @private {!settings.ManageProfileBrowserProxy} | 42 * @private {!settings.ManageProfileBrowserProxy} |
37 */ | 43 */ |
38 browserProxy_: { | 44 browserProxy_: { |
39 type: Object, | 45 type: Object, |
40 value: function() { | 46 value: function() { |
41 return settings.ManageProfileBrowserProxyImpl.getInstance(); | 47 return settings.ManageProfileBrowserProxyImpl.getInstance(); |
42 }, | 48 }, |
43 }, | 49 }, |
44 }, | 50 }, |
45 | 51 |
(...skipping 22 matching lines...) Expand all Loading... | |
68 | 74 |
69 /** | 75 /** |
70 * Handler for when an avatar is activated. | 76 * Handler for when an avatar is activated. |
71 * @param {!Event} event | 77 * @param {!Event} event |
72 * @private | 78 * @private |
73 */ | 79 */ |
74 onIconActivate_: function(event) { | 80 onIconActivate_: function(event) { |
75 this.browserProxy_.setProfileIconAndName(event.detail.selected, | 81 this.browserProxy_.setProfileIconAndName(event.detail.selected, |
76 this.profileName); | 82 this.profileName); |
77 }, | 83 }, |
84 | |
85 /** | |
86 * @param {?settings.SyncStatus} syncStatus | |
87 * @return {boolean} Whether to disable the profile name field. | |
88 * @private | |
89 */ | |
90 disableProfileName_: function(syncStatus) { | |
tommycli
2016/10/03 20:37:22
isProfileNameDisabled_
Moe
2016/10/03 22:26:43
Done.
| |
91 return !!syncStatus.supervisedUser && !syncStatus.childUser; | |
92 }, | |
78 }); | 93 }); |
OLD | NEW |