OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 UI_APP_LIST_SIGNIN_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_SIGNIN_DELEGATE_H_ |
6 #define UI_APP_LIST_SIGNIN_DELEGATE_H_ | 6 #define UI_APP_LIST_SIGNIN_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/observer_list.h" | |
10 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
11 #include "ui/app_list/app_list_export.h" | 10 #include "ui/app_list/app_list_export.h" |
12 | 11 |
13 namespace app_list { | 12 namespace app_list { |
14 | 13 |
15 class SigninDelegateObserver; | |
16 | |
17 class APP_LIST_EXPORT SigninDelegate { | 14 class APP_LIST_EXPORT SigninDelegate { |
18 public: | 15 public: |
19 SigninDelegate(); | 16 SigninDelegate(); |
20 virtual ~SigninDelegate(); | 17 virtual ~SigninDelegate(); |
21 | 18 |
22 virtual bool NeedSignin() = 0; | 19 virtual bool NeedSignin() = 0; |
23 virtual void ShowSignin() = 0; | 20 virtual void ShowSignin() = 0; |
24 virtual void OpenLearnMore() = 0; | 21 virtual void OpenLearnMore() = 0; |
25 virtual void OpenSettings() = 0; | 22 virtual void OpenSettings() = 0; |
26 | 23 |
27 virtual base::string16 GetSigninHeading() = 0; | 24 virtual base::string16 GetSigninHeading() = 0; |
28 virtual base::string16 GetSigninText() = 0; | 25 virtual base::string16 GetSigninText() = 0; |
29 virtual base::string16 GetSigninButtonText() = 0; | 26 virtual base::string16 GetSigninButtonText() = 0; |
30 virtual base::string16 GetLearnMoreLinkText() = 0; | 27 virtual base::string16 GetLearnMoreLinkText() = 0; |
31 virtual base::string16 GetSettingsLinkText() = 0; | 28 virtual base::string16 GetSettingsLinkText() = 0; |
32 | 29 |
33 void AddObserver(SigninDelegateObserver* observer); | |
34 void RemoveObserver(SigninDelegateObserver* observer); | |
35 | |
36 protected: | |
37 void NotifySigninSuccess(); | |
38 | |
39 private: | 30 private: |
40 ObserverList<SigninDelegateObserver, true> observers_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(SigninDelegate); | 31 DISALLOW_COPY_AND_ASSIGN(SigninDelegate); |
43 }; | 32 }; |
44 | 33 |
45 } // namespace app_list | 34 } // namespace app_list |
46 | 35 |
47 #endif // UI_APP_LIST_SIGNIN_DELEGATE_H_ | 36 #endif // UI_APP_LIST_SIGNIN_DELEGATE_H_ |
OLD | NEW |