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

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

Issue 668213003: Reauthenticate the user before launching Smart Lock setup app. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes + git cl format Created 6 years, 1 month 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
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5526f91a8456b3631ce9b10aaf35c6b5d69efe21..fd3778d66764e2bd5327fe93cba7bf659cb22a38 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);
@@ -477,7 +485,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,
+ // instead of showing the tooltip bubble here (crbug.com/409427).
+ /** @const */ var BUBBLE_PADDING = 8 + (this.iconId_ ? 0 : 23);
$('bubble').showContentForElement(this,
cr.ui.Bubble.Attachment.RIGHT,
bubbleContent,
@@ -2265,10 +2275,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(
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698