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

Side by Side Diff: ui/login/account_picker/user_pod_row.js

Issue 2548703002: cros: Smart unlock set-up had space for icon while none is show. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @fileoverview User pod row implementation. 6 * @fileoverview User pod row implementation.
7 */ 7 */
8 8
9 cr.define('login', function() { 9 cr.define('login', function() {
10 /** 10 /**
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 * @param {!string} ariaLabel 367 * @param {!string} ariaLabel
368 */ 368 */
369 setAriaLabel: function(ariaLabel) { 369 setAriaLabel: function(ariaLabel) {
370 this.iconElement.setAttribute('aria-label', ariaLabel); 370 this.iconElement.setAttribute('aria-label', ariaLabel);
371 }, 371 },
372 372
373 /** 373 /**
374 * Shows the icon. 374 * Shows the icon.
375 */ 375 */
376 show: function() { 376 show: function() {
377 this.hidden = false; 377 // Show the icon if the current iconId is valid.
378 var validIcon = false;
379 UserPodCustomIcon.ICONS.forEach(function(icon) {
380 validIcon = validIcon || this.iconId_ == icon.id;
381 }, this);
382 this.hidden = validIcon ? false : true;
378 }, 383 },
379 384
380 /** 385 /**
381 * Updates the icon tooltip. If {@code autoshow} parameter is set the 386 * Updates the icon tooltip. If {@code autoshow} parameter is set the
382 * tooltip is immediatelly shown. If tooltip text is not set, the method 387 * tooltip is immediatelly shown. If tooltip text is not set, the method
383 * ensures the tooltip gets hidden. If tooltip is shown prior to this call, 388 * ensures the tooltip gets hidden. If tooltip is shown prior to this call,
384 * it remains shown, but the tooltip text is updated. 389 * it remains shown, but the tooltip text is updated.
385 * @param {!{text: string, autoshow: boolean}} tooltip The tooltip 390 * @param {!{text: string, autoshow: boolean}} tooltip The tooltip
386 * parameters. 391 * parameters.
387 */ 392 */
(...skipping 3337 matching lines...) Expand 10 before | Expand all | Expand 10 after
3725 if (pod && pod.multiProfilesPolicyApplied) { 3730 if (pod && pod.multiProfilesPolicyApplied) {
3726 pod.userTypeBubbleElement.classList.remove('bubble-shown'); 3731 pod.userTypeBubbleElement.classList.remove('bubble-shown');
3727 } 3732 }
3728 } 3733 }
3729 }; 3734 };
3730 3735
3731 return { 3736 return {
3732 PodRow: PodRow 3737 PodRow: PodRow
3733 }; 3738 };
3734 }); 3739 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698