summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation/geolocation_infobar_queue_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/geolocation/geolocation_infobar_queue_controller.h')
-rw-r--r--chrome/browser/geolocation/geolocation_infobar_queue_controller.h33
1 files changed, 20 insertions, 13 deletions
diff --git a/chrome/browser/geolocation/geolocation_infobar_queue_controller.h b/chrome/browser/geolocation/geolocation_infobar_queue_controller.h
index dd8543d..10c6094 100644
--- a/chrome/browser/geolocation/geolocation_infobar_queue_controller.h
+++ b/chrome/browser/geolocation/geolocation_infobar_queue_controller.h
@@ -10,6 +10,7 @@
#include "content/public/browser/notification_registrar.h"
class GURL;
+class GeolocationConfirmInfoBarDelegate;
class InfoBarTabHelper;
class Profile;
@@ -23,16 +24,9 @@ class Profile;
// the notification infrastructure would simplify.
class GeolocationInfoBarQueueController : content::NotificationObserver {
public:
- typedef base::Callback<void(int /* render_process_id */,
- int /* render_view_id */,
- int /* bridge_id */,
- const GURL& /* requesting_frame */,
- base::Callback<void(bool)> /* callback */,
- bool /* allowed */)> NotifyPermissionSetCallback;
-
- GeolocationInfoBarQueueController(
- NotifyPermissionSetCallback notify_permission_set_callback,
- Profile* profile);
+ typedef base::Callback<void(bool /* allowed */)> PermissionDecidedCallback;
+
+ explicit GeolocationInfoBarQueueController(Profile* profile);
virtual ~GeolocationInfoBarQueueController();
// The InfoBar will be displayed immediately if the tab is not already
@@ -41,8 +35,8 @@ class GeolocationInfoBarQueueController : content::NotificationObserver {
int render_view_id,
int bridge_id,
const GURL& requesting_frame,
- const GURL& emebedder,
- base::Callback<void(bool)> callback);
+ const GURL& embedder,
+ PermissionDecidedCallback callback);
// Cancels a specific infobar request.
void CancelInfoBarRequest(int render_process_id,
@@ -57,6 +51,7 @@ class GeolocationInfoBarQueueController : content::NotificationObserver {
int bridge_id,
const GURL& requesting_frame,
const GURL& embedder,
+ bool update_content_setting,
bool allowed);
// content::NotificationObserver
@@ -64,6 +59,19 @@ class GeolocationInfoBarQueueController : content::NotificationObserver {
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ protected:
+ // Create an Infobar delegate to ask the whether the requesting frame
+ // url should be granted geolocation permission. Overrided in
+ // derived classes to implement alternative UI.
+ virtual GeolocationConfirmInfoBarDelegate* CreateInfoBarDelegate(
+ InfoBarTabHelper* infobar_helper,
+ GeolocationInfoBarQueueController* controller,
+ int render_process_id,
+ int render_view_id,
+ int bridge_id,
+ const GURL& requesting_frame_url,
+ const std::string& display_languages);
+
private:
struct PendingInfoBarRequest;
class RequestEquals;
@@ -86,7 +94,6 @@ class GeolocationInfoBarQueueController : content::NotificationObserver {
content::NotificationRegistrar registrar_;
- NotifyPermissionSetCallback notify_permission_set_callback_;
Profile* const profile_;
PendingInfoBarRequests pending_infobar_requests_;
};