| Index: chrome/browser/resources/gaia_auth_host/authenticator.js
|
| diff --git a/chrome/browser/resources/gaia_auth_host/authenticator.js b/chrome/browser/resources/gaia_auth_host/authenticator.js
|
| index db85d62bb75a08eea9ed94f7238b52e0d3b7a81d..87f9c386141b030847f1b6e221a155830913563b 100644
|
| --- a/chrome/browser/resources/gaia_auth_host/authenticator.js
|
| +++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
|
| @@ -156,23 +156,6 @@ cr.define('cr.login', function() {
|
| this.loaded_ = false;
|
| };
|
|
|
| - /**
|
| - * Send message 'focusready' to Gaia so it sets focus on default input.
|
| - */
|
| - Authenticator.prototype.sendFocusReady = function() {
|
| - var currentUrl = this.webview_.src;
|
| - if (currentUrl.lastIndexOf(this.idpOrigin_) == 0) {
|
| - var msg = {
|
| - 'method': 'focusready'
|
| - };
|
| - // TODO(rsorokin): Get rid of this check once issue crbug.com/456118 is
|
| - // fixed.
|
| - if (this.webview_.contentWindow) {
|
| - this.webview_.contentWindow.postMessage(msg, currentUrl);
|
| - }
|
| - }
|
| - };
|
| -
|
| Authenticator.prototype.constructInitialFrameUrl_ = function(data) {
|
| var url = this.idpOrigin_ + (data.gaiaPath || IDP_PATH);
|
|
|
| @@ -393,8 +376,9 @@ cr.define('cr.login', function() {
|
| Authenticator.prototype.onLoadStop_ = function(e) {
|
| if (!this.loaded_) {
|
| this.loaded_ = true;
|
| - this.webview_.focus();
|
| this.dispatchEvent(new Event('ready'));
|
| + // Focus webview after dispatching event when webview is already visible.
|
| + this.webview_.focus();
|
| }
|
| };
|
|
|
|
|