Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3234)

Unified Diff: chrome/browser/permissions/permission_infobar_delegate.h

Issue 1913413002: [WIP][POC] Base URL: https://chromium.googlesource.com/chromium/src.git@permission-request-rename
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};
« no previous file with comments | « chrome/browser/permissions/permission_context_base.cc ('k') | chrome/browser/permissions/permission_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698