| 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 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1034 }, | 1034 }, |
| 1035 | 1035 |
| 1036 /** | 1036 /** |
| 1037 * Called when user canceled signin. | 1037 * Called when user canceled signin. |
| 1038 */ | 1038 */ |
| 1039 cancel: function() { | 1039 cancel: function() { |
| 1040 this.clearVideoTimer_(); | 1040 this.clearVideoTimer_(); |
| 1041 if (!this.navigation_.refreshVisible && !this.navigation_.closeVisible) | 1041 if (!this.navigation_.refreshVisible && !this.navigation_.closeVisible) |
| 1042 return; | 1042 return; |
| 1043 | 1043 |
| 1044 if (this.screenMode_ == ScreenMode.AD_AUTH) |
| 1045 chrome.send('cancelAdAuthentication'); |
| 1046 |
| 1044 if (this.closable) | 1047 if (this.closable) |
| 1045 Oobe.showUserPods(); | 1048 Oobe.showUserPods(); |
| 1046 else | 1049 else |
| 1047 Oobe.resetSigninUI(true); | 1050 Oobe.resetSigninUI(true); |
| 1048 }, | 1051 }, |
| 1049 | 1052 |
| 1050 /** | 1053 /** |
| 1051 * Handler for webview error handling. | 1054 * Handler for webview error handling. |
| 1052 * @param {!Object} data Additional information about error event like: | 1055 * @param {!Object} data Additional information about error event like: |
| 1053 * {string} error Error code such as "ERR_INTERNET_DISCONNECTED". | 1056 * {string} error Error code such as "ERR_INTERNET_DISCONNECTED". |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1124 if (this.screenMode_ != ScreenMode.AD_AUTH) | 1127 if (this.screenMode_ != ScreenMode.AD_AUTH) |
| 1125 return; | 1128 return; |
| 1126 var adAuthUI = this.getSigninFrame_(); | 1129 var adAuthUI = this.getSigninFrame_(); |
| 1127 adAuthUI.setUser(username); | 1130 adAuthUI.setUser(username); |
| 1128 adAuthUI.setInvalid(errorState); | 1131 adAuthUI.setInvalid(errorState); |
| 1129 this.loading = false; | 1132 this.loading = false; |
| 1130 Oobe.getInstance().headerHidden = false; | 1133 Oobe.getInstance().headerHidden = false; |
| 1131 } | 1134 } |
| 1132 }; | 1135 }; |
| 1133 }); | 1136 }); |
| OLD | NEW |