| Index: chrome/browser/permissions/permission_infobar_delegate.h
|
| diff --git a/chrome/browser/permissions/permission_infobar_delegate.h b/chrome/browser/permissions/permission_infobar_delegate.h
|
| index 1daeccdb60e9d9728fcd6e704c3f2ed4b383a9da..34226b449dac84698c7af9389d298b71fd23118d 100644
|
| --- a/chrome/browser/permissions/permission_infobar_delegate.h
|
| +++ b/chrome/browser/permissions/permission_infobar_delegate.h
|
| @@ -13,25 +13,28 @@
|
| #include "content/public/browser/web_contents.h"
|
|
|
| class NavigationDetails;
|
| +class PermissionsBubbleViewAndroid;
|
| +class PermissionRequest;
|
|
|
| // Base class for permission infobars, it implements the default behavior
|
| // so that the accept/deny buttons grant/deny the relevant permission.
|
| // A basic implementor only needs to implement the methods that
|
| // provide an icon and a message text to the infobar.
|
| class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
|
| -
|
| public:
|
| using PermissionSetCallback = base::Callback<void(bool, bool)>;
|
| ContentSettingsType content_setting() const { return content_settings_type_; }
|
|
|
| - protected:
|
| + // protected:
|
| + friend PermissionsBubbleViewAndroid;
|
| + explicit PermissionInfobarDelegate(PermissionRequest* request);
|
| PermissionInfobarDelegate(const GURL& requesting_origin,
|
| content::PermissionType permission_type,
|
| ContentSettingsType content_settings_type,
|
| const PermissionSetCallback& callback);
|
| ~PermissionInfobarDelegate() override;
|
|
|
| - virtual int GetMessageResourceId() const = 0;
|
| + virtual int GetMessageResourceId() const;
|
|
|
| private:
|
| // ConfirmInfoBarDelegate:
|
| @@ -42,6 +45,8 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
|
| base::string16 GetMessageText() const override;
|
| bool Accept() override;
|
| bool Cancel() override;
|
| + infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
|
| + int GetIconId() const override;
|
|
|
| void SetPermission(bool update_content_setting, bool allowed);
|
|
|
| @@ -50,6 +55,8 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
|
| content::PermissionType permission_type_;
|
| ContentSettingsType content_settings_type_;
|
| const PermissionSetCallback callback_;
|
| + // TODO: probably not okay.
|
| + PermissionRequest* request_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(PermissionInfobarDelegate);
|
| };
|
|
|