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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 FrameState frame_state() const { return frame_state_; } | 92 FrameState frame_state() const { return frame_state_; } |
93 net::Error frame_error() const { return frame_error_; } | 93 net::Error frame_error() const { return frame_error_; } |
94 | 94 |
95 private: | 95 private: |
96 // TODO (ygorshenin@): remove this dependency. | 96 // TODO (ygorshenin@): remove this dependency. |
97 friend class SigninScreenHandler; | 97 friend class SigninScreenHandler; |
98 | 98 |
99 // BaseScreenHandler implementation: | 99 // BaseScreenHandler implementation: |
100 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) override; | 100 virtual void DeclareLocalizedValues(LocalizedValuesBuilder* builder) override; |
| 101 virtual void GetAdditionalParameters(base::DictionaryValue* dict) override; |
101 virtual void Initialize() override; | 102 virtual void Initialize() override; |
102 | 103 |
103 // WebUIMessageHandler implementation: | 104 // WebUIMessageHandler implementation: |
104 virtual void RegisterMessages() override; | 105 virtual void RegisterMessages() override; |
105 | 106 |
106 // WebUI message handlers. | 107 // WebUI message handlers. |
107 void HandleFrameLoadingCompleted(int status); | 108 void HandleFrameLoadingCompleted(int status); |
108 void HandleCompleteAuthentication(const std::string& gaia_id, | 109 void HandleCompleteAuthentication(const std::string& gaia_id, |
109 const std::string& email, | 110 const std::string& email, |
110 const std::string& password, | 111 const std::string& password, |
111 const std::string& auth_code); | 112 const std::string& auth_code); |
112 void HandleCompleteLogin(const std::string& gaia_id, | 113 void HandleCompleteLogin(const std::string& gaia_id, |
113 const std::string& typed_email, | 114 const std::string& typed_email, |
114 const std::string& password, | 115 const std::string& password, |
115 bool using_saml); | 116 bool using_saml); |
116 | 117 |
117 void HandleUsingSAMLAPI(); | 118 void HandleUsingSAMLAPI(); |
118 void HandleScrapedPasswordCount(int password_count); | 119 void HandleScrapedPasswordCount(int password_count); |
119 void HandleScrapedPasswordVerificationFailed(); | 120 void HandleScrapedPasswordVerificationFailed(); |
120 | 121 |
121 void HandleGaiaUIReady(); | 122 void HandleGaiaUIReady(); |
122 | 123 |
123 void HandleSwitchToFullTab(); | 124 void HandleSwitchToFullTab(); |
124 | 125 |
| 126 void HandleToggleWebviewSignin(); |
| 127 |
125 // This is called when ConsumerManagementService::SetOwner() returns. | 128 // This is called when ConsumerManagementService::SetOwner() returns. |
126 void OnSetOwnerDone(const std::string& gaia_id, | 129 void OnSetOwnerDone(const std::string& gaia_id, |
127 const std::string& typed_email, | 130 const std::string& typed_email, |
128 const std::string& password, | 131 const std::string& password, |
129 bool using_saml, | 132 bool using_saml, |
130 bool success); | 133 bool success); |
131 | 134 |
132 // Really handles the complete login message. | 135 // Really handles the complete login message. |
133 void DoCompleteLogin(const std::string& gaia_id, | 136 void DoCompleteLogin(const std::string& gaia_id, |
134 const std::string& typed_email, | 137 const std::string& typed_email, |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; | 259 scoped_ptr<ScopedGaiaAuthExtension> auth_extension_; |
257 | 260 |
258 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; | 261 base::WeakPtrFactory<GaiaScreenHandler> weak_factory_; |
259 | 262 |
260 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); | 263 DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler); |
261 }; | 264 }; |
262 | 265 |
263 } // namespace chromeos | 266 } // namespace chromeos |
264 | 267 |
265 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ | 268 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_GAIA_SCREEN_HANDLER_H_ |
OLD | NEW |