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 |