| 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 6f2ef7940e4fbb74d9dbe71907d94e420fe53481..f2ea4b4970c68192503e08e33cabc803f34fd6d9 100644
|
| --- a/chrome/browser/permissions/permission_infobar_delegate.h
|
| +++ b/chrome/browser/permissions/permission_infobar_delegate.h
|
| @@ -23,12 +23,17 @@ class InfoBar;
|
| class InfoBarService;
|
| class Profile;
|
|
|
| -// 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
|
| +// Base delegate class for permission prompts on Android. The default behavior
|
| +// is that the accept/deny buttons grant/deny the relevant permission
|
| +// respectively. A basic implementor only needs to implement the methods that
|
| // provide an icon and a message text to the infobar.
|
| +//
|
| +// By default, the user is presented with an infobar to make their choice. If
|
| +// the experimental ModalPermissionPrompts feature is active, they will instead
|
| +// see a modal dialog. Currently, this class is used for both; future
|
| +// refactoring will be undertaken based on whether support for infobars is
|
| +// retained following the modal prompt experiment.
|
| class PermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| -
|
| public:
|
| using PermissionSetCallback = base::Callback<void(bool, PermissionAction)>;
|
|
|
| @@ -55,6 +60,10 @@ class PermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| bool persist() const { return persist_; }
|
|
|
| // ConfirmInfoBarDelegate:
|
| + bool Accept() override;
|
| + bool Cancel() override;
|
| + void InfoBarDismissed() override;
|
| + base::string16 GetButtonLabel(InfoBarButton button) const override;
|
| base::string16 GetMessageText() const override;
|
|
|
| protected:
|
| @@ -68,11 +77,7 @@ class PermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
|
| private:
|
| // ConfirmInfoBarDelegate:
|
| Type GetInfoBarType() const override;
|
| - void InfoBarDismissed() override;
|
| PermissionInfoBarDelegate* AsPermissionInfoBarDelegate() override;
|
| - base::string16 GetButtonLabel(InfoBarButton button) const override;
|
| - bool Accept() override;
|
| - bool Cancel() override;
|
|
|
| virtual int GetMessageResourceId() const = 0;
|
| void SetPermission(bool update_content_setting, PermissionAction decision);
|
|
|