Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: chrome/browser/resources/settings/people_page/people_page.js

Issue 1536593004: Settings People Revamp: Implement Chrome Profile name/icon selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..a78e2425d00087bcb0cce2a4533bf45553922d2b 100644
--- a/chrome/browser/resources/settings/people_page/people_page.js
+++ b/chrome/browser/resources/settings/people_page/people_page.js
@@ -45,14 +45,39 @@ Polymer({
* @type {?settings.SyncStatus}
*/
syncStatus: Object,
+
+ /**
+ * The currently selected profile icon URL. May be a data URL.
+ * @private {string}
+ */
+ profileIconUrl_: String,
+
+ /**
+ * The current profile name.
+ * @private {string}
+ */
+ 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.
+ * @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 +95,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();
},

Powered by Google App Engine
This is Rietveld 408576698