Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: chrome/browser/chromeos/login/ui/login_display.h

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_UI_LOGIN_DISPLAY_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/strings/string16.h" 12 #include "base/strings/string16.h"
13 #include "chrome/browser/chromeos/login/help_app_launcher.h" 13 #include "chrome/browser/chromeos/login/help_app_launcher.h"
14 #include "chrome/browser/chromeos/login/signin_specifics.h" 14 #include "chrome/browser/chromeos/login/signin_specifics.h"
15 #include "chrome/browser/chromeos/login/users/remove_user_delegate.h" 15 #include "chrome/browser/chromeos/login/users/remove_user_delegate.h"
16 #include "chrome/browser/chromeos/login/users/user.h"
17 #include "chrome/browser/chromeos/login/users/user_manager.h" 16 #include "chrome/browser/chromeos/login/users/user_manager.h"
17 #include "components/user_manager/user.h"
18 #include "ui/gfx/image/image.h" 18 #include "ui/gfx/image/image.h"
19 #include "ui/gfx/native_widget_types.h" 19 #include "ui/gfx/native_widget_types.h"
20 #include "ui/gfx/rect.h" 20 #include "ui/gfx/rect.h"
21 21
22 namespace chromeos { 22 namespace chromeos {
23 23
24 class UserContext; 24 class UserContext;
25 25
26 // TODO(nkostylev): Extract interface, create a BaseLoginDisplay class. 26 // TODO(nkostylev): Extract interface, create a BaseLoginDisplay class.
27 // An abstract class that defines login UI implementation. 27 // An abstract class that defines login UI implementation.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 // |background_bounds| determines the bounds of login UI background. 98 // |background_bounds| determines the bounds of login UI background.
99 LoginDisplay(Delegate* delegate, const gfx::Rect& background_bounds); 99 LoginDisplay(Delegate* delegate, const gfx::Rect& background_bounds);
100 virtual ~LoginDisplay(); 100 virtual ~LoginDisplay();
101 101
102 // Clears and enables fields on user pod or GAIA frame. 102 // Clears and enables fields on user pod or GAIA frame.
103 virtual void ClearAndEnablePassword() = 0; 103 virtual void ClearAndEnablePassword() = 0;
104 104
105 // Initializes login UI with the user pods based on list of known users and 105 // Initializes login UI with the user pods based on list of known users and
106 // guest, new user pods if those are enabled. 106 // guest, new user pods if those are enabled.
107 virtual void Init(const UserList& users, 107 virtual void Init(const user_manager::UserList& users,
108 bool show_guest, 108 bool show_guest,
109 bool show_users, 109 bool show_users,
110 bool show_new_user) = 0; 110 bool show_new_user) = 0;
111 111
112 // Notifies the login UI that the preferences defining how to visualize it to 112 // Notifies the login UI that the preferences defining how to visualize it to
113 // the user have changed and it needs to refresh. 113 // the user have changed and it needs to refresh.
114 virtual void OnPreferencesChanged() = 0; 114 virtual void OnPreferencesChanged() = 0;
115 115
116 // Called when user image has been changed. 116 // Called when user image has been changed.
117 // |user| contains updated user. 117 // |user| contains updated user.
118 virtual void OnUserImageChanged(const User& user) = 0; 118 virtual void OnUserImageChanged(const user_manager::User& user) = 0;
119 119
120 // Changes enabled state of the UI. 120 // Changes enabled state of the UI.
121 virtual void SetUIEnabled(bool is_enabled) = 0; 121 virtual void SetUIEnabled(bool is_enabled) = 0;
122 122
123 // Displays simple error bubble with |error_msg_id| specified. 123 // Displays simple error bubble with |error_msg_id| specified.
124 // |login_attempts| shows number of login attempts made by current user. 124 // |login_attempts| shows number of login attempts made by current user.
125 // |help_topic_id| is additional help topic that is presented as link. 125 // |help_topic_id| is additional help topic that is presented as link.
126 virtual void ShowError(int error_msg_id, 126 virtual void ShowError(int error_msg_id,
127 int login_attempts, 127 int login_attempts,
128 HelpAppLauncher::HelpTopic help_topic_id) = 0; 128 HelpAppLauncher::HelpTopic help_topic_id) = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // in redesigned login stack. 171 // in redesigned login stack.
172 // Login stack (and this object) will be recreated for next user sign in. 172 // Login stack (and this object) will be recreated for next user sign in.
173 bool is_signin_completed_; 173 bool is_signin_completed_;
174 174
175 DISALLOW_COPY_AND_ASSIGN(LoginDisplay); 175 DISALLOW_COPY_AND_ASSIGN(LoginDisplay);
176 }; 176 };
177 177
178 } // namespace chromeos 178 } // namespace chromeos
179 179
180 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_H_ 180 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_UI_LOGIN_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698