OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_POPUP_BLOCKED_INFOBAR_DELEGAT
E_H_ | 5 #ifndef CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT
E_H_ |
6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT
E_H_ | 6 #define CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELEGAT
E_H_ |
7 | 7 |
8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" | 8 #include "chrome/browser/infobars/confirm_infobar_delegate.h" |
9 | 9 |
10 class InfoBarService; | 10 class InfoBarService; |
11 | 11 |
12 class PopupBlockedInfoBarDelegate : public ConfirmInfoBarDelegate { | 12 class PopupBlockedInfoBarDelegate : public ConfirmInfoBarDelegate { |
13 public: | 13 public: |
14 // Creates a popup blocked infobar delegate and adds it to |infobar_service|. | 14 // Creates a popup blocked infobar and delegate and adds the infobar to |
| 15 // |infobar_service|. |
15 static void Create(InfoBarService* infobar_service, int num_popups); | 16 static void Create(InfoBarService* infobar_service, int num_popups); |
16 | 17 |
17 virtual ~PopupBlockedInfoBarDelegate(); | 18 virtual ~PopupBlockedInfoBarDelegate(); |
18 | 19 |
19 private: | 20 private: |
20 PopupBlockedInfoBarDelegate(InfoBarService* infobar_service, int num_popups); | 21 explicit PopupBlockedInfoBarDelegate(int num_popups); |
21 | 22 |
22 // ConfirmInfoBarDelegate: | 23 // ConfirmInfoBarDelegate: |
23 virtual int GetIconID() const OVERRIDE; | 24 virtual int GetIconID() const OVERRIDE; |
24 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() OVERRIDE; | 25 virtual PopupBlockedInfoBarDelegate* AsPopupBlockedInfoBarDelegate() OVERRIDE; |
25 virtual string16 GetMessageText() const OVERRIDE; | 26 virtual string16 GetMessageText() const OVERRIDE; |
26 virtual int GetButtons() const OVERRIDE; | 27 virtual int GetButtons() const OVERRIDE; |
27 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; | 28 virtual string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
28 virtual bool Accept() OVERRIDE; | 29 virtual bool Accept() OVERRIDE; |
29 | 30 |
30 int num_popups_; | 31 int num_popups_; |
31 | 32 |
32 DISALLOW_COPY_AND_ASSIGN(PopupBlockedInfoBarDelegate); | 33 DISALLOW_COPY_AND_ASSIGN(PopupBlockedInfoBarDelegate); |
33 }; | 34 }; |
34 | 35 |
35 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELE
GATE_H_ | 36 #endif // CHROME_BROWSER_UI_ANDROID_CONTENT_SETTINGS_POPUP_BLOCKED_INFOBAR_DELE
GATE_H_ |
OLD | NEW |