diff options
Diffstat (limited to 'chromium/content/browser/geolocation')
-rw-r--r-- | chromium/content/browser/geolocation/geolocation_service_impl.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chromium/content/browser/geolocation/geolocation_service_impl.cc b/chromium/content/browser/geolocation/geolocation_service_impl.cc index 8a8ef43833c..7e53cb93fea 100644 --- a/chromium/content/browser/geolocation/geolocation_service_impl.cc +++ b/chromium/content/browser/geolocation/geolocation_service_impl.cc @@ -11,6 +11,7 @@ #include "content/public/browser/permission_type.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" +#include "content/public/browser/web_contents.h" #include "mojo/public/cpp/bindings/callback_helpers.h" #include "third_party/blink/public/mojom/feature_policy/feature_policy.mojom.h" @@ -103,7 +104,11 @@ void GeolocationServiceImpl::CreateGeolocationWithPermissionStatus( if (permission_status != blink::mojom::PermissionStatus::GRANTED) return; - geolocation_context_->BindGeolocation(std::move(receiver)); + WebContents* web_contents = + WebContents::FromRenderFrameHost(render_frame_host_); + + geolocation_context_->BindGeolocation( + std::move(receiver), web_contents->GetLastCommittedURL().GetOrigin()); } } // namespace content |