| OLD | NEW |
| 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 animation guard timer. Started when GAIA page is loaded | 10 // GAIA animation guard timer. Started when GAIA page is loaded |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 } | 326 } |
| 327 }, | 327 }, |
| 328 | 328 |
| 329 /** | 329 /** |
| 330 * Shows/hides loading UI. | 330 * Shows/hides loading UI. |
| 331 * @param {boolean} show True to show loading UI. | 331 * @param {boolean} show True to show loading UI. |
| 332 * @private | 332 * @private |
| 333 */ | 333 */ |
| 334 showLoadingUI_: function(show) { | 334 showLoadingUI_: function(show) { |
| 335 $('gaia-loading').hidden = !show; | 335 $('gaia-loading').hidden = !show; |
| 336 this.getSigninFrame_().hidden = show; | |
| 337 this.classList.toggle('loading', show); | 336 this.classList.toggle('loading', show); |
| 337 // Only set hidden for offline-gaia and not set it on the 'sign-frame' |
| 338 // webview element. Setting it on webview not only hides but also affects |
| 339 // its loading events. |
| 340 if (this.isOffline) |
| 341 this.getSigninFrame_().hidden = show; |
| 338 $('signin-frame').classList.remove('show'); | 342 $('signin-frame').classList.remove('show'); |
| 339 this.updateControlsState(); | 343 this.updateControlsState(); |
| 340 }, | 344 }, |
| 341 | 345 |
| 342 /** | 346 /** |
| 343 * Handler for Gaia loading timeout. | 347 * Handler for Gaia loading timeout. |
| 344 * @private | 348 * @private |
| 345 */ | 349 */ |
| 346 onLoadingTimeOut_: function() { | 350 onLoadingTimeOut_: function() { |
| 347 if (this != Oobe.getInstance().currentScreen) | 351 if (this != Oobe.getInstance().currentScreen) |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 this.classList.toggle('whitelist-error', show); | 920 this.classList.toggle('whitelist-error', show); |
| 917 this.loading = !show; | 921 this.loading = !show; |
| 918 | 922 |
| 919 if (!show) | 923 if (!show) |
| 920 Oobe.showSigninUI(); | 924 Oobe.showSigninUI(); |
| 921 | 925 |
| 922 this.updateControlsState(); | 926 this.updateControlsState(); |
| 923 } | 927 } |
| 924 }; | 928 }; |
| 925 }); | 929 }); |
| OLD | NEW |