1 // Copyright 2013 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.
5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGATE_H_
8 #include "components/infobars/core/confirm_infobar_delegate.h"
13 } // namespace content
15 class HostContentSettingsMap
;
17 class PopupBlockedInfoBarDelegate
: public ConfirmInfoBarDelegate
{
19 // Creates a popup blocked infobar and delegate and adds the infobar to
21 static void Create(content::WebContents
* web_contents
, int num_popups
);
23 ~PopupBlockedInfoBarDelegate() override
;
26 PopupBlockedInfoBarDelegate(int num_popups
,
28 HostContentSettingsMap
* map
);
30 // ConfirmInfoBarDelegate:
31 int GetIconID() const override
;
32 PopupBlockedInfoBarDelegate
* AsPopupBlockedInfoBarDelegate() override
;
33 base::string16
GetMessageText() const override
;
34 int GetButtons() const override
;
35 base::string16
GetButtonLabel(InfoBarButton button
) const override
;
36 bool Accept() override
;
40 HostContentSettingsMap
* map_
;
41 bool can_show_popups_
;
43 DISALLOW_COPY_AND_ASSIGN(PopupBlockedInfoBarDelegate
);
46 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGATE_H_