| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_USER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_USER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_USER_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // Initializes the UserController, creating the set of windows/controls. | 66 // Initializes the UserController, creating the set of windows/controls. |
| 67 // |index| is the index of this user, and |total_user_count| the total | 67 // |index| is the index of this user, and |total_user_count| the total |
| 68 // number of users. | 68 // number of users. |
| 69 void Init(int index, int total_user_count, bool need_browse_without_signin); | 69 void Init(int index, int total_user_count, bool need_browse_without_signin); |
| 70 | 70 |
| 71 // Update border window parameters to notify window manager about new numbers. | 71 // Update border window parameters to notify window manager about new numbers. |
| 72 // |index| of this user and |total_user_count| of users. | 72 // |index| of this user and |total_user_count| of users. |
| 73 void UpdateUserCount(int index, int total_user_count); | 73 void UpdateUserCount(int index, int total_user_count); |
| 74 | 74 |
| 75 int user_index() const { return user_index_; } | 75 int user_index() const { return user_index_; } |
| 76 bool is_user_selected() const { return is_user_selected_; } | |
| 77 bool is_new_user() const { return is_new_user_; } | 76 bool is_new_user() const { return is_new_user_; } |
| 78 bool is_guest() const { return is_guest_; } | 77 bool is_guest() const { return is_guest_; } |
| 79 | 78 |
| 80 const UserManager::User& user() const { return user_; } | 79 const UserManager::User& user() const { return user_; } |
| 81 | 80 |
| 82 // Enables or disables tooltip with user's email. | 81 // Enables or disables tooltip with user's email. |
| 83 void EnableNameTooltip(bool enable); | 82 void EnableNameTooltip(bool enable); |
| 84 | 83 |
| 85 // Called when user view is activated (OnUserSelected). | 84 // Called when user view is activated (OnUserSelected). |
| 86 void ClearAndEnableFields(); | 85 void ClearAndEnableFields(); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 delegate_->AddStartUrl(start_url); | 117 delegate_->AddStartUrl(start_url); |
| 119 } | 118 } |
| 120 virtual void ClearErrors(); | 119 virtual void ClearErrors(); |
| 121 virtual void NavigateAway(); | 120 virtual void NavigateAway(); |
| 122 virtual void SetStatusAreaEnabled(bool enable) { | 121 virtual void SetStatusAreaEnabled(bool enable) { |
| 123 delegate_->SetStatusAreaEnabled(enable); | 122 delegate_->SetStatusAreaEnabled(enable); |
| 124 } | 123 } |
| 125 | 124 |
| 126 // UserView::Delegate implementation: | 125 // UserView::Delegate implementation: |
| 127 virtual void OnRemoveUser(); | 126 virtual void OnRemoveUser(); |
| 127 virtual bool IsUserSelected() const { return is_user_selected_; } |
| 128 | 128 |
| 129 // Selects user relative to the current user. | 129 // Selects user relative to the current user. |
| 130 void SelectUserRelative(int shift); | 130 void SelectUserRelative(int shift); |
| 131 | 131 |
| 132 // Padding between the user windows. | 132 // Padding between the user windows. |
| 133 static const int kPadding; | 133 static const int kPadding; |
| 134 | 134 |
| 135 // Max size needed when an entry is not selected. | 135 // Max size needed when an entry is not selected. |
| 136 static const int kUnselectedSize; | 136 static const int kUnselectedSize; |
| 137 static const int kNewUserUnselectedSize; | 137 static const int kNewUserUnselectedSize; |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 NotificationRegistrar registrar_; | 210 NotificationRegistrar registrar_; |
| 211 | 211 |
| 212 ScopedRunnableMethodFactory<UserController> method_factory_; | 212 ScopedRunnableMethodFactory<UserController> method_factory_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(UserController); | 214 DISALLOW_COPY_AND_ASSIGN(UserController); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace chromeos | 217 } // namespace chromeos |
| 218 | 218 |
| 219 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_CONTROLLER_H_ | 219 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_USER_CONTROLLER_H_ |
| OLD | NEW |