OLD | NEW |
---|---|
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_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 | 72 |
73 // Called when the sync confirmation UI is closed. |result| indicates the | 73 // Called when the sync confirmation UI is closed. |result| indicates the |
74 // option chosen by the user in the confirmation UI. | 74 // option chosen by the user in the confirmation UI. |
75 void SyncConfirmationUIClosed(SyncConfirmationUIClosedResult result); | 75 void SyncConfirmationUIClosed(SyncConfirmationUIClosedResult result); |
76 | 76 |
77 // Delegate to an existing login dialog if one exists. | 77 // Delegate to an existing login dialog if one exists. |
78 // If not, we make a new popup dialog window, and set it to | 78 // If not, we make a new popup dialog window, and set it to |
79 // chrome://signin to ask the user to sign in to chrome. | 79 // chrome://signin to ask the user to sign in to chrome. |
80 void ShowLoginPopup(); | 80 void ShowLoginPopup(); |
81 | 81 |
82 // Sets the last email used for signing in when a signin error occured. | |
83 void SetLastLoginErrorUsername(const base::string16& username); | |
anthonyvd
2016/08/22 14:58:46
Since username == email here, maybe we should pick
Jane
2016/08/22 20:48:31
Done.
| |
84 | |
82 // Displays login results. | 85 // Displays login results. |
83 void DisplayLoginResult(Browser* browser, const base::string16& message); | 86 void DisplayLoginResult(Browser* browser, const base::string16& message); |
84 | 87 |
85 // Gets the last login result set through |DisplayLoginResult|. | 88 // Gets the last login result set through |DisplayLoginResult|. |
86 const base::string16& GetLastLoginResult(); | 89 const base::string16& GetLastLoginResult(); |
87 | 90 |
91 // Gets the last email used for login when a login error occured; set through | |
92 // |SetLastLoginUsername|. | |
93 const base::string16& GetLastLoginErrorUsername(); | |
anthonyvd
2016/08/22 14:58:46
Same as above.
Jane
2016/08/22 20:48:31
Done.
| |
94 | |
88 private: | 95 private: |
89 // Weak pointers to the recently opened UIs, with the most recent in front. | 96 // Weak pointers to the recently opened UIs, with the most recent in front. |
90 std::list<LoginUI*> ui_list_; | 97 std::list<LoginUI*> ui_list_; |
91 #if !defined(OS_CHROMEOS) | 98 #if !defined(OS_CHROMEOS) |
92 Profile* profile_; | 99 Profile* profile_; |
93 #endif | 100 #endif |
94 | 101 |
95 // List of observers. | 102 // List of observers. |
96 base::ObserverList<Observer> observer_list_; | 103 base::ObserverList<Observer> observer_list_; |
97 | 104 |
98 base::string16 last_login_result_; | 105 base::string16 last_login_result_; |
106 base::string16 last_login_error_username_; | |
99 | 107 |
100 DISALLOW_COPY_AND_ASSIGN(LoginUIService); | 108 DISALLOW_COPY_AND_ASSIGN(LoginUIService); |
101 }; | 109 }; |
102 | 110 |
103 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ | 111 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ |
OLD | NEW |