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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.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, 1 month 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) 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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 17 matching lines...) Expand all
28 #include "components/proximity_auth/screenlock_bridge.h" 28 #include "components/proximity_auth/screenlock_bridge.h"
29 #include "components/user_manager/user_manager.h" 29 #include "components/user_manager/user_manager.h"
30 #include "content/public/browser/notification_observer.h" 30 #include "content/public/browser/notification_observer.h"
31 #include "content/public/browser/notification_registrar.h" 31 #include "content/public/browser/notification_registrar.h"
32 #include "content/public/browser/web_ui.h" 32 #include "content/public/browser/web_ui.h"
33 #include "net/base/net_errors.h" 33 #include "net/base/net_errors.h"
34 #include "ui/base/ime/chromeos/ime_keyboard.h" 34 #include "ui/base/ime/chromeos/ime_keyboard.h"
35 #include "ui/base/ime/chromeos/input_method_manager.h" 35 #include "ui/base/ime/chromeos/input_method_manager.h"
36 #include "ui/events/event_handler.h" 36 #include "ui/events/event_handler.h"
37 37
38 class AccountId;
38 class EasyUnlockService; 39 class EasyUnlockService;
39 40
40 namespace base { 41 namespace base {
41 class DictionaryValue; 42 class DictionaryValue;
42 class ListValue; 43 class ListValue;
43 } 44 }
44 45
45 namespace chromeos { 46 namespace chromeos {
46 47
47 class CaptivePortalWindowProxy; 48 class CaptivePortalWindowProxy;
(...skipping 22 matching lines...) Expand all
70 71
71 std::string email_; 72 std::string email_;
72 bool oobe_ui_; 73 bool oobe_ui_;
73 }; 74 };
74 75
75 // An interface for WebUILoginDisplay to call SigninScreenHandler. 76 // An interface for WebUILoginDisplay to call SigninScreenHandler.
76 class LoginDisplayWebUIHandler { 77 class LoginDisplayWebUIHandler {
77 public: 78 public:
78 virtual void ClearAndEnablePassword() = 0; 79 virtual void ClearAndEnablePassword() = 0;
79 virtual void ClearUserPodPassword() = 0; 80 virtual void ClearUserPodPassword() = 0;
80 virtual void OnUserRemoved(const std::string& username, 81 virtual void OnUserRemoved(const AccountId& account_id,
81 bool last_user_removed) = 0; 82 bool last_user_removed) = 0;
82 virtual void OnUserImageChanged(const user_manager::User& user) = 0; 83 virtual void OnUserImageChanged(const user_manager::User& user) = 0;
83 virtual void OnPreferencesChanged() = 0; 84 virtual void OnPreferencesChanged() = 0;
84 virtual void ResetSigninScreenHandlerDelegate() = 0; 85 virtual void ResetSigninScreenHandlerDelegate() = 0;
85 virtual void ShowError(int login_attempts, 86 virtual void ShowError(int login_attempts,
86 const std::string& error_text, 87 const std::string& error_text,
87 const std::string& help_link_text, 88 const std::string& help_link_text,
88 HelpAppLauncher::HelpTopic help_topic_id) = 0; 89 HelpAppLauncher::HelpTopic help_topic_id) = 0;
89 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0; 90 virtual void ShowErrorScreen(LoginDisplay::SigninError error_id) = 0;
90 virtual void ShowSigninUI(const std::string& email) = 0; 91 virtual void ShowSigninUI(const std::string& email) = 0;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // Cancels user adding. 160 // Cancels user adding.
160 virtual void CancelUserAdding() = 0; 161 virtual void CancelUserAdding() = 0;
161 162
162 // Load wallpaper for given |username|. 163 // Load wallpaper for given |username|.
163 virtual void LoadWallpaper(const std::string& username) = 0; 164 virtual void LoadWallpaper(const std::string& username) = 0;
164 165
165 // Loads the default sign-in wallpaper. 166 // Loads the default sign-in wallpaper.
166 virtual void LoadSigninWallpaper() = 0; 167 virtual void LoadSigninWallpaper() = 0;
167 168
168 // Attempts to remove given user. 169 // Attempts to remove given user.
169 virtual void RemoveUser(const std::string& username) = 0; 170 virtual void RemoveUser(const AccountId& account_id) = 0;
170 171
171 // Let the delegate know about the handler it is supposed to be using. 172 // Let the delegate know about the handler it is supposed to be using.
172 virtual void SetWebUIHandler(LoginDisplayWebUIHandler* webui_handler) = 0; 173 virtual void SetWebUIHandler(LoginDisplayWebUIHandler* webui_handler) = 0;
173 174
174 // Whether login as guest is available. 175 // Whether login as guest is available.
175 virtual bool IsShowGuest() const = 0; 176 virtual bool IsShowGuest() const = 0;
176 177
177 // Weather to show the user pods or only GAIA sign in. 178 // Weather to show the user pods or only GAIA sign in.
178 // Public sessions are always shown. 179 // Public sessions are always shown.
179 virtual bool IsShowUsers() const = 0; 180 virtual bool IsShowUsers() const = 0;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 ::login::LocalizedValuesBuilder* builder) override; 279 ::login::LocalizedValuesBuilder* builder) override;
279 void Initialize() override; 280 void Initialize() override;
280 gfx::NativeWindow GetNativeWindow() override; 281 gfx::NativeWindow GetNativeWindow() override;
281 282
282 // WebUIMessageHandler implementation: 283 // WebUIMessageHandler implementation:
283 void RegisterMessages() override; 284 void RegisterMessages() override;
284 285
285 // LoginDisplayWebUIHandler implementation: 286 // LoginDisplayWebUIHandler implementation:
286 void ClearAndEnablePassword() override; 287 void ClearAndEnablePassword() override;
287 void ClearUserPodPassword() override; 288 void ClearUserPodPassword() override;
288 void OnUserRemoved(const std::string& username, 289 void OnUserRemoved(const AccountId& account_id,
289 bool last_user_removed) override; 290 bool last_user_removed) override;
290 void OnUserImageChanged(const user_manager::User& user) override; 291 void OnUserImageChanged(const user_manager::User& user) override;
291 void OnPreferencesChanged() override; 292 void OnPreferencesChanged() override;
292 void ResetSigninScreenHandlerDelegate() override; 293 void ResetSigninScreenHandlerDelegate() override;
293 void ShowError(int login_attempts, 294 void ShowError(int login_attempts,
294 const std::string& error_text, 295 const std::string& error_text,
295 const std::string& help_link_text, 296 const std::string& help_link_text,
296 HelpAppLauncher::HelpTopic help_topic_id) override; 297 HelpAppLauncher::HelpTopic help_topic_id) override;
297 void ShowSigninUI(const std::string& email) override; 298 void ShowSigninUI(const std::string& email) override;
298 void ShowPasswordChangedDialog(bool show_password_error, 299 void ShowPasswordChangedDialog(bool show_password_error,
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_; 489 scoped_ptr<ErrorScreensHistogramHelper> histogram_helper_;
489 490
490 base::WeakPtrFactory<SigninScreenHandler> weak_factory_; 491 base::WeakPtrFactory<SigninScreenHandler> weak_factory_;
491 492
492 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler); 493 DISALLOW_COPY_AND_ASSIGN(SigninScreenHandler);
493 }; 494 };
494 495
495 } // namespace chromeos 496 } // namespace chromeos
496 497
497 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_ 498 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SIGNIN_SCREEN_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698