summaryrefslogtreecommitdiffstats
path: root/content/browser/geolocation/geolocation_dispatcher_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/geolocation/geolocation_dispatcher_host.cc')
-rw-r--r--content/browser/geolocation/geolocation_dispatcher_host.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc
index ad1f2fc..75abab5 100644
--- a/content/browser/geolocation/geolocation_dispatcher_host.cc
+++ b/content/browser/geolocation/geolocation_dispatcher_host.cc
@@ -130,6 +130,15 @@ void GeolocationDispatcherHost::OnLocationUpdate(
for (std::map<RenderFrameHost*, bool>::iterator i = updating_frames_.begin();
i != updating_frames_.end(); ++i) {
+ RenderFrameHost* top_frame = i->first;
+ while (top_frame->GetParent()) {
+ top_frame = top_frame->GetParent();
+ }
+ GetContentClient()->browser()->DidUseGeolocationPermission(
+ web_contents(),
+ i->first->GetLastCommittedURL().GetOrigin(),
+ top_frame->GetLastCommittedURL().GetOrigin());
+
i->first->Send(new GeolocationMsg_PositionUpdated(
i->first->GetRoutingID(), geoposition));
}