| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void CancelEmbeddedSignin(); | 88 void CancelEmbeddedSignin(); |
| 89 | 89 |
| 90 // Decides whether an auth extension should be pre-loaded. If it should, | 90 // Decides whether an auth extension should be pre-loaded. If it should, |
| 91 // pre-loads it. | 91 // pre-loads it. |
| 92 void MaybePreloadAuthExtension(); | 92 void MaybePreloadAuthExtension(); |
| 93 | 93 |
| 94 FrameState frame_state() const { return frame_state_; } | 94 FrameState frame_state() const { return frame_state_; } |
| 95 net::Error frame_error() const { return frame_error_; } | 95 net::Error frame_error() const { return frame_error_; } |
| 96 | 96 |
| 97 private: | 97 private: |
| 98 // TODO (ygorshenin@): remove this dependency. | 98 // TODO (antrim@): remove this dependency. |
| 99 friend class SigninScreenHandler; | 99 friend class SigninScreenHandler; |
| 100 | 100 |
| 101 // BaseScreenHandler implementation: | 101 // BaseScreenHandler implementation: |
| 102 void DeclareLocalizedValues( | 102 void DeclareLocalizedValues( |
| 103 ::login::LocalizedValuesBuilder* builder) override; | 103 ::login::LocalizedValuesBuilder* builder) override; |
| 104 void GetAdditionalParameters(base::DictionaryValue* dict) override; | 104 void GetAdditionalParameters(base::DictionaryValue* dict) override; |
| 105 void Initialize() override; | 105 void Initialize() override; |
| 106 | 106 |
| 107 // WebUIMessageHandler implementation: | 107 // WebUIMessageHandler implementation: |
| 108 void RegisterMessages() override; | 108 void RegisterMessages() override; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 // Shows signin screen after dns cache and cookie cleanup operations finish. | 179 // Shows signin screen after dns cache and cookie cleanup operations finish. |
| 180 void ShowGaiaScreenIfReady(); | 180 void ShowGaiaScreenIfReady(); |
| 181 | 181 |
| 182 // Tells webui to load authentication extension. |force| is used to force the | 182 // Tells webui to load authentication extension. |force| is used to force the |
| 183 // extension reloading, if it has already been loaded. |silent_load| is true | 183 // extension reloading, if it has already been loaded. |silent_load| is true |
| 184 // for cases when extension should be loaded in the background and it | 184 // for cases when extension should be loaded in the background and it |
| 185 // shouldn't grab the focus. |offline| is true when offline version of the | 185 // shouldn't grab the focus. |offline| is true when offline version of the |
| 186 // extension should be used. | 186 // extension should be used. |
| 187 void LoadAuthExtension(bool force, bool silent_load, bool offline); | 187 void LoadAuthExtension(bool force, bool silent_load, bool offline); |
| 188 | 188 |
| 189 // TODO (ygorshenin@): GaiaScreenHandler should implement | 189 // TODO (antrim@): GaiaScreenHandler should implement |
| 190 // NetworkStateInformer::Observer. | 190 // NetworkStateInformer::Observer. |
| 191 void UpdateState(NetworkError::ErrorReason reason); | 191 void UpdateState(NetworkError::ErrorReason reason); |
| 192 | 192 |
| 193 // TODO (ygorshenin@): remove this dependency. | 193 // TODO (antrim@): remove this dependency. |
| 194 void SetSigninScreenHandler(SigninScreenHandler* handler); | 194 void SetSigninScreenHandler(SigninScreenHandler* handler); |
| 195 | 195 |
| 196 SigninScreenHandlerDelegate* Delegate(); | 196 SigninScreenHandlerDelegate* Delegate(); |
| 197 | 197 |
| 198 // Current state of Gaia frame. | 198 // Current state of Gaia frame. |
| 199 FrameState frame_state_; | 199 FrameState frame_state_; |
| 200 | 200 |
| 201 // Latest Gaia frame error. | 201 // Latest Gaia frame error. |
| 202 net::Error frame_error_; | 202 net::Error frame_error_; |
| 203 | 203 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 // Test credentials. | 247 // Test credentials. |
| 248 std::string test_user_; | 248 std::string test_user_; |
| 249 std::string test_pass_; | 249 std::string test_pass_; |
| 250 bool test_expects_complete_login_; | 250 bool test_expects_complete_login_; |
| 251 | 251 |
| 252 // True if user pressed shortcut to enable embedded signin. | 252 // True if user pressed shortcut to enable embedded signin. |
| 253 bool embedded_signin_enabled_by_shortcut_; | 253 bool embedded_signin_enabled_by_shortcut_; |
| 254 | 254 |
| 255 // Non-owning ptr to SigninScreenHandler instance. Should not be used | 255 // Non-owning ptr to SigninScreenHandler instance. Should not be used |
| 256 // in dtor. | 256 // in dtor. |
| 257 // TODO (ygorshenin@): GaiaScreenHandler shouldn't communicate with | 257 // TODO (antrim@): GaiaScreenHandler shouldn't communicate with |
| 258 // signin_screen_handler directly. | 258 // signin_screen_handler directly. |
| 259 SigninScreenHandler* signin_screen_handler_; | 259 SigninScreenHandler* signin_screen_handler_; |
| 260 | 260 |
| 261 // GAIA extension loader. | 261 // GAIA extension loader. |
| 262 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; | 262 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; |
| 263 | 263 |
| 264 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; | 264 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; |
| 265 | 265 |
| 266 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); | 266 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); |
| 267 }; | 267 }; |
| 268 | 268 |
| 269 } // namespace chromeos | 269 } // namespace chromeos |
| 270 | 270 |
| 271 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 271 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
| OLD | NEW |