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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month 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: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index c7d716a787dd90f15d3235deb70071d632a7e87a..0eac8e5c4b048bbb87a4e453cf02730381164464 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3669,4 +3669,20 @@ void WebContentsImpl::OnFrameRemoved(
FrameDetached(render_view_host, frame_id));
}
+void WebContentsImpl::PauseGeolocation() {
+ RenderViewHostImpl* rvh =
+ static_cast<RenderViewHostImpl*>(GetRenderViewHost());
+ if (rvh) {
+ rvh->PauseGeolocation();
+ }
+}
+
+void WebContentsImpl::ResumeGeolocation() {
+ RenderViewHostImpl* rvh =
+ static_cast<RenderViewHostImpl*>(GetRenderViewHost());
+ if (rvh) {
+ rvh->ResumeGeolocation();
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698