OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "components/auto_login_parser/auto_login_parser.h" | 9 #include "components/auto_login_parser/auto_login_parser.h" |
10 #include "components/infobars/core/confirm_infobar_delegate.h" | 10 #include "components/infobars/core/confirm_infobar_delegate.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 SHOWN, // The infobar was shown to the user. | 43 SHOWN, // The infobar was shown to the user. |
44 ACCEPTED, // The user pressed the accept button. | 44 ACCEPTED, // The user pressed the accept button. |
45 REJECTED, // The user pressed the reject button. | 45 REJECTED, // The user pressed the reject button. |
46 DISMISSED, // The user pressed the close button. | 46 DISMISSED, // The user pressed the close button. |
47 IGNORED, // The user ignored the infobar. | 47 IGNORED, // The user ignored the infobar. |
48 LEARN_MORE, // The user clicked on the learn more link. | 48 LEARN_MORE, // The user clicked on the learn more link. |
49 HISTOGRAM_BOUNDING_VALUE | 49 HISTOGRAM_BOUNDING_VALUE |
50 }; | 50 }; |
51 | 51 |
52 AutoLoginInfoBarDelegate(const Params& params, Profile* profile); | 52 AutoLoginInfoBarDelegate(const Params& params, Profile* profile); |
53 virtual ~AutoLoginInfoBarDelegate(); | 53 ~AutoLoginInfoBarDelegate() override; |
54 | 54 |
55 void RecordHistogramAction(Actions action); | 55 void RecordHistogramAction(Actions action); |
56 | 56 |
57 private: | 57 private: |
58 // ConfirmInfoBarDelegate: | 58 // ConfirmInfoBarDelegate: |
59 virtual void InfoBarDismissed() override; | 59 void InfoBarDismissed() override; |
60 virtual int GetIconID() const override; | 60 int GetIconID() const override; |
61 virtual Type GetInfoBarType() const override; | 61 Type GetInfoBarType() const override; |
62 virtual AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() override; | 62 AutoLoginInfoBarDelegate* AsAutoLoginInfoBarDelegate() override; |
63 virtual base::string16 GetMessageText() const override; | 63 base::string16 GetMessageText() const override; |
64 virtual base::string16 GetButtonLabel(InfoBarButton button) const override; | 64 base::string16 GetButtonLabel(InfoBarButton button) const override; |
65 virtual bool Accept() override; | 65 bool Accept() override; |
66 virtual bool Cancel() override; | 66 bool Cancel() override; |
67 | 67 |
68 // SigninManagerBase::Observer: | 68 // SigninManagerBase::Observer: |
69 virtual void GoogleSignedOut(const std::string& account_id, | 69 void GoogleSignedOut(const std::string& account_id, |
70 const std::string& username) override; | 70 const std::string& username) override; |
71 | 71 |
72 const Params params_; | 72 const Params params_; |
73 | 73 |
74 Profile* profile_; | 74 Profile* profile_; |
75 | 75 |
76 // Whether any UI controls in the infobar were pressed or not. | 76 // Whether any UI controls in the infobar were pressed or not. |
77 bool button_pressed_; | 77 bool button_pressed_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); | 79 DISALLOW_COPY_AND_ASSIGN(AutoLoginInfoBarDelegate); |
80 }; | 80 }; |
81 | 81 |
82 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ | 82 #endif // CHROME_BROWSER_UI_AUTO_LOGIN_INFOBAR_DELEGATE_H_ |
OLD | NEW |