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..47e9d37cb10e947560b066e737e1f56c77c90616 100644 |
| --- a/chrome/browser/resources/settings/people_page/people_page.js |
| +++ b/chrome/browser/resources/settings/people_page/people_page.js |
| @@ -45,14 +45,37 @@ 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, |
|
Dan Beam
2016/01/07 02:41:20
can these be private?
tommycli
2016/01/07 22:08:23
Done.
|
| }, |
| + /** @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. |
| + * @private |
| + * @param {!string} name |
| + * @param {!string} iconUrl |
| + */ |
| + handleProfileInfo_: function(name, iconUrl) { |
| + this.profileName = name; |
| + this.profileIconUrl = iconUrl; |
| + }, |
| + |
| + /** |
| * Handler for when the sync state is pushed from settings.SyncPrivateApi. |
| * @private |
| */ |
| @@ -70,6 +93,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(); |
| }, |