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

Unified Diff: chrome/browser/geolocation/geolocation_infobar_queue_controller.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/geolocation/geolocation_infobar_queue_controller.cc
===================================================================
--- chrome/browser/geolocation/geolocation_infobar_queue_controller.cc (revision 175396)
+++ chrome/browser/geolocation/geolocation_infobar_queue_controller.cc (working copy)
@@ -7,7 +7,6 @@
#include "chrome/browser/api/infobars/infobar_service.h"
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/geolocation/geolocation_confirm_infobar_delegate.h"
-#include "chrome/browser/geolocation/geolocation_confirm_infobar_delegate_factory.h"
#include "chrome/browser/infobars/infobar.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -51,9 +50,7 @@
const GeolocationPermissionRequestID& id() const { return id_; }
const GURL& requesting_frame() const { return requesting_frame_; }
bool has_infobar_delegate() const { return !!infobar_delegate_; }
- GeolocationConfirmInfoBarDelegate* infobar_delegate() {
- return infobar_delegate_;
- }
+ InfoBarDelegate* infobar_delegate() { return infobar_delegate_; }
void RunCallback(bool allowed);
void CreateInfoBarDelegate(GeolocationInfoBarQueueController* controller,
@@ -64,7 +61,7 @@
GURL requesting_frame_;
GURL embedder_;
PermissionDecidedCallback callback_;
- GeolocationConfirmInfoBarDelegate* infobar_delegate_;
+ InfoBarDelegate* infobar_delegate_;
// Purposefully do not disable copying, as this is stored in STL containers.
};
@@ -99,7 +96,7 @@
void GeolocationInfoBarQueueController::PendingInfoBarRequest::
CreateInfoBarDelegate(GeolocationInfoBarQueueController* controller,
const std::string& display_languages) {
- infobar_delegate_ = GeolocationConfirmInfoBarDelegateFactory::Create(
+ infobar_delegate_ = GeolocationConfirmInfoBarDelegate::Create(
GetInfoBarService(id_), controller, id_, requesting_frame_,
display_languages);
@@ -227,7 +224,7 @@
content::Details<InfoBarRemovedDetails>(details)->first;
for (PendingInfoBarRequests::iterator i = pending_infobar_requests_.begin();
i != pending_infobar_requests_.end(); ++i) {
- GeolocationConfirmInfoBarDelegate* confirm_delegate = i->infobar_delegate();
+ InfoBarDelegate* confirm_delegate = i->infobar_delegate();
if (confirm_delegate == delegate) {
GeolocationPermissionRequestID id(i->id());
pending_infobar_requests_.erase(i);
@@ -270,7 +267,6 @@
RegisterForInfoBarNotifications(infobar_service);
i->CreateInfoBarDelegate(
this, profile_->GetPrefs()->GetString(prefs::kAcceptLanguages));
- infobar_service->AddInfoBar(i->infobar_delegate());
return;
}
}

Powered by Google App Engine
This is Rietveld 408576698