Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(543)

Side by Side Diff: chrome/browser/ui/android/content_settings/subresource_filter_infobar_delegate.h

Issue 2765193002: Prototype for the new UI for the Safe Browsing Subresource Filter. (Closed)
Patch Set: comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/android/content_settings/subresource_filter_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698