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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 427053002: Do not reload account picker when device-local account policy changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Moved policy code to Chrome-specific subclass. Created 6 years, 4 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: ui/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index e1b5d13f345c57f814544a60234227bde5a01048..a85db4fa945de0ca70213e31440d8456e7f733c1 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -1161,6 +1161,15 @@ cr.define('login', function() {
},
/**
+ * Updates the display name shown on the pod.
+ * @param {string} displayName The new display name
+ */
+ setDisplayName: function(displayName) {
+ this.user_.displayName = displayName;
+ this.update();
+ },
+
+ /**
* Handle mouse and keyboard events for the learn more button. Triggering
* the button causes information about public sessions to be shown.
* @param {Event} event Mouse or keyboard event.
@@ -1841,6 +1850,17 @@ cr.define('login', function() {
},
/**
+ * Updates the display name shown on a public session pod.
+ * @param {string} userID The user ID of the public session
+ * @param {string} displayName The new display name
+ */
+ setPublicSessionDisplayName: function(userID, displayName) {
+ var pod = this.getPodWithUsername_(userID);
+ if (pod != null)
+ pod.setDisplayName(displayName);
+ },
+
+ /**
* Updates the list of available keyboard layouts for a public session pod.
* @param {string} userID The user ID of the public session
* @param {!Object} list List of available keyboard layouts

Powered by Google App Engine
This is Rietveld 408576698