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

Unified Diff: content/browser/android/content_view_core_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/android/content_view_core_impl.cc
diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc
index ba493a94b2d70b3d58a9f80b1d7aaf7a4dbf8787..43af9d955be991caf4b06057c1c8f2250d31ed56 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -348,6 +348,22 @@ void ContentViewCoreImpl::PauseVideo() {
host->Send(new ViewMsg_PauseVideo(host->GetRoutingID()));
}
+void ContentViewCoreImpl::PauseGeolocation() {
+ RenderViewHostImpl* rvh =
+ static_cast<RenderViewHostImpl*>(web_contents_->GetRenderViewHost());
+ if (rvh) {
+ rvh->PauseGeolocation();
+ }
joth 2013/11/10 17:59:02 I think we could skip the RenderViewHostImpl altog
benm (inactive) 2013/11/11 14:50:41 Done.
+}
+
+void ContentViewCoreImpl::ResumeGeolocation() {
+ RenderViewHostImpl* rvh =
+ static_cast<RenderViewHostImpl*>(web_contents_->GetRenderViewHost());
+ if (rvh) {
+ rvh->ResumeGeolocation();
+ }
+}
+
void ContentViewCoreImpl::OnTabCrashed() {
JNIEnv* env = AttachCurrentThread();
ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);

Powered by Google App Engine
This is Rietveld 408576698