| Index: chrome/browser/resources/login/user_pod_row.js
|
| diff --git a/chrome/browser/resources/login/user_pod_row.js b/chrome/browser/resources/login/user_pod_row.js
|
| index d5e30dc2080916bcc39da6f712193b1cb41330c4..b6fbe379c1c7c0bde11dcca114e136ba8f6b1c2e 100644
|
| --- a/chrome/browser/resources/login/user_pod_row.js
|
| +++ b/chrome/browser/resources/login/user_pod_row.js
|
| @@ -159,7 +159,6 @@ cr.define('login', function() {
|
| /** @override */
|
| decorate: function() {
|
| this.tabIndex = UserPodTabOrder.POD_INPUT;
|
| - this.customButtonElement.tabIndex = UserPodTabOrder.POD_INPUT;
|
| this.actionBoxAreaElement.tabIndex = UserPodTabOrder.ACTION_BOX;
|
|
|
| this.addEventListener('keydown', this.handlePodKeyDown_.bind(this));
|
| @@ -187,9 +186,6 @@ cr.define('login', function() {
|
| 'click',
|
| this.handleRemoveUserConfirmationClick_.bind(this));
|
| }
|
| -
|
| - this.customButtonElement.addEventListener('click',
|
| - this.handleCustomButtonClick_.bind(this));
|
| },
|
|
|
| /**
|
| @@ -432,12 +428,12 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| - * Gets the custom button. This button is normally hidden, but can be shown
|
| + * Gets the custom icon. This icon is normally hidden, but can be shown
|
| * using the chrome.screenlockPrivate API.
|
| - * @type {!HTMLInputElement}
|
| + * @type {!HTMLDivElement}
|
| */
|
| - get customButtonElement() {
|
| - return this.querySelector('.custom-button');
|
| + get customIconElement() {
|
| + return this.querySelector('.custom-icon');
|
| },
|
|
|
| /**
|
| @@ -451,11 +447,8 @@ cr.define('login', function() {
|
| this.signedInIndicatorElement.hidden = !this.user_.signedIn;
|
|
|
| this.signinButtonElement.hidden = !this.isAuthTypeOnlineSignIn;
|
| - this.customButtonElement.tabIndex = UserPodTabOrder.POD_INPUT;
|
| - if (this.isAuthTypeUserClick) {
|
| + if (this.isAuthTypeUserClick)
|
| this.passwordLabelElement.textContent = this.authValue;
|
| - this.customButtonElement.tabIndex = -1;
|
| - }
|
|
|
| this.updateActionBoxArea();
|
|
|
| @@ -675,7 +668,7 @@ cr.define('login', function() {
|
| this.showSigninUI();
|
| } else if (this.isAuthTypeUserClick) {
|
| Oobe.disableSigninUI();
|
| - chrome.send('authenticateUser', [this.user.username, '']);
|
| + chrome.send('attemptUnlock', [this.user.username]);
|
| } else if (this.isAuthTypePassword) {
|
| if (!this.passwordElement.value)
|
| return false;
|
| @@ -881,13 +874,6 @@ cr.define('login', function() {
|
| this.parentNode.setActivatedPod(this);
|
| break;
|
| }
|
| - },
|
| -
|
| - /**
|
| - * Called when the custom button is clicked.
|
| - */
|
| - handleCustomButtonClick_: function() {
|
| - chrome.send('customButtonClicked', [this.user.username]);
|
| }
|
| };
|
|
|
| @@ -1144,10 +1130,8 @@ cr.define('login', function() {
|
| this.passwordElement.hidden = !isLockedUser;
|
| this.nameElement.hidden = isLockedUser;
|
|
|
| - if (this.isAuthTypeUserClick) {
|
| + if (this.isAuthTypeUserClick)
|
| this.passwordLabelElement.textContent = this.authValue;
|
| - this.customButtonElement.tabIndex = -1;
|
| - }
|
|
|
| UserPod.prototype.updateActionBoxArea.call(this);
|
| },
|
| @@ -1664,12 +1648,11 @@ cr.define('login', function() {
|
| },
|
|
|
| /**
|
| - * Shows a button on a user pod with an icon. Clicking on this button
|
| - * triggers an event used by the chrome.screenlockPrivate API.
|
| + * Shows a custom icon on a user pod besides the input field.
|
| * @param {string} username Username of pod to add button
|
| * @param {string} iconURL URL of the button icon
|
| */
|
| - showUserPodButton: function(username, iconURL) {
|
| + showUserPodCustomIcon: function(username, iconURL) {
|
| var pod = this.getPodWithUsername_(username);
|
| if (pod == null) {
|
| console.error('Unable to show user pod button for ' + username +
|
| @@ -1677,17 +1660,15 @@ cr.define('login', function() {
|
| return;
|
| }
|
|
|
| - pod.customButtonElement.hidden = false;
|
| - var icon =
|
| - pod.customButtonElement.querySelector('.custom-button-icon');
|
| - icon.src = iconURL;
|
| + pod.customIconElement.hidden = false;
|
| + pod.customIconElement.style.backgroundImage = url(iconURL);
|
| },
|
|
|
| /**
|
| - * Hides button from user pod added by showUserPodButton().
|
| + * Hides the custom icon in the user pod added by showUserPodCustomIcon().
|
| * @param {string} username Username of pod to remove button
|
| */
|
| - hideUserPodButton: function(username) {
|
| + hideUserPodCustomIcon: function(username) {
|
| var pod = this.getPodWithUsername_(username);
|
| if (pod == null) {
|
| console.error('Unable to hide user pod button for ' + username +
|
| @@ -1695,7 +1676,7 @@ cr.define('login', function() {
|
| return;
|
| }
|
|
|
| - pod.customButtonElement.hidden = true;
|
| + pod.customIconElement.hidden = true;
|
| },
|
|
|
| /**
|
| @@ -1728,7 +1709,7 @@ cr.define('login', function() {
|
| bubbleContent.classList.add('easy-unlock-button-content');
|
| bubbleContent.textContent = loadTimeData.getString('easyUnlockTooltip');
|
|
|
| - var attachElement = this.focusedPod_.customButtonElement;
|
| + var attachElement = this.focusedPod_.customIconElement;
|
| /** @const */ var BUBBLE_OFFSET = 20;
|
| /** @const */ var BUBBLE_PADDING = 8;
|
| $('bubble').showContentForElement(attachElement,
|
|
|