Chromium Code Reviews| Index: chrome/browser/resources/settings/people_page/people_page.js |
| diff --git a/chrome/browser/resources/settings/people_page/people_page.js b/chrome/browser/resources/settings/people_page/people_page.js |
| index 6a804f5fe24f87339ddbb022a2d1dec288e02e17..6e8624652e0dbd8c6021e3c146b1a79c8321f12b 100644 |
| --- a/chrome/browser/resources/settings/people_page/people_page.js |
| +++ b/chrome/browser/resources/settings/people_page/people_page.js |
| @@ -45,14 +45,35 @@ Polymer({ |
| * @type {?settings.SyncStatus} |
| */ |
| syncStatus: Object, |
| + |
| + /** |
| + * The currently selected profile icon URL. May be a data URL. |
| + */ |
| + profileIconUrl: String, |
| + |
| + /** |
| + * The current profile name. |
| + */ |
| + profileName: String, |
| }, |
| + /** @override */ |
| created: function() { |
| + settings.SyncPrivateApi.getProfileInfo(this.handleProfileInfo_.bind(this)); |
| settings.SyncPrivateApi.getSyncStatus( |
| this.handleSyncStatusFetched_.bind(this)); |
| }, |
| /** |
| + * Handler for when the profile's icon and name is updated. |
|
dschuyler
2015/12/22 18:47:48
@param
tommycli
2015/12/22 21:58:33
Done.
|
| + * @private |
| + */ |
| + handleProfileInfo_: function(name, iconUrl) { |
| + this.profileName = name; |
| + this.profileIconUrl = iconUrl; |
| + }, |
| + |
| + /** |
| * Handler for when the sync state is pushed from settings.SyncPrivateApi. |
| * @private |
| */ |
| @@ -70,6 +91,14 @@ Polymer({ |
| }, |
| /** @private */ |
| + onManageProfileTap_: function() { |
| +<if expr="not chromeos"> |
| + this.$.pages.setSubpageChain(['manageProfile']); |
| +</if> |
| + // TODO(tommycli): Implement ChromeOS version. January 2016. |
| + }, |
| + |
| + /** @private */ |
| onSigninTap_: function() { |
| settings.SyncPrivateApi.startSignIn(); |
| }, |