OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ |
6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | 6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 bool is_reload, | 61 bool is_reload, |
62 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); | 62 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); |
63 | 63 |
64 // ConfirmInfoBarDelegate overrides: | 64 // ConfirmInfoBarDelegate overrides: |
65 int GetIconId() const override; | 65 int GetIconId() const override; |
66 base::string16 GetMessageText() const override; | 66 base::string16 GetMessageText() const override; |
67 base::string16 GetLinkText() const override; | 67 base::string16 GetLinkText() const override; |
68 | 68 |
69 base::string16 GetTimestampText() const; | 69 base::string16 GetTimestampText() const; |
70 | 70 |
| 71 // A key to identify opt out events. |
| 72 static const void* OptOutEventKey(); |
| 73 |
71 private: | 74 private: |
72 PreviewsInfoBarDelegate( | 75 PreviewsInfoBarDelegate( |
73 PreviewsInfoBarTabHelper* infobar_tab_helper, | 76 PreviewsInfoBarTabHelper* infobar_tab_helper, |
74 previews::PreviewsType previews_type, | 77 previews::PreviewsType previews_type, |
75 base::Time previews_freshness, | 78 base::Time previews_freshness, |
76 bool is_data_saver_user, | 79 bool is_data_saver_user, |
77 bool is_reload, | 80 bool is_reload, |
78 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); | 81 const OnDismissPreviewsInfobarCallback& on_dismiss_callback); |
79 | 82 |
80 // ConfirmInfoBarDelegate overrides: | 83 // ConfirmInfoBarDelegate overrides: |
(...skipping 12 matching lines...) Expand all Loading... |
93 mutable PreviewsInfoBarAction infobar_dismissed_action_; | 96 mutable PreviewsInfoBarAction infobar_dismissed_action_; |
94 | 97 |
95 const base::string16 message_text_; | 98 const base::string16 message_text_; |
96 | 99 |
97 OnDismissPreviewsInfobarCallback on_dismiss_callback_; | 100 OnDismissPreviewsInfobarCallback on_dismiss_callback_; |
98 | 101 |
99 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); | 102 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); |
100 }; | 103 }; |
101 | 104 |
102 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | 105 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ |
OLD | NEW |