Chromium Code Reviews| Index: content/browser/geolocation/geolocation_dispatcher_host.cc |
| diff --git a/content/browser/geolocation/geolocation_dispatcher_host.cc b/content/browser/geolocation/geolocation_dispatcher_host.cc |
| index ad1f2fcc4441f138726f67d6f0e8e049302e5962..323eb6fb0fba08e3250afb3242e2f18f5bbcce43 100644 |
| --- a/content/browser/geolocation/geolocation_dispatcher_host.cc |
| +++ b/content/browser/geolocation/geolocation_dispatcher_host.cc |
| @@ -21,6 +21,8 @@ |
| namespace content { |
| namespace { |
| +const char kGeolocationPermission[] = "geolocation"; |
| + |
| // Geoposition error codes for reporting in UMA. |
| enum GeopositionErrorCode { |
| // NOTE: Do not renumber these as that would confuse interpretation of |
| @@ -130,6 +132,16 @@ void GeolocationDispatcherHost::OnLocationUpdate( |
| for (std::map<RenderFrameHost*, bool>::iterator i = updating_frames_.begin(); |
| i != updating_frames_.end(); ++i) { |
| + RenderFrameHost* topFrame = i->first; |
| + while (topFrame->GetParent()) { |
| + topFrame = topFrame->GetParent(); |
| + } |
| + GetContentClient()->browser()->UseContentSettingPermission( |
| + web_contents(), |
| + topFrame->GetLastCommittedURL().GetOrigin(), |
|
Michael van Ouwerkerk
2014/07/08 17:02:18
Sorry to keep going on about this, but from what I
Daniel Nishi
2014/07/08 18:14:35
I think I understand now. So this change here shou
|
| + topFrame->GetLastCommittedURL().GetOrigin(), |
| + kGeolocationPermission); |
| + |
| i->first->Send(new GeolocationMsg_PositionUpdated( |
| i->first->GetRoutingID(), geoposition)); |
| } |