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

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: Created 6 years, 2 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 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(
« chrome/browser/signin/easy_unlock_service_regular.cc ('K') | « chrome/chrome_browser_chromeos.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698