OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | |
6 #define CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | |
7 | |
8 #include "components/infobars/core/confirm_infobar_delegate.h" | |
9 | |
10 namespace content { | |
11 class WebContents; | |
12 } | |
13 | |
14 namespace data_reduction_proxy { | |
15 class DataReductionProxySettings; | |
Peter Kasting
2016/08/24 21:58:00
This forward-decl is no longer needed.
megjablon
2016/08/24 22:23:43
Done.
| |
16 } | |
17 | |
18 class PreviewsInfoBarDelegate : public ConfirmInfoBarDelegate { | |
19 public: | |
20 // The type of the infobar. It controls the strings and what UMA data is | |
21 // recorded for the infobar. | |
22 enum PreviewsInfoBarType { | |
23 LOFI, // Server-side image replacement. | |
24 LITE_PAGE, // Server-side page rewrite. | |
25 OFFLINE, // Offline copy of the page. | |
26 }; | |
27 | |
28 ~PreviewsInfoBarDelegate() override; | |
29 | |
30 // Creates a preview infobar and corresponding delegate and adds the infobar | |
31 // to InfoBarService. |infobar_type| controls the strings and what UMA data is | |
32 // recorded for the infobar. | |
Peter Kasting
2016/08/24 21:58:00
Nit: Now that this second sentence is verbatim wit
megjablon
2016/08/24 22:23:43
I'm good with removing it.
| |
33 static void Create(content::WebContents* web_contents, | |
34 PreviewsInfoBarType infobar_type); | |
35 | |
36 private: | |
37 PreviewsInfoBarDelegate(content::WebContents* web_contents, | |
38 PreviewsInfoBarType infobar_type); | |
39 | |
40 // ConfirmInfoBarDelegate overrides: | |
Peter Kasting
2016/08/24 21:58:00
Nit: " overrides" not necessary
megjablon
2016/08/24 22:23:43
Done.
| |
41 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | |
42 int GetIconId() const override; | |
43 bool ShouldExpire(const NavigationDetails& details) const override; | |
44 base::string16 GetMessageText() const override; | |
45 int GetButtons() const override; | |
46 base::string16 GetLinkText() const override; | |
47 bool LinkClicked(WindowOpenDisposition disposition) override; | |
48 | |
49 PreviewsInfoBarType infobar_type_; | |
50 | |
51 DISALLOW_COPY_AND_ASSIGN(PreviewsInfoBarDelegate); | |
52 }; | |
53 | |
54 #endif // CHROME_BROWSER_PREVIEWS_PREVIEWS_INFOBAR_DELEGATE_H_ | |
OLD | NEW |