Chromium Code Reviews| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 // Displays login results. | 82 // Displays login results. |
| 83 void DisplayLoginResult(Browser* browser, const base::string16& message); | 83 void DisplayLoginResult(Browser* browser, |
|
tommycli
2016/09/20 17:48:05
I assume this displays a "success" dialog if there
anthonyvd
2016/09/21 15:07:24
Done.
| |
| 84 const base::string16& error_message, | |
| 85 const base::string16& email); | |
| 84 | 86 |
| 85 // Gets the last login result set through |DisplayLoginResult|. | 87 // Gets the last login result set through |DisplayLoginResult|. |
| 86 const base::string16& GetLastLoginResult() const; | 88 const base::string16& GetLastLoginResult() const; |
| 87 | 89 |
| 88 // Gets the last email used for signing in when a signin error occured; set | 90 // Gets the last email used for signing in when a signin error occured; set |
| 89 // through |DisplayLoginResult|. | 91 // through |DisplayLoginResult|. |
| 90 const base::string16& GetLastLoginErrorEmail() const; | 92 const base::string16& GetLastLoginErrorEmail() const; |
| 91 | 93 |
| 92 private: | 94 private: |
| 93 // Weak pointers to the recently opened UIs, with the most recent in front. | 95 // Weak pointers to the recently opened UIs, with the most recent in front. |
| 94 std::list<LoginUI*> ui_list_; | 96 std::list<LoginUI*> ui_list_; |
| 95 #if !defined(OS_CHROMEOS) | 97 #if !defined(OS_CHROMEOS) |
| 96 Profile* profile_; | 98 Profile* profile_; |
| 97 #endif | 99 #endif |
| 98 | 100 |
| 99 // List of observers. | 101 // List of observers. |
| 100 base::ObserverList<Observer> observer_list_; | 102 base::ObserverList<Observer> observer_list_; |
| 101 | 103 |
| 102 base::string16 last_login_result_; | 104 base::string16 last_login_result_; |
| 103 base::string16 last_login_error_email_; | 105 base::string16 last_login_error_email_; |
| 104 | 106 |
| 105 DISALLOW_COPY_AND_ASSIGN(LoginUIService); | 107 DISALLOW_COPY_AND_ASSIGN(LoginUIService); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ | 110 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ |
| OLD | NEW |