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

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

Issue 2443463003: Remove PermissionInfoBarDelegate from desktop builds. (Closed)
Patch Set: Add comment explaining lifetime Created 4 years, 2 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 96e82c9396fedf16d176e66b2cd9657efe419fff..6f2ef7940e4fbb74d9dbe71907d94e420fe53481 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.h
+++ b/chrome/browser/permissions/permission_infobar_delegate.h
@@ -14,7 +14,13 @@
#include "components/content_settings/core/common/content_settings_types.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "content/public/browser/permission_type.h"
+#include "url/gurl.h"
+namespace infobars {
+class InfoBar;
+}
+
+class InfoBarService;
class Profile;
// Base class for permission infobars, it implements the default behavior
@@ -26,6 +32,16 @@ class PermissionInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
using PermissionSetCallback = base::Callback<void(bool, PermissionAction)>;
+ // Creates an infobar for |type|. The returned pointer is owned by
+ // |infobar_service| and manages its own lifetime; callers must only use it
+ // for calls to |infobar_service|.
+ static infobars::InfoBar* Create(content::PermissionType type,
+ InfoBarService* infobar_service,
+ const GURL& requesting_frame,
+ bool user_gesture,
+ Profile* profile,
+ const PermissionSetCallback& callback);
+
~PermissionInfoBarDelegate() override;
virtual std::vector<int> content_settings() const;

Powered by Google App Engine
This is Rietveld 408576698