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 |
| 11 #include "base/basictypes.h" |
11 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/compiler_specific.h" |
12 #include "base/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
13 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
16 #include "chrome/browser/chromeos/login/help_app_launcher.h" | 18 #include "chrome/browser/chromeos/login/help_app_launcher.h" |
17 #include "chrome/browser/chromeos/login/login_display.h" | 19 #include "chrome/browser/chromeos/login/login_display.h" |
18 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" | 20 #include "chrome/browser/chromeos/login/screens/error_screen_actor.h" |
19 #include "chrome/browser/chromeos/login/user_manager.h" | 21 #include "chrome/browser/chromeos/login/user_manager.h" |
20 #include "chrome/browser/chromeos/login/wallpaper_manager.h" | 22 #include "chrome/browser/chromeos/login/wallpaper_manager.h" |
21 #include "chrome/browser/chromeos/net/network_portal_detector.h" | 23 #include "chrome/browser/chromeos/net/network_portal_detector.h" |
22 #include "chrome/browser/chromeos/settings/cros_settings.h" | 24 #include "chrome/browser/chromeos/settings/cros_settings.h" |
23 #include "chrome/browser/chromeos/system_key_event_listener.h" | 25 #include "chrome/browser/chromeos/system_key_event_listener.h" |
24 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
25 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" | 27 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
26 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 28 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
27 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 29 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
28 #include "content/public/browser/notification_observer.h" | 30 #include "content/public/browser/notification_observer.h" |
29 #include "content/public/browser/notification_registrar.h" | 31 #include "content/public/browser/notification_registrar.h" |
30 #include "content/public/browser/web_ui.h" | 32 #include "content/public/browser/web_ui.h" |
31 #include "net/base/net_errors.h" | 33 #include "net/base/net_errors.h" |
32 | 34 |
33 namespace base { | 35 namespace base { |
34 class DictionaryValue; | 36 class DictionaryValue; |
35 class ListValue; | 37 class ListValue; |
36 } | 38 } |
37 | 39 |
38 namespace chromeos { | 40 namespace chromeos { |
39 | 41 |
| 42 class AuthenticatedUserEmailRetriever; |
40 class CaptivePortalWindowProxy; | 43 class CaptivePortalWindowProxy; |
41 class CoreOobeActor; | 44 class CoreOobeActor; |
42 class LocallyManagedUserCreationScreenHandler; | 45 class LocallyManagedUserCreationScreenHandler; |
43 class NativeWindowDelegate; | 46 class NativeWindowDelegate; |
44 class User; | 47 class User; |
45 struct UserContext; | 48 struct UserContext; |
46 | 49 |
47 // Helper class to pass initial parameters to the login screen. | 50 // Helper class to pass initial parameters to the login screen. |
48 class LoginScreenContext { | 51 class LoginScreenContext { |
49 public: | 52 public: |
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 void HandleResyncUserData(); | 359 void HandleResyncUserData(); |
357 void HandleLoginUIStateChanged(const std::string& source, bool new_value); | 360 void HandleLoginUIStateChanged(const std::string& source, bool new_value); |
358 void HandleUnlockOnLoginSuccess(); | 361 void HandleUnlockOnLoginSuccess(); |
359 void HandleLoginScreenUpdate(); | 362 void HandleLoginScreenUpdate(); |
360 void HandleShowLoadingTimeoutError(); | 363 void HandleShowLoadingTimeoutError(); |
361 void HandleUpdateOfflineLogin(bool offline_login_active); | 364 void HandleUpdateOfflineLogin(bool offline_login_active); |
362 void HandleShowLocallyManagedUserCreationScreen(); | 365 void HandleShowLocallyManagedUserCreationScreen(); |
363 void HandleFocusPod(const std::string& user_id); | 366 void HandleFocusPod(const std::string& user_id); |
364 void HandleLaunchKioskApp(const std::string& app_id); | 367 void HandleLaunchKioskApp(const std::string& app_id); |
365 void HandleCustomButtonClicked(const std::string& username); | 368 void HandleCustomButtonClicked(const std::string& username); |
| 369 void HandleRetrieveAuthenticatedUserEmail(double attempt_token); |
366 | 370 |
367 // Fills |user_dict| with information about |user|. | 371 // Fills |user_dict| with information about |user|. |
368 static void FillUserDictionary(User* user, | 372 static void FillUserDictionary(User* user, |
369 bool is_owner, | 373 bool is_owner, |
370 base::DictionaryValue* user_dict); | 374 base::DictionaryValue* user_dict); |
371 | 375 |
372 // Sends user list to account picker. | 376 // Sends user list to account picker. |
373 void SendUserList(bool animated); | 377 void SendUserList(bool animated); |
374 | 378 |
375 // Kick off cookie / local storage cleanup. | 379 // Kick off cookie / local storage cleanup. |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
512 | 516 |
513 base::Closure kiosk_enable_flow_aborted_callback_for_test_; | 517 base::Closure kiosk_enable_flow_aborted_callback_for_test_; |
514 | 518 |
515 // Map of callbacks run when the custom button on a user pod is clicked. | 519 // Map of callbacks run when the custom button on a user pod is clicked. |
516 std::map<std::string, base::Closure> user_pod_button_callback_map_; | 520 std::map<std::string, base::Closure> user_pod_button_callback_map_; |
517 | 521 |
518 // Non-owning ptr. | 522 // Non-owning ptr. |
519 // TODO (ygorshenin@): remove this dependency. | 523 // TODO (ygorshenin@): remove this dependency. |
520 GaiaScreenHandler* gaia_screen_handler_; | 524 GaiaScreenHandler* gaia_screen_handler_; |
521 | 525 |
| 526 // Helper that retrieves the authenticated user's e-mail address. |
| 527 scoped_ptr<AuthenticatedUserEmailRetriever> email_retriever_; |
| 528 |
522 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); | 529 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); |
523 }; | 530 }; |
524 | 531 |
525 } // namespace chromeos | 532 } // namespace chromeos |
526 | 533 |
527 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ | 534 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ |
OLD | NEW |