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

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

Issue 1332293002: permissions: switch from explicitly passing queue controller to callbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unecessary includes Created 5 years, 3 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 14a2fe8cfabeda3336ee755029bc08c499354a91..198d9ca33afcbbccf6cc3c2ec0c6cec02f46ff20 100644
--- a/chrome/browser/permissions/permission_infobar_delegate.h
+++ b/chrome/browser/permissions/permission_infobar_delegate.h
@@ -12,7 +12,6 @@
#include "content/public/browser/web_contents.h"
class NavigationDetails;
-class PermissionQueueController;
// Base class for permission infobars, it implements the default behavior
// so that the accept/deny buttons grant/deny the relevant permission.
@@ -24,10 +23,10 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
ContentSettingsType content_setting() const { return type_; }
protected:
- PermissionInfobarDelegate(PermissionQueueController* controller,
- const PermissionRequestID& id,
+ PermissionInfobarDelegate(const PermissionRequestID& id,
mlamouri (slow - plz ping) 2015/09/15 12:55:59 Do you still need this? |id| doesn't seem to be us
Lalit Maganti 2015/09/15 14:19:25 Done.
const GURL& requesting_origin,
- ContentSettingsType type);
+ ContentSettingsType type,
+ const base::Callback<void(bool, bool)>& callback);
mlamouri (slow - plz ping) 2015/09/15 12:55:59 nit: could you name the callback so readers know
Lalit Maganti 2015/09/15 14:19:24 Done.
~PermissionInfobarDelegate() override;
private:
@@ -41,11 +40,11 @@ class PermissionInfobarDelegate : public ConfirmInfoBarDelegate {
void SetPermission(bool update_content_setting, bool allowed);
- PermissionQueueController* controller_; // not owned by us
const PermissionRequestID id_;
GURL requesting_origin_;
bool action_taken_;
ContentSettingsType type_;
+ const base::Callback<void(bool, bool)> callback_;
DISALLOW_COPY_AND_ASSIGN(PermissionInfobarDelegate);
};

Powered by Google App Engine
This is Rietveld 408576698