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

Unified Diff: content/browser/geolocation/geolocation_dispatcher_host.h

Issue 625963003: Do not send IPC message to cancel Geolocation permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments + rebase Created 6 years, 2 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
« no previous file with comments | « no previous file | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/geolocation/geolocation_dispatcher_host.h
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.h b/content/browser/geolocation/geolocation_dispatcher_host.h
index 36c7030d1c096a4cf916671a878384bbe9077b01..3d3e577d52f214e95cbc99181a8464aa6144d908 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.h
+++ b/content/browser/geolocation/geolocation_dispatcher_host.h
@@ -35,19 +35,21 @@ class GeolocationDispatcherHost : public WebContentsObserver {
virtual void RenderFrameDeleted(RenderFrameHost* render_frame_host) override;
virtual void RenderViewHostChanged(RenderViewHost* old_host,
RenderViewHost* new_host) override;
+ virtual void DidNavigateAnyFrame(RenderFrameHost* render_frame_host,
+ const LoadCommittedDetails& details,
+ const FrameNavigateParams& params) override;
virtual bool OnMessageReceived(
const IPC::Message& msg, RenderFrameHost* render_frame_host) override;
// Message handlers:
+ // TODO(mlamouri): |requesting_origin| should be a security origin to
+ // guarantee that a proper origin is passed.
void OnRequestPermission(RenderFrameHost* render_frame_host,
int bridge_id,
- const GURL& requesting_frame,
+ const GURL& requesting_origin,
bool user_gesture);
- void OnCancelPermissionRequest(RenderFrameHost* render_frame_host,
- int bridge_id,
- const GURL& requesting_frame);
void OnStartUpdating(RenderFrameHost* render_frame_host,
- const GURL& requesting_frame,
+ const GURL& requesting_origin,
bool enable_high_accuracy);
void OnStopUpdating(RenderFrameHost* render_frame_host);
@@ -62,6 +64,10 @@ class GeolocationDispatcherHost : public WebContentsObserver {
int bridge_id,
bool allowed);
+ // Clear pending permissions associated with a given frame and request the
+ // browser to cancel the permission requests.
+ void CancelPermissionRequestsForFrame(RenderFrameHost* render_frame_host);
+
// A map from the RenderFrameHosts that have requested geolocation updates to
// the type of accuracy they requested (true = high accuracy).
std::map<RenderFrameHost*, bool> updating_frames_;
@@ -70,11 +76,13 @@ class GeolocationDispatcherHost : public WebContentsObserver {
struct PendingPermission {
PendingPermission(int render_frame_id,
int render_process_id,
- int bridge_id);
+ int bridge_id,
+ const GURL& origin);
~PendingPermission();
int render_frame_id;
int render_process_id;
int bridge_id;
+ GURL origin;
};
std::vector<PendingPermission> pending_permissions_;
« no previous file with comments | « no previous file | content/browser/geolocation/geolocation_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698