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

Unified Diff: chrome/browser/content_settings/permission_queue_controller.cc

Issue 22694006: Infobar system refactor. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years 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/content_settings/permission_queue_controller.cc
===================================================================
--- chrome/browser/content_settings/permission_queue_controller.cc (revision 238220)
+++ chrome/browser/content_settings/permission_queue_controller.cc (working copy)
@@ -51,7 +51,7 @@
const PermissionRequestID& id() const { return id_; }
const GURL& requesting_frame() const { return requesting_frame_; }
bool has_infobar() const { return !!infobar_; }
- InfoBarDelegate* infobar() { return infobar_; }
+ InfoBar* infobar() { return infobar_; }
void RunCallback(bool allowed);
void CreateInfoBar(PermissionQueueController* controller,
@@ -63,7 +63,7 @@
GURL requesting_frame_;
GURL embedder_;
PermissionDecidedCallback callback_;
- InfoBarDelegate* infobar_;
+ InfoBar* infobar_;
// Purposefully do not disable copying, as this is stored in STL containers.
};
@@ -196,10 +196,10 @@
if (i->IsForPair(requesting_frame, embedder)) {
requests_to_notify.push_back(*i);
if (i->id().Equals(id)) {
- // The infobar that called us is i->infobar(), and it's currently in
- // either Accept() or Cancel(). This means that RemoveInfoBar() will be
- // called later on, and that will trigger a notification we're
- // observing.
+ // The infobar that called us is i->infobar(), and its delegate is
+ // currently in either Accept() or Cancel(). This means that
+ // RemoveInfoBar() will be called later on, and that will trigger a
+ // notification we're observing.
++i;
} else if (i->has_infobar()) {
// This infobar is for the same frame/embedder pair, but in a different
@@ -240,8 +240,7 @@
// pending_infobar_requests_ will not have received any new entries between
// the NotificationService's call to InfoBarContainer::Observe and this
// method.
- InfoBarDelegate* infobar =
- content::Details<InfoBar::RemovedDetails>(details)->first;
+ InfoBar* infobar = content::Details<InfoBar::RemovedDetails>(details)->first;
for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin();
i != pending_infobar_requests_.end(); ++i) {
if (i->infobar() == infobar) {

Powered by Google App Engine
This is Rietveld 408576698