| 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_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR_DE
LEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR_DE
LEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR_DE
LEGATE_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR_DE
LEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/infobars/core/confirm_infobar_delegate.h" | 9 #include "components/infobars/core/confirm_infobar_delegate.h" |
| 10 | 10 |
| 11 class InfoBarService; | 11 class InfoBarService; |
| 12 | 12 |
| 13 // This infobar appears when the user proceeds through Safe Browsing warning | 13 // This infobar appears when the user proceeds through Safe Browsing warning |
| 14 // interstitials to a site with deceptive embedded content. It tells the user | 14 // interstitials to a site with deceptive embedded content. It tells the user |
| 15 // some content has been removed and provides a button to reload the page with | 15 // some content has been removed and provides a button to reload the page with |
| 16 // the content unblocked. | 16 // the content unblocked. |
| 17 class SubresourceFilterInfobarDelegate : public ConfirmInfoBarDelegate { | 17 class SubresourceFilterInfobarDelegate : public ConfirmInfoBarDelegate { |
| 18 public: | 18 public: |
| 19 // Creates a subresource filter infobar and delegate and adds the infobar to | 19 // Creates a subresource filter infobar and delegate and adds the infobar to |
| 20 // |infobar_service|. | 20 // |infobar_service|. |
| 21 static void Create(InfoBarService* infobar_service); | 21 static void Create(InfoBarService* infobar_service); |
| 22 | 22 |
| 23 ~SubresourceFilterInfobarDelegate() override; | 23 ~SubresourceFilterInfobarDelegate() override; |
| 24 | 24 |
| 25 base::string16 GetExplanationText() const; | 25 base::string16 GetExplanationText() const; |
| 26 | 26 |
| 27 bool ShouldShowExperimentalInfobar() const; |
| 28 |
| 27 // ConfirmInfoBarDelegate: | 29 // ConfirmInfoBarDelegate: |
| 28 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; | 30 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; |
| 29 int GetIconId() const override; | 31 int GetIconId() const override; |
| 30 base::string16 GetMessageText() const override; | 32 base::string16 GetMessageText() const override; |
| 31 int GetButtons() const override; | 33 int GetButtons() const override; |
| 32 base::string16 GetButtonLabel(InfoBarButton button) const override; | 34 base::string16 GetButtonLabel(InfoBarButton button) const override; |
| 33 bool Cancel() override; | 35 bool Cancel() override; |
| 34 | 36 |
| 35 private: | 37 private: |
| 36 SubresourceFilterInfobarDelegate(); | 38 SubresourceFilterInfobarDelegate(); |
| 37 | 39 |
| 38 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterInfobarDelegate); | 40 DISALLOW_COPY_AND_ASSIGN(SubresourceFilterInfobarDelegate); |
| 39 }; | 41 }; |
| 40 | 42 |
| 41 std::unique_ptr<infobars::InfoBar> CreateSubresourceFilterInfoBar( | 43 std::unique_ptr<infobars::InfoBar> CreateSubresourceFilterInfoBar( |
| 42 std::unique_ptr<SubresourceFilterInfobarDelegate> delegate); | 44 std::unique_ptr<SubresourceFilterInfobarDelegate> delegate); |
| 43 | 45 |
| 44 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR
_DELEGATE_H_ | 46 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_SUBRESOURCE_FILTER_INFOBAR
_DELEGATE_H_ |
| OLD | NEW |