Chromium Code Reviews| 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 96d678fb986a76dc090137788220cff98947ccd0..0808b9d4043970fe8f9e8c7c705c4ba25eeab2e9 100644 |
| --- a/ui/login/account_picker/user_pod_row.js |
| +++ b/ui/login/account_picker/user_pod_row.js |
| @@ -200,6 +200,13 @@ cr.define('login', function() { |
| __proto__: HTMLDivElement.prototype, |
| /** |
| + * The id of the icon being shown. |
| + * @type {string} |
| + * @private |
| + */ |
| + iconId_: '', |
| + |
| + /** |
| * Tooltip to be shown when the user hovers over the icon. The icon |
| * properties may be set so the tooltip is shown automatically when the icon |
| * is updated. The tooltip is shown in a bubble attached to the icon |
| @@ -286,6 +293,7 @@ cr.define('login', function() { |
| * one of the ids listed in {@code UserPodCustomIcon.ICONS}. |
| */ |
| setIcon: function(id) { |
| + this.iconId_ = id; |
| UserPodCustomIcon.ICONS.forEach(function(icon) { |
| this.iconElement.classList.toggle(icon.class, id == icon.id); |
| }, this); |
| @@ -472,7 +480,9 @@ cr.define('login', function() { |
| bubbleContent.textContent = this.tooltip_; |
| /** @const */ var BUBBLE_OFFSET = CUSTOM_ICON_CONTAINER_SIZE / 2; |
| - /** @const */ var BUBBLE_PADDING = 8; |
| + // TODO(tengs): Introduce a special reauth state for the account picker, |
|
Nikita (slow)
2014/10/27 15:15:10
nit: Makes sense to mention crbug issue # here.
Tim Song
2014/10/31 17:57:37
Done.
|
| + // instead of showing the tooltip bubble here. |
| + /** @const */ var BUBBLE_PADDING = 8 + (this.iconId_ ? 0 : 23); |
| $('bubble').showContentForElement(this, |
| cr.ui.Bubble.Attachment.RIGHT, |
| bubbleContent, |
| @@ -2257,10 +2267,11 @@ cr.define('login', function() { |
| return; |
| } |
| - if (!icon.id) |
| + if (!icon.id && !icon.tooltip) |
| return; |
| - pod.customIconElement.setIcon(icon.id); |
| + if (icon.id) |
| + pod.customIconElement.setIcon(icon.id); |
| if (icon.hardlockOnClick) { |
| pod.customIconElement.setInteractive( |