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

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

Issue 2250053002: Clean up the PermissionInfoBarDelegate hierarchy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-infobar-remember-decision
Patch Set: Created 4 years, 4 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 53dd55aa18248006a181ac614a222328a10293c8..d11d6d2b39570ec5fe03efa555cf196260be7c3f 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.h
+++ b/chrome/browser/permissions/permission_infobar_delegate.h
@@ -14,19 +14,18 @@
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "content/public/browser/permission_type.h"
-class NavigationDetails;
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
// provide an icon and a message text to the infobar.
-class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
+class PermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
using PermissionSetCallback = base::Callback<void(bool, PermissionAction)>;
- ~PermissionInfobarDelegate() override;
+ ~PermissionInfoBarDelegate() override;
ContentSettingsType content_setting() const { return content_settings_type_; }
// Returns true if the infobar should display a toggle to allow users to
@@ -41,21 +40,20 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
base::string16 GetMessageText() const override;
protected:
- PermissionInfobarDelegate(const GURL& requesting_origin,
+ PermissionInfoBarDelegate(const GURL& requesting_origin,
content::PermissionType permission_type,
ContentSettingsType content_settings_type,
bool user_gesture,
Profile* profile,
const PermissionSetCallback& callback);
- virtual int GetMessageResourceId() const = 0;
-
private:
// ConfirmInfoBarDelegate:
Type GetInfoBarType() const override;
void InfoBarDismissed() override;
- PermissionInfobarDelegate* AsPermissionInfobarDelegate() override;
+ PermissionInfoBarDelegate* AsPermissionInfoBarDelegate() override;
base::string16 GetButtonLabel(InfoBarButton button) const override;
+ virtual int GetMessageResourceId() const = 0;
Peter Kasting 2016/08/17 23:02:22 Nit: Don't place this in the middle of the Confirm
dominickn 2016/08/17 23:29:41 Done.
bool Accept() override;
bool Cancel() override;
@@ -70,11 +68,11 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
bool user_gesture_;
bool persist_;
- DISALLOW_COPY_AND_ASSIGN(PermissionInfobarDelegate);
+ DISALLOW_COPY_AND_ASSIGN(PermissionInfoBarDelegate);
};
// Implemented in platform-specific code.
std::unique_ptr<infobars::InfoBar> CreatePermissionInfoBar(
- std::unique_ptr<PermissionInfobarDelegate> delegate);
+ std::unique_ptr<PermissionInfoBarDelegate> delegate);
#endif // CHROME_BROWSER_PERMISSIONS_PERMISSION_INFOBAR_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698