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

Unified Diff: chrome/browser/resources/gaia_auth_host/authenticator.js

Issue 958923003: ChromeOS Gaia: Do not send 'focusready' message when Gaia window is focused (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove debug output Created 5 years, 10 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
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5692dc18a51db9f0aa9cdfa960b9449e02148ba1..db85d62bb75a08eea9ed94f7238b52e0d3b7a81d 100644
--- a/chrome/browser/resources/gaia_auth_host/authenticator.js
+++ b/chrome/browser/resources/gaia_auth_host/authenticator.js
@@ -157,10 +157,20 @@ cr.define('cr.login', function() {
};
/**
- * Set focus in Gaia on default input.
+ * Send message 'focusready' to Gaia so it sets focus on default input.
*/
- Authenticator.prototype.setFocus = function() {
- this.onFocus_();
+ 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) {
@@ -245,16 +255,6 @@ cr.define('cr.login', function() {
*/
Authenticator.prototype.onFocus_ = function(e) {
this.webview_.focus();
- 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);
- }
};
/**
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698