Chromium Code Reviews| 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_NET_SPDYPROXY_DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDRO ID_H_ | |
| 6 #define CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_ANDRO ID_H_ | |
| 7 | |
| 8 #include <memory> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #include "components/infobars/core/confirm_infobar_delegate.h" | |
| 12 #include "components/infobars/core/infobar_delegate.h" | |
| 13 | |
| 14 namespace content { | |
| 15 class WebContents; | |
| 16 } | |
| 17 | |
| 18 namespace infobars { | |
| 19 class InfoBarManager; | |
| 20 } | |
| 21 | |
| 22 // Configures an InfoBar with no buttons that stays visible until it is | |
| 23 // explicitly dismissed. This InfoBar is suitable for displaying a message | |
| 24 // and a link, and is used only by an Android field trial. | |
|
Raj
2016/06/25 01:21:10
nit: Mentioning about field trial here is not very
megjablon
2016/06/27 19:57:09
Done.
| |
| 25 class DataReductionPromoInfoBarDelegateAndroid : public ConfirmInfoBarDelegate { | |
| 26 public: | |
| 27 // Creates the InfoBar and adds it to the provided |web_contents|. | |
| 28 static void Create(content::WebContents* web_contents); | |
| 29 | |
| 30 ~DataReductionPromoInfoBarDelegateAndroid() {} | |
| 31 | |
| 32 private: | |
| 33 DataReductionPromoInfoBarDelegateAndroid(); | |
| 34 | |
| 35 // Returns a Data Reduction Proxy InfoBar that owns |delegate|. | |
| 36 static std::unique_ptr<infobars::InfoBar> CreateInfoBar( | |
| 37 infobars::InfoBarManager* infobar_manager, | |
| 38 std::unique_ptr<DataReductionPromoInfoBarDelegateAndroid> delegate); | |
| 39 | |
| 40 // ConfirmInfoBarDelegate | |
| 41 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | |
| 42 base::string16 GetMessageText() const override; | |
| 43 | |
| 44 DISALLOW_COPY_AND_ASSIGN(DataReductionPromoInfoBarDelegateAndroid); | |
| 45 }; | |
| 46 | |
| 47 #endif // CHROME_BROWSER_NET_SPDYPROXY_DATA_REDUCTION_PROMO_INFOBAR_DELEGATE_AN DROID_H_ | |
| OLD | NEW |