| 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" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" | 13 #include "chrome/browser/chromeos/login/screens/core_oobe_actor.h" |
| 14 #include "chrome/browser/extensions/signin/scoped_gaia_auth_extension.h" | 14 #include "chrome/browser/extensions/signin/scoped_gaia_auth_extension.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 16 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 16 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 17 | 18 |
| 18 namespace policy { | 19 namespace policy { |
| 19 class ConsumerManagementService; | 20 class ConsumerManagementService; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace chromeos { | 23 namespace chromeos { |
| 23 | 24 |
| 24 class SigninScreenHandler; | 25 class SigninScreenHandler; |
| 26 class SigninScreenHandlerDelegate; |
| 25 | 27 |
| 26 // A class that's used to specify the way how Gaia should be loaded. | 28 // A class that's used to specify the way how Gaia should be loaded. |
| 27 struct GaiaContext { | 29 struct GaiaContext { |
| 28 GaiaContext(); | 30 GaiaContext(); |
| 29 | 31 |
| 30 // Forces Gaia to reload. | 32 // Forces Gaia to reload. |
| 31 bool force_reload; | 33 bool force_reload; |
| 32 | 34 |
| 33 // Whether local verison of Gaia is used. | 35 // Whether local verison of Gaia is used. |
| 34 bool is_local; | 36 bool is_local; |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 180 |
| 179 // Tells webui to load authentication extension. |force| is used to force the | 181 // Tells webui to load authentication extension. |force| is used to force the |
| 180 // extension reloading, if it has already been loaded. |silent_load| is true | 182 // extension reloading, if it has already been loaded. |silent_load| is true |
| 181 // for cases when extension should be loaded in the background and it | 183 // for cases when extension should be loaded in the background and it |
| 182 // shouldn't grab the focus. |offline| is true when offline version of the | 184 // shouldn't grab the focus. |offline| is true when offline version of the |
| 183 // extension should be used. | 185 // extension should be used. |
| 184 void LoadAuthExtension(bool force, bool silent_load, bool offline); | 186 void LoadAuthExtension(bool force, bool silent_load, bool offline); |
| 185 | 187 |
| 186 // TODO (ygorshenin@): GaiaScreenHandler should implement | 188 // TODO (ygorshenin@): GaiaScreenHandler should implement |
| 187 // NetworkStateInformer::Observer. | 189 // NetworkStateInformer::Observer. |
| 188 void UpdateState(ErrorScreenActor::ErrorReason reason); | 190 void UpdateState(NetworkError::ErrorReason reason); |
| 189 | 191 |
| 190 // TODO (ygorshenin@): remove this dependency. | 192 // TODO (ygorshenin@): remove this dependency. |
| 191 void SetSigninScreenHandler(SigninScreenHandler* handler); | 193 void SetSigninScreenHandler(SigninScreenHandler* handler); |
| 192 | 194 |
| 193 SigninScreenHandlerDelegate* Delegate(); | 195 SigninScreenHandlerDelegate* Delegate(); |
| 194 | 196 |
| 195 // Current state of Gaia frame. | 197 // Current state of Gaia frame. |
| 196 FrameState frame_state_; | 198 FrameState frame_state_; |
| 197 | 199 |
| 198 // Latest Gaia frame error. | 200 // Latest Gaia frame error. |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; | 261 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; |
| 260 | 262 |
| 261 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; | 263 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; |
| 262 | 264 |
| 263 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); | 265 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); |
| 264 }; | 266 }; |
| 265 | 267 |
| 266 } // namespace chromeos | 268 } // namespace chromeos |
| 267 | 269 |
| 268 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 270 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
| OLD | NEW |