| Index: chrome/browser/infobars/infobar_responder.h
|
| diff --git a/chrome/browser/infobars/infobar_responder.h b/chrome/browser/infobars/infobar_responder.h
|
| index 266a2be9bcf6130cd6407186e5305643124ee16f..2e68a06af8bccc55f7ff88c2b9c0f9c46bf8e2e0 100644
|
| --- a/chrome/browser/infobars/infobar_responder.h
|
| +++ b/chrome/browser/infobars/infobar_responder.h
|
| @@ -22,19 +22,26 @@ class InfoBarService;
|
| // The asynchronous response matches how real users will use the infobar.
|
| class InfoBarResponder : public infobars::InfoBarManager::Observer {
|
| public:
|
| - // If |should_accept| is true, the responder will asynchronously Accept() the
|
| - // infobar; otherwise it will Cancel() it.
|
| - InfoBarResponder(InfoBarService* infobar_service, bool should_accept);
|
| + enum AutoResponseType {
|
| + ACCEPT,
|
| + DENY,
|
| + DISMISS
|
| + };
|
| +
|
| + // The responder will asynchronously perform the requested |response|.
|
| + InfoBarResponder(InfoBarService* infobar_service, AutoResponseType response);
|
| ~InfoBarResponder() override;
|
|
|
| // infobars::InfoBarManager::Observer:
|
| void OnInfoBarAdded(infobars::InfoBar* infobar) override;
|
| + void OnInfoBarReplaced(infobars::InfoBar* old_infobar,
|
| + infobars::InfoBar* new_infobar) override;
|
|
|
| private:
|
| void Respond(ConfirmInfoBarDelegate* delegate);
|
|
|
| InfoBarService* infobar_service_;
|
| - bool should_accept_;
|
| + AutoResponseType response_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(InfoBarResponder);
|
| };
|
|
|