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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 void SetDelegate(SigninScreenHandlerDelegate* delegate); | 176 void SetDelegate(SigninScreenHandlerDelegate* delegate); |
177 | 177 |
178 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); | 178 void SetNativeWindowDelegate(NativeWindowDelegate* native_window_delegate); |
179 | 179 |
180 // NetworkStateInformerDelegate implementation: | 180 // NetworkStateInformerDelegate implementation: |
181 virtual void OnNetworkReady() OVERRIDE; | 181 virtual void OnNetworkReady() OVERRIDE; |
182 | 182 |
183 // NetworkStateInformer::NetworkStateInformerObserver implementation: | 183 // NetworkStateInformer::NetworkStateInformerObserver implementation: |
184 virtual void UpdateState(NetworkStateInformer::State state, | 184 virtual void UpdateState(NetworkStateInformer::State state, |
185 const std::string& service_path, | 185 const std::string& service_path, |
186 ConnectionType connection_type, | 186 const std::string& connection_type, |
187 const std::string& reason) OVERRIDE; | 187 const std::string& reason) OVERRIDE; |
188 | 188 |
189 private: | 189 private: |
190 enum UIState { | 190 enum UIState { |
191 UI_STATE_UNKNOWN = 0, | 191 UI_STATE_UNKNOWN = 0, |
192 UI_STATE_GAIA_SIGNIN, | 192 UI_STATE_GAIA_SIGNIN, |
193 UI_STATE_ACCOUNT_PICKER, | 193 UI_STATE_ACCOUNT_PICKER, |
194 UI_STATE_LOCALLY_MANAGED_USER_CREATION | 194 UI_STATE_LOCALLY_MANAGED_USER_CREATION |
195 }; | 195 }; |
196 | 196 |
197 typedef base::hash_set<std::string> WebUIObservers; | 197 typedef base::hash_set<std::string> WebUIObservers; |
198 | 198 |
199 friend class ReportDnsCacheClearedOnUIThread; | 199 friend class ReportDnsCacheClearedOnUIThread; |
200 friend class LocallyManagedUserCreationScreenHandler; | 200 friend class LocallyManagedUserCreationScreenHandler; |
201 | 201 |
202 // Updates current UI of the signin screen according to |ui_state| | 202 // Updates current UI of the signin screen according to |ui_state| |
203 // argument. Optionally it can pass screen initialization data via | 203 // argument. Optionally it can pass screen initialization data via |
204 // |params| argument. | 204 // |params| argument. |
205 void UpdateUIState(UIState ui_state, DictionaryValue* params); | 205 void UpdateUIState(UIState ui_state, DictionaryValue* params); |
206 | 206 |
207 void UpdateStateInternal(NetworkStateInformer::State state, | 207 void UpdateStateInternal(NetworkStateInformer::State state, |
208 const std::string service_path, | 208 const std::string& service_path, |
209 ConnectionType connection_type, | 209 const std::string& connection_type, |
210 std::string reason, | 210 const std::string& reason, |
211 bool force_update); | 211 bool force_update); |
212 void SetupAndShowOfflineMessage(NetworkStateInformer::State state, | 212 void SetupAndShowOfflineMessage(NetworkStateInformer::State state, |
213 const std::string& service_path, | 213 const std::string& service_path, |
214 ConnectionType connection_type, | 214 const std::string& connection_type, |
215 const std::string& reason, | 215 const std::string& reason, |
216 bool is_proxy_error, | 216 bool is_proxy_error, |
217 bool is_under_captive_portal, | 217 bool is_under_captive_portal, |
218 bool is_gaia_loading_timeout); | 218 bool is_gaia_loading_timeout); |
219 void HideOfflineMessage(NetworkStateInformer::State state, | 219 void HideOfflineMessage(NetworkStateInformer::State state, |
220 const std::string& service_path, | 220 const std::string& service_path, |
221 const std::string& reason, | 221 const std::string& reason, |
222 bool is_gaia_signin, | 222 bool is_gaia_signin, |
223 bool is_gaia_reloaded); | 223 bool is_gaia_reloaded); |
224 void ReloadGaiaScreen(); | 224 void ReloadGaiaScreen(); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 442 |
443 // Testing helper, specifies new value for gaia url. | 443 // Testing helper, specifies new value for gaia url. |
444 std::string gaia_origin_for_test_; | 444 std::string gaia_origin_for_test_; |
445 | 445 |
446 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 446 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
447 }; | 447 }; |
448 | 448 |
449 } // namespace chromeos | 449 } // namespace chromeos |
450 | 450 |
451 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 451 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |