| 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/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.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/ui/webui/chromeos/login/base_screen_handler.h" | 14 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 16 #include "chromeos/network/portal_detector/network_portal_detector.h" | 16 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 17 #include "net/base/net_errors.h" | 17 #include "net/base/net_errors.h" |
| 18 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 18 | 19 |
| 19 class AccountId; | 20 class AccountId; |
| 20 | 21 |
| 21 namespace chromeos { | 22 namespace chromeos { |
| 22 | 23 |
| 24 class Key; |
| 23 class SigninScreenHandler; | 25 class SigninScreenHandler; |
| 24 class SigninScreenHandlerDelegate; | 26 class SigninScreenHandlerDelegate; |
| 25 | 27 |
| 26 // A class that handles WebUI hooks in Gaia screen. | 28 // A class that handles WebUI hooks in Gaia screen. |
| 27 class GaiaScreenHandler : public BaseScreenHandler, | 29 class GaiaScreenHandler : public BaseScreenHandler, |
| 28 public NetworkPortalDetector::Observer { | 30 public NetworkPortalDetector::Observer { |
| 29 public: | 31 public: |
| 30 enum FrameState { | 32 enum FrameState { |
| 31 FRAME_STATE_UNKNOWN = 0, | 33 FRAME_STATE_UNKNOWN = 0, |
| 32 FRAME_STATE_LOADING, | 34 FRAME_STATE_LOADING, |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 const std::string& password, | 91 const std::string& password, |
| 90 const std::string& auth_code, | 92 const std::string& auth_code, |
| 91 bool using_saml, | 93 bool using_saml, |
| 92 const std::string& gaps_cookie); | 94 const std::string& gaps_cookie); |
| 93 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code); | 95 void HandleCompleteAuthenticationAuthCodeOnly(const std::string& auth_code); |
| 94 void HandleCompleteLogin(const std::string& gaia_id, | 96 void HandleCompleteLogin(const std::string& gaia_id, |
| 95 const std::string& typed_email, | 97 const std::string& typed_email, |
| 96 const std::string& password, | 98 const std::string& password, |
| 97 bool using_saml); | 99 bool using_saml); |
| 98 | 100 |
| 101 void HandleCompleteAdAuthentication(const std::string& user_name, |
| 102 const std::string& password); |
| 103 |
| 99 void HandleUsingSAMLAPI(); | 104 void HandleUsingSAMLAPI(); |
| 100 void HandleScrapedPasswordCount(int password_count); | 105 void HandleScrapedPasswordCount(int password_count); |
| 101 void HandleScrapedPasswordVerificationFailed(); | 106 void HandleScrapedPasswordVerificationFailed(); |
| 102 | 107 |
| 103 void HandleGaiaUIReady(); | 108 void HandleGaiaUIReady(); |
| 104 | 109 |
| 105 void HandleToggleEasyBootstrap(); | 110 void HandleToggleEasyBootstrap(); |
| 106 | 111 |
| 107 void HandleIdentifierEntered(const std::string& account_identifier); | 112 void HandleIdentifierEntered(const std::string& account_identifier); |
| 108 | 113 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 120 } | 125 } |
| 121 | 126 |
| 122 // Kick off cookie / local storage cleanup. | 127 // Kick off cookie / local storage cleanup. |
| 123 void StartClearingCookies(const base::Closure& on_clear_callback); | 128 void StartClearingCookies(const base::Closure& on_clear_callback); |
| 124 void OnCookiesCleared(const base::Closure& on_clear_callback); | 129 void OnCookiesCleared(const base::Closure& on_clear_callback); |
| 125 | 130 |
| 126 // Kick off DNS cache flushing. | 131 // Kick off DNS cache flushing. |
| 127 void StartClearingDnsCache(); | 132 void StartClearingDnsCache(); |
| 128 void OnDnsCleared(); | 133 void OnDnsCleared(); |
| 129 | 134 |
| 135 // Callback for AuthPolicyClient. |
| 136 void DoAdAuth(const std::string& username, |
| 137 const Key& key, |
| 138 authpolicy::AuthUserErrorType error, |
| 139 const std::string& uid); |
| 140 |
| 141 // Callback for writing password into pipe. |
| 142 void OnPasswordPipeReady(const std::string& user_name, |
| 143 const Key& key, |
| 144 base::ScopedFD password_fd); |
| 145 |
| 130 // Show sign-in screen for the given credentials. | 146 // Show sign-in screen for the given credentials. |
| 131 void ShowSigninScreenForTest(const std::string& username, | 147 void ShowSigninScreenForTest(const std::string& username, |
| 132 const std::string& password); | 148 const std::string& password); |
| 133 // Attempts login for test. | 149 // Attempts login for test. |
| 134 void SubmitLoginFormForTest(); | 150 void SubmitLoginFormForTest(); |
| 135 | 151 |
| 136 // Updates the member variable and UMA histogram indicating whether the | 152 // Updates the member variable and UMA histogram indicating whether the |
| 137 // principals API was used during SAML login. | 153 // principals API was used during SAML login. |
| 138 void SetSAMLPrincipalsAPIUsed(bool api_used); | 154 void SetSAMLPrincipalsAPIUsed(bool api_used); |
| 139 | 155 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 bool auth_extension_being_loaded_ = false; | 268 bool auth_extension_being_loaded_ = false; |
| 253 | 269 |
| 254 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; | 270 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; |
| 255 | 271 |
| 256 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); | 272 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); |
| 257 }; | 273 }; |
| 258 | 274 |
| 259 } // namespace chromeos | 275 } // namespace chromeos |
| 260 | 276 |
| 261 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 277 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
| OLD | NEW |