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

Side by Side Diff: chrome/browser/chromeos/login/signin_screen_controller.h

Issue 1470633002: ChromeOS: Fix removeUser button on signin screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@462823--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Fix-GetKnownUserAccountId
Patch Set: Rebased. Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_SIGNIN_SCREEN_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_
7 7
8 #include "chrome/browser/chromeos/login/screens/gaia_screen.h" 8 #include "chrome/browser/chromeos/login/screens/gaia_screen.h"
9 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" 9 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
10 #include "chrome/browser/chromeos/login/ui/login_display_host.h" 10 #include "chrome/browser/chromeos/login/ui/login_display_host.h"
11 #include "chrome/browser/chromeos/login/ui/oobe_display.h" 11 #include "chrome/browser/chromeos/login/ui/oobe_display.h"
12 #include "components/user_manager/remove_user_delegate.h" 12 #include "components/user_manager/remove_user_delegate.h"
13 #include "components/user_manager/user.h" 13 #include "components/user_manager/user.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 16
17 class AccountId;
18
17 namespace chromeos { 19 namespace chromeos {
18 20
19 class LoginDisplayWebUIHandler; 21 class LoginDisplayWebUIHandler;
20 22
21 // Class that manages control flow between wizard screens. Wizard controller 23 // Class that manages control flow between wizard screens. Wizard controller
22 // interacts with screen controllers to move the user between screens. 24 // interacts with screen controllers to move the user between screens.
23 class SignInScreenController : public user_manager::RemoveUserDelegate, 25 class SignInScreenController : public user_manager::RemoveUserDelegate,
24 public content::NotificationObserver { 26 public content::NotificationObserver {
25 public: 27 public:
26 SignInScreenController(OobeDisplay* oobe_display, 28 SignInScreenController(OobeDisplay* oobe_display,
(...skipping 13 matching lines...) Expand all
40 void OnSigninScreenReady(); 42 void OnSigninScreenReady();
41 43
42 // Query to send list of users to user selection screen. 44 // Query to send list of users to user selection screen.
43 void SendUserList(); 45 void SendUserList();
44 46
45 // Runs OAauth token validity check. 47 // Runs OAauth token validity check.
46 void CheckUserStatus(const AccountId& account_id); 48 void CheckUserStatus(const AccountId& account_id);
47 49
48 // Query to remove user with specified id. 50 // Query to remove user with specified id.
49 // TODO(antrim): move to user selection screen handler. 51 // TODO(antrim): move to user selection screen handler.
50 void RemoveUser(const std::string& user_id); 52 void RemoveUser(const AccountId& account_id);
51 53
54 private:
52 // user_manager::RemoveUserDelegate implementation: 55 // user_manager::RemoveUserDelegate implementation:
53 void OnBeforeUserRemoved(const std::string& username) override; 56 void OnBeforeUserRemoved(const AccountId& account_id) override;
54 void OnUserRemoved(const std::string& username) override; 57 void OnUserRemoved(const AccountId& account_id) override;
55 58
56 // content::NotificationObserver implementation. 59 // content::NotificationObserver implementation.
57 void Observe(int type, 60 void Observe(int type,
58 const content::NotificationSource& source, 61 const content::NotificationSource& source,
59 const content::NotificationDetails& details) override; 62 const content::NotificationDetails& details) override;
60 63
61 private:
62 static SignInScreenController* instance_; 64 static SignInScreenController* instance_;
63 65
64 OobeDisplay* oobe_display_; 66 OobeDisplay* oobe_display_;
65 67
66 // Reference to the WebUI handling layer for the login screen 68 // Reference to the WebUI handling layer for the login screen
67 LoginDisplayWebUIHandler* webui_handler_; 69 LoginDisplayWebUIHandler* webui_handler_;
68 70
69 scoped_ptr<GaiaScreen> gaia_screen_; 71 scoped_ptr<GaiaScreen> gaia_screen_;
70 scoped_ptr<UserSelectionScreen> user_selection_screen_; 72 scoped_ptr<UserSelectionScreen> user_selection_screen_;
71 73
72 // Used for notifications during the login process. 74 // Used for notifications during the login process.
73 content::NotificationRegistrar registrar_; 75 content::NotificationRegistrar registrar_;
74 76
75 DISALLOW_COPY_AND_ASSIGN(SignInScreenController); 77 DISALLOW_COPY_AND_ASSIGN(SignInScreenController);
76 }; 78 };
77 79
78 } // namespace chromeos 80 } // namespace chromeos
79 81
80 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_ 82 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SIGNIN_SCREEN_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698