OLD | NEW |
| (Empty) |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_APP_LIST_CHROME_SIGNIN_DELEGATE_H_ | |
6 #define CHROME_BROWSER_UI_APP_LIST_CHROME_SIGNIN_DELEGATE_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "chrome/browser/signin/signin_tracker.h" | |
11 #include "chrome/browser/ui/webui/signin/login_ui_service.h" | |
12 #include "ui/app_list/signin_delegate.h" | |
13 | |
14 class Profile; | |
15 | |
16 class ChromeSigninDelegate : public app_list::SigninDelegate, | |
17 public LoginUIService::LoginUI, | |
18 public SigninTracker::Observer { | |
19 public: | |
20 explicit ChromeSigninDelegate(Profile* profile); | |
21 | |
22 private: | |
23 virtual ~ChromeSigninDelegate(); | |
24 | |
25 bool IsActiveSignin(); | |
26 void FinishSignin(); | |
27 | |
28 // Overridden from app_list::SigninDelegate: | |
29 virtual bool NeedSignin() OVERRIDE; | |
30 virtual content::WebContents* PrepareForSignin() OVERRIDE; | |
31 | |
32 // Overridden from LoginUIService::LoginUI: | |
33 virtual void FocusUI() OVERRIDE; | |
34 virtual void CloseUI() OVERRIDE; | |
35 | |
36 // Overridden from SigninTracker::Observer: | |
37 virtual void GaiaCredentialsValid() OVERRIDE; | |
38 virtual void SigninFailed(const GoogleServiceAuthError& error) OVERRIDE; | |
39 virtual void SigninSuccess() OVERRIDE; | |
40 | |
41 Profile* profile_; | |
42 | |
43 scoped_ptr<SigninTracker> signin_tracker_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(ChromeSigninDelegate); | |
46 }; | |
47 | |
48 #endif // CHROME_BROWSER_UI_APP_LIST_CHROME_SIGNIN_DELEGATE_H_ | |
OLD | NEW |