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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 65273002: Add a mechanism to pause and resume geolocation requests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Wire up onPause/onResume 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: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index 248bb62bbb83ec5319b1b2f9dc242850b3d9b1e5..b4cd4c7d89cd565bc40650175fd7e3d16f726dfd 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1183,6 +1183,7 @@ public class AwContents {
*/
public void pauseTimers() {
ContentViewStatics.setWebKitSharedTimersSuspended(true);
+ nativePauseOrResumeGeolocation(true);
}
/**
@@ -1190,6 +1191,7 @@ public class AwContents {
*/
public void resumeTimers() {
ContentViewStatics.setWebKitSharedTimersSuspended(false);
+ nativePauseOrResumeGeolocation(false);
}
/**
@@ -2080,4 +2082,5 @@ public class AwContents {
private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean networkUp);
private native void nativeTrimMemory(int nativeAwContents, int level);
+ private static native void nativePauseOrResumeGeolocation(boolean shouldPause);
}

Powered by Google App Engine
This is Rietveld 408576698