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