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

Side by Side Diff: chrome/browser/resources/chromeos/login/screen_gaia_signin.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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/gaia_auth_host/authenticator.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 Oobe signin screen implementation. 6 * @fileoverview Oobe signin screen implementation.
7 */ 7 */
8 8
9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() { 9 login.createScreen('GaiaSigninScreen', 'gaia-signin', function() {
10 // Gaia loading time after which error message must be displayed and 10 // Gaia loading time after which error message must be displayed and
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // Ensure that GAIA signin (or loading UI) is actually visible. 267 // Ensure that GAIA signin (or loading UI) is actually visible.
268 window.requestAnimationFrame(function() { 268 window.requestAnimationFrame(function() {
269 chrome.send('loginVisible', ['gaia-loading']); 269 chrome.send('loginVisible', ['gaia-loading']);
270 }); 270 });
271 271
272 // Button header is always visible when sign in is presented. 272 // Button header is always visible when sign in is presented.
273 // Header is hidden once GAIA reports on successful sign in. 273 // Header is hidden once GAIA reports on successful sign in.
274 Oobe.getInstance().headerHidden = false; 274 Oobe.getInstance().headerHidden = false;
275 this.isShown_ = true; 275 this.isShown_ = true;
276 if (this.isWebviewSignin && !this.loading) 276 if (this.isWebviewSignin && !this.loading)
277 this.gaiaAuthHost_.setFocus(); 277 this.gaiaAuthHost_.sendFocusReady();
278 }, 278 },
279 279
280 /** 280 /**
281 * Event handler that is invoked just before the screen is hidden. 281 * Event handler that is invoked just before the screen is hidden.
282 */ 282 */
283 onBeforeHide: function() { 283 onBeforeHide: function() {
284 chrome.send('loginUIStateChanged', ['gaia-signin', false]); 284 chrome.send('loginUIStateChanged', ['gaia-signin', false]);
285 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN; 285 $('login-header-bar').signinUIState = SIGNIN_UI_STATE.HIDDEN;
286 this.isShown_ = false; 286 this.isShown_ = false;
287 }, 287 },
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 } 453 }
454 }, 454 },
455 455
456 /** 456 /**
457 * Invoked when the auth host emits 'ready' event. 457 * Invoked when the auth host emits 'ready' event.
458 * @private 458 * @private
459 */ 459 */
460 onAuthReady_: function() { 460 onAuthReady_: function() {
461 this.loading = false; 461 this.loading = false;
462 if (this.isWebviewSignin && this.isShown_) 462 if (this.isWebviewSignin && this.isShown_)
463 this.gaiaAuthHost_.setFocus(); 463 this.gaiaAuthHost_.sendFocusReady();
464 this.clearLoadingTimer_(); 464 this.clearLoadingTimer_();
465 465
466 // Show deferred error bubble. 466 // Show deferred error bubble.
467 if (this.errorBubble_) { 467 if (this.errorBubble_) {
468 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]); 468 this.showErrorBubble(this.errorBubble_[0], this.errorBubble_[1]);
469 this.errorBubble_ = undefined; 469 this.errorBubble_ = undefined;
470 } 470 }
471 471
472 chrome.send('loginWebuiReady'); 472 chrome.send('loginWebuiReady');
473 chrome.send('loginVisible', ['gaia-signin']); 473 chrome.send('loginVisible', ['gaia-signin']);
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 * For more info see C++ class 'WebUILoginView' which calls this method. 718 * For more info see C++ class 'WebUILoginView' which calls this method.
719 * @param {number} error Error code. 719 * @param {number} error Error code.
720 * @param {string} url The URL that failed to load. 720 * @param {string} url The URL that failed to load.
721 */ 721 */
722 onFrameError: function(error, url) { 722 onFrameError: function(error, url) {
723 this.error_ = error; 723 this.error_ = error;
724 chrome.send('frameLoadingCompleted', [this.error_]); 724 chrome.send('frameLoadingCompleted', [this.error_]);
725 }, 725 },
726 }; 726 };
727 }); 727 });
OLDNEW
« 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