OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
| 10 #include <vector> |
10 | 11 |
11 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
12 #include "base/timer/timer.h" | 13 #include "base/timer/timer.h" |
13 #include "base/values.h" | 14 #include "base/values.h" |
14 #include "chrome/browser/signin/screenlock_bridge.h" | 15 #include "chrome/browser/signin/screenlock_bridge.h" |
15 #include "components/user_manager/user.h" | 16 #include "components/user_manager/user.h" |
16 #include "ui/wm/core/user_activity_observer.h" | 17 #include "ui/wm/core/user_activity_observer.h" |
17 | 18 |
18 namespace chromeos { | 19 namespace chromeos { |
19 | 20 |
(...skipping 28 matching lines...) Expand all Loading... |
48 | 49 |
49 // wm::UserActivityDetector implementation: | 50 // wm::UserActivityDetector implementation: |
50 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; | 51 virtual void OnUserActivity(const ui::Event* event) OVERRIDE; |
51 | 52 |
52 // Fills |user_dict| with information about |user|. | 53 // Fills |user_dict| with information about |user|. |
53 static void FillUserDictionary( | 54 static void FillUserDictionary( |
54 user_manager::User* user, | 55 user_manager::User* user, |
55 bool is_owner, | 56 bool is_owner, |
56 bool is_signin_to_add, | 57 bool is_signin_to_add, |
57 ScreenlockBridge::LockHandler::AuthType auth_type, | 58 ScreenlockBridge::LockHandler::AuthType auth_type, |
| 59 const std::vector<std::string>* public_session_recommended_locales, |
58 base::DictionaryValue* user_dict); | 60 base::DictionaryValue* user_dict); |
59 | 61 |
60 // Determines if user auth status requires online sign in. | 62 // Determines if user auth status requires online sign in. |
61 static bool ShouldForceOnlineSignIn(const user_manager::User* user); | 63 static bool ShouldForceOnlineSignIn(const user_manager::User* user); |
62 | 64 |
63 protected: | 65 protected: |
64 LoginDisplayWebUIHandler* handler_; | 66 LoginDisplayWebUIHandler* handler_; |
65 | 67 |
66 // Set of Users that are visible. | 68 // Set of Users that are visible. |
67 user_manager::UserList users_; | 69 user_manager::UserList users_; |
68 | 70 |
| 71 // Map from public session user IDs to recommended locales set by policy. |
| 72 typedef std::map<std::string, std::vector<std::string> > |
| 73 PublicSessionRecommendedLocaleMap; |
| 74 PublicSessionRecommendedLocaleMap public_session_recommended_locales_; |
| 75 |
69 private: | 76 private: |
70 // Whether to show guest login. | 77 // Whether to show guest login. |
71 bool show_guest_; | 78 bool show_guest_; |
72 | 79 |
73 // Map of usernames to their current authentication type. If a user is not | 80 // Map of usernames to their current authentication type. If a user is not |
74 // contained in the map, it is using the default authentication type. | 81 // contained in the map, it is using the default authentication type. |
75 std::map<std::string, ScreenlockBridge::LockHandler::AuthType> | 82 std::map<std::string, ScreenlockBridge::LockHandler::AuthType> |
76 user_auth_type_map_; | 83 user_auth_type_map_; |
77 | 84 |
78 // Timer for measuring idle state duration before password clear. | 85 // Timer for measuring idle state duration before password clear. |
79 base::OneShotTimer<UserSelectionScreen> password_clear_timer_; | 86 base::OneShotTimer<UserSelectionScreen> password_clear_timer_; |
80 | 87 |
81 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen); | 88 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen); |
82 }; | 89 }; |
83 | 90 |
84 } // namespace chromeos | 91 } // namespace chromeos |
85 | 92 |
86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ | 93 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ |
OLD | NEW |