OLD | NEW |
| (Empty) |
1 // Copyright 2015 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_PASSWORD_MANAGER_AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE_H
_ | |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGATE_H
_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "chrome/browser/password_manager/password_manager_infobar_delegate.h" | |
10 | |
11 namespace content { | |
12 class WebContents; | |
13 } | |
14 | |
15 // This delegate provides and acts on data for the android only auto sign-in | |
16 // first run experience infobar. | |
17 class AutoSigninFirstRunInfoBarDelegate | |
18 : public PasswordManagerInfoBarDelegate { | |
19 public: | |
20 static void Create(content::WebContents* web_contents, | |
21 const base::string16& message); | |
22 | |
23 ~AutoSigninFirstRunInfoBarDelegate() override; | |
24 | |
25 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | |
26 base::string16 GetButtonLabel(InfoBarButton button) const override; | |
27 bool Accept() override; | |
28 bool Cancel() override; | |
29 | |
30 base::string16 GetExplanation() { return explanation_; } | |
31 | |
32 protected: | |
33 // Makes a ctor available in tests. | |
34 AutoSigninFirstRunInfoBarDelegate(content::WebContents* web_contents, | |
35 bool is_smart_lock_branding_available, | |
36 const base::string16& message); | |
37 | |
38 private: | |
39 base::string16 explanation_; | |
40 | |
41 content::WebContents* web_contents_; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(AutoSigninFirstRunInfoBarDelegate); | |
44 }; | |
45 | |
46 #endif // CHROME_BROWSER_PASSWORD_MANAGER_AUTO_SIGNIN_FIRST_RUN_INFOBAR_DELEGAT
E_H_ | |
OLD | NEW |