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

Unified Diff: content/browser/renderer_host/render_view_host_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: joth comments 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/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 8d36fd2c76d982582636a78efca1b1921435d967..48d59d4631d9080d18ccde5b12fe0a31c7d5d25f 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -832,6 +832,22 @@ void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() {
}
#endif
+void RenderViewHostImpl::PauseGeolocation() {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&GeolocationDispatcherHost::PauseOrResume,
+ static_cast<RenderProcessHostImpl*>(GetProcess())->
+ geolocation_dispatcher_host(), GetRoutingID(), true));
+}
+
+void RenderViewHostImpl::ResumeGeolocation() {
+ BrowserThread::PostTask(
+ BrowserThread::IO, FROM_HERE,
+ base::Bind(&GeolocationDispatcherHost::PauseOrResume,
+ static_cast<RenderProcessHostImpl*>(GetProcess())->
+ geolocation_dispatcher_host(), GetRoutingID(), false));
+}
+
void RenderViewHostImpl::DragTargetDragEnter(
const DropData& drop_data,
const gfx::Point& client_pt,

Powered by Google App Engine
This is Rietveld 408576698