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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_service.h

Issue 2348423002: [Signin Error Dialog] (3/3) Added the triggering code (Closed)
Patch Set: Fix malformed function declaration on mac. Created 4 years, 2 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
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_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
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 // Displays login results. 82 // Displays login results. This is either the Modal Signin Error dialog if
83 void DisplayLoginResult(Browser* browser, const base::string16& message); 83 // |error_message| is a non-empty string, or the User Menu with a blue header
84 // toast otherwise.
85 void DisplayLoginResult(Browser* browser,
86 const base::string16& error_message,
87 const base::string16& email);
84 88
85 // Gets the last login result set through |DisplayLoginResult|. 89 // Gets the last login result set through |DisplayLoginResult|.
86 const base::string16& GetLastLoginResult() const; 90 const base::string16& GetLastLoginResult() const;
87 91
88 // Gets the last email used for signing in when a signin error occured; set 92 // Gets the last email used for signing in when a signin error occured; set
89 // through |DisplayLoginResult|. 93 // through |DisplayLoginResult|.
90 const base::string16& GetLastLoginErrorEmail() const; 94 const base::string16& GetLastLoginErrorEmail() const;
91 95
92 private: 96 private:
93 // Weak pointers to the recently opened UIs, with the most recent in front. 97 // Weak pointers to the recently opened UIs, with the most recent in front.
94 std::list<LoginUI*> ui_list_; 98 std::list<LoginUI*> ui_list_;
95 #if !defined(OS_CHROMEOS) 99 #if !defined(OS_CHROMEOS)
96 Profile* profile_; 100 Profile* profile_;
97 #endif 101 #endif
98 102
99 // List of observers. 103 // List of observers.
100 base::ObserverList<Observer> observer_list_; 104 base::ObserverList<Observer> observer_list_;
101 105
102 base::string16 last_login_result_; 106 base::string16 last_login_result_;
103 base::string16 last_login_error_email_; 107 base::string16 last_login_error_email_;
104 108
105 DISALLOW_COPY_AND_ASSIGN(LoginUIService); 109 DISALLOW_COPY_AND_ASSIGN(LoginUIService);
106 }; 110 };
107 111
108 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_ 112 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_handler_impl.cc ('k') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698