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

Unified Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.js

Issue 995753002: Load webview based GAIA in hidden state and pass focus when ready (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | chrome/browser/resources/gaia_auth_host/authenticator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/login/screen_gaia_signin.js
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index 8adf835ce2baab7d7dce2d6b94a73f35def87d4b..7ec6419b081804ef3b5e19d966552b5c6ef708aa 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -100,13 +100,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
*/
isWebviewSignin: false,
- /**
- * Whether screen is shown.
- * @type {boolean}
- * @private
- */
- isShown_: false,
-
/** @override */
decorate: function() {
this.isWebviewSignin = loadTimeData.getValue('isWebviewSignin');
@@ -115,8 +108,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
var webview = this.ownerDocument.createElement('webview');
webview.id = 'signin-frame';
webview.name = 'signin-frame';
- // TODO(dpolukhin): webview doesn't load page in hidden state,
- // use curtain instead.
+ webview.hidden = true;
$('signin-frame').parentNode.replaceChild(webview, $('signin-frame'));
this.gaiaAuthHost_ = new cr.login.GaiaAuthHost(webview);
} else {
@@ -184,10 +176,7 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
*/
showLoadingUI_: function(show) {
$('gaia-loading').hidden = !show;
- if (!this.isWebviewSignin) {
- // TODO(dpolukhin): proper implement curtain for webview signin.
- this.gaiaAuthHost_.frame.hidden = show;
- }
+ $('signin-frame').hidden = show;
$('signin-right').hidden = show;
$('enterprise-info-container').hidden = show;
$('gaia-signin-divider').hidden = show;
@@ -272,9 +261,11 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
// Button header is always visible when sign in is presented.
// Header is hidden once GAIA reports on successful sign in.
Oobe.getInstance().headerHidden = false;
- this.isShown_ = true;
- if (this.isWebviewSignin && !this.loading)
- this.gaiaAuthHost_.sendFocusReady();
+ },
+
+ onAfterShow: function(data) {
+ if (!this.loading && this.isWebviewSignin)
+ $('signin-frame').focus();
},
/**
@@ -283,7 +274,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
onBeforeHide: function() {
chrome.send('loginUIStateChanged', ['gaia-signin', false]);
$('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN;
- this.isShown_ = false;
},
/**
@@ -328,7 +318,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
$('login-header-bar').minuteMaid = this.isMinuteMaid;
-
if (data.useEmbedded)
params.gaiaPath = 'EmbeddedSignIn';
@@ -459,8 +448,6 @@ login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
*/
onAuthReady_: function() {
this.loading = false;
- if (this.isWebviewSignin && this.isShown_)
- this.gaiaAuthHost_.sendFocusReady();
this.clearLoadingTimer_();
// Show deferred error bubble.
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth_host/authenticator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698