OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_SIGNIN_SCREEN_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 void SetDelegate(SigninScreenHandlerDelegate* delegate); | 172 void SetDelegate(SigninScreenHandlerDelegate* delegate); |
173 | 173 |
174 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); | 174 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); |
175 | 175 |
176 // NetworkStateInformerDelegate implementation: | 176 // NetworkStateInformerDelegate implementation: |
177 virtual void OnNetworkReady() OVERRIDE; | 177 virtual void OnNetworkReady() OVERRIDE; |
178 | 178 |
179 // NetworkStateInformer::NetworkStateInformerObserver implementation: | 179 // NetworkStateInformer::NetworkStateInformerObserver implementation: |
180 virtual void UpdateState(NetworkStateInformer::State state, | 180 virtual void UpdateState(NetworkStateInformer::State state, |
181 const std::string& service_path, | 181 const std::string& service_path, |
182 ConnectionType connection_type, | 182 const std::string& connection_type, |
183 const std::string& reason) OVERRIDE; | 183 const std::string& reason) OVERRIDE; |
184 | 184 |
185 private: | 185 private: |
186 enum UIState { | 186 enum UIState { |
187 UI_STATE_UNKNOWN = 0, | 187 UI_STATE_UNKNOWN = 0, |
188 UI_STATE_GAIA_SIGNIN, | 188 UI_STATE_GAIA_SIGNIN, |
189 UI_STATE_ACCOUNT_PICKER, | 189 UI_STATE_ACCOUNT_PICKER, |
190 UI_STATE_LOCALLY_MANAGED_USER_CREATION | 190 UI_STATE_LOCALLY_MANAGED_USER_CREATION |
191 }; | 191 }; |
192 | 192 |
193 typedef base::hash_set<std::string> WebUIObservers; | 193 typedef base::hash_set<std::string> WebUIObservers; |
194 | 194 |
195 friend class ReportDnsCacheClearedOnUIThread; | 195 friend class ReportDnsCacheClearedOnUIThread; |
196 friend class LocallyManagedUserCreationScreenHandler; | 196 friend class LocallyManagedUserCreationScreenHandler; |
197 | 197 |
198 // Updates current UI of the signin screen according to |ui_state| | 198 // Updates current UI of the signin screen according to |ui_state| |
199 // argument. Optionally it can pass screen initialization data via | 199 // argument. Optionally it can pass screen initialization data via |
200 // |params| argument. | 200 // |params| argument. |
201 void UpdateUIState(UIState ui_state, DictionaryValue* params); | 201 void UpdateUIState(UIState ui_state, DictionaryValue* params); |
202 | 202 |
203 void UpdateStateInternal(NetworkStateInformer::State state, | 203 void UpdateStateInternal(NetworkStateInformer::State state, |
204 const std::string service_path, | 204 const std::string& service_path, |
205 ConnectionType connection_type, | 205 const std::string& connection_type, |
206 std::string reason, | 206 const std::string& reason, |
207 bool force_update); | 207 bool force_update); |
208 void SetupAndShowOfflineMessage(NetworkStateInformer::State state, | 208 void SetupAndShowOfflineMessage(NetworkStateInformer::State state, |
209 const std::string& service_path, | 209 const std::string& service_path, |
210 ConnectionType connection_type, | |
211 const std::string& reason, | 210 const std::string& reason, |
212 bool is_proxy_error, | 211 bool is_proxy_error, |
213 bool is_under_captive_portal, | 212 bool is_under_captive_portal, |
214 bool is_gaia_loading_timeout); | 213 bool is_gaia_loading_timeout); |
215 void HideOfflineMessage(NetworkStateInformer::State state, | 214 void HideOfflineMessage(NetworkStateInformer::State state, |
216 const std::string& service_path, | 215 const std::string& service_path, |
217 const std::string& reason, | 216 const std::string& reason, |
218 bool is_gaia_signin, | 217 bool is_gaia_signin, |
219 bool is_gaia_reloaded); | 218 bool is_gaia_reloaded); |
220 void ReloadGaiaScreen(); | 219 void ReloadGaiaScreen(); |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 432 |
434 // Testing helper, specifies new value for gaia url. | 433 // Testing helper, specifies new value for gaia url. |
435 std::string gaia_origin_for_test_; | 434 std::string gaia_origin_for_test_; |
436 | 435 |
437 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 436 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
438 }; | 437 }; |
439 | 438 |
440 } // namespace chromeos | 439 } // namespace chromeos |
441 | 440 |
442 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 441 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |