Chromium Code Reviews| Index: chrome/browser/content_settings/permission_infobar_delegate.h |
| diff --git a/chrome/browser/content_settings/permission_infobar_delegate.h b/chrome/browser/content_settings/permission_infobar_delegate.h |
| index cdb8c2079721cae9ab2f5a8d254c28fa382990d6..af94ac4fdde86ab4cf55dafb70dd302aa9cb7f6c 100644 |
| --- a/chrome/browser/content_settings/permission_infobar_delegate.h |
| +++ b/chrome/browser/content_settings/permission_infobar_delegate.h |
| @@ -7,6 +7,7 @@ |
| #include "chrome/browser/content_settings/permission_request_id.h" |
| #include "chrome/browser/infobars/infobar_service.h" |
| +#include "chrome/common/content_settings_types.h" |
| #include "components/infobars/core/confirm_infobar_delegate.h" |
| #include "content/public/browser/web_contents.h" |
| @@ -22,24 +23,31 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate { |
| protected: |
| PermissionInfobarDelegate(PermissionQueueController* controller, |
| const PermissionRequestID& id, |
| - const GURL& requesting_origin); |
| + const GURL& requesting_origin, |
| + ContentSettingsType type); |
| virtual ~PermissionInfobarDelegate(); |
| // ConfirmInfoBarDelegate: |
| virtual base::string16 GetMessageText() const = 0; |
| - virtual void InfoBarDismissed() OVERRIDE; |
| virtual infobars::InfoBarDelegate::Type GetInfoBarType() const OVERRIDE; |
| virtual base::string16 GetButtonLabel(InfoBarButton button) const OVERRIDE; |
| + |
| + // Remember to call RegisterActionTaken for these methods if you are |
| + // overriding them. |
| + virtual void InfoBarDismissed() OVERRIDE; |
| virtual bool Accept() OVERRIDE; |
| virtual bool Cancel() OVERRIDE; |
| + void RegisterActionTaken() {action_taken_ = true; } |
|
Bernhard Bauer
2014/07/14 15:22:15
Nit: space before brace, and empty line.
Miguel Garcia
2014/07/14 16:57:50
Done and moved it to protected too
|
| private: |
| void SetPermission(bool update_content_setting, bool allowed); |
| PermissionQueueController* controller_; // not owned by us |
| const PermissionRequestID id_; |
| GURL requesting_origin_; |
| + bool action_taken_; |
| + ContentSettingsType type_; |
| DISALLOW_COPY_AND_ASSIGN(PermissionInfobarDelegate); |
| }; |