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

Unified Diff: chrome/browser/geolocation/geolocation_permission_context.h

Issue 454253002: Location chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Swapping to address InfoBar currying callback case Created 6 years, 4 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_permission_context.h
diff --git a/chrome/browser/geolocation/geolocation_permission_context.h b/chrome/browser/geolocation/geolocation_permission_context.h
index 4017210d402815d755a35e3383a687efc9eda780..41fba26d8e805b5ed032a0372973d70fc8474d13 100644
--- a/chrome/browser/geolocation/geolocation_permission_context.h
+++ b/chrome/browser/geolocation/geolocation_permission_context.h
@@ -36,7 +36,7 @@ class GeolocationPermissionContext
int bridge_id,
const GURL& requesting_frame,
bool user_gesture,
- base::Callback<void(bool)> result_callback,
+ base::Callback<void(int, bool)> result_callback,
base::Closure* cancel_callback);
// Called on the UI thread when the profile is about to be destroyed.
@@ -46,10 +46,19 @@ class GeolocationPermissionContext
// geolocation via
// GeolocationPermissionContext::SetGeolocationPermissionResponse().
// Called on the UI thread.
+ void NotifyInfoBarPermissionSet(const PermissionRequestID& id,
+ const GURL& requesting_frame,
+ base::Callback<void(bool)> callback,
+ bool allowed);
void NotifyPermissionSet(const PermissionRequestID& id,
const GURL& requesting_frame,
- base::Callback<void(bool)> callback,
+ base::Callback<void(int, bool)> callback,
bool allowed);
+ void NotifyPermissionSet(const PermissionRequestID& id,
+ const GURL& requesting_frame,
+ base::Callback<void(int, bool)> callback,
+ bool allowed,
+ int choice);
protected:
virtual ~GeolocationPermissionContext();
@@ -75,7 +84,7 @@ class GeolocationPermissionContext
const GURL& requesting_frame,
bool user_gesture,
const GURL& embedder,
- base::Callback<void(bool)> callback);
+ base::Callback<void(int, bool)> callback);
// Called when permission is granted without interactively asking
// the user. Can be overridden to introduce additional UI flow.
@@ -84,7 +93,7 @@ class GeolocationPermissionContext
virtual void PermissionDecided(const PermissionRequestID& id,
const GURL& requesting_frame,
const GURL& embedder,
- base::Callback<void(bool)> callback,
+ base::Callback<void(int, bool)> callback,
bool allowed);
// Create an PermissionQueueController. overriden in derived classes to

Powered by Google App Engine
This is Rietveld 408576698