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

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

Issue 22986033: [Android WebView] Add an API to toggle the JS navigator.online property (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months 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 5ead1f7aac2a52636b6a310b46c3b2fd270c2f92..2e5642c047a31f4287e8c75b8507d682206ae5e3 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -1631,6 +1631,12 @@ public class AwContents {
mAwAutofillManagerDelegate.hideAutofillPopup();
}
+ public void setNetworkAvailable(boolean networkUp) {
+ if(mNativeAwContents != 0) {
joth 2013/08/25 21:13:04 nit: space after if. in the rest of this file we
benm (inactive) 2013/08/27 09:46:36 Done.
+ nativeSetJsOnlineProperty(mNativeAwContents, networkUp);
+ }
+ }
+
//--------------------------------------------------------------------------------------------
// Methods called from native via JNI
//--------------------------------------------------------------------------------------------
@@ -1909,4 +1915,6 @@ public class AwContents {
private native void nativeInvokeGeolocationCallback(
int nativeAwContents, boolean value, String requestingFrame);
+
+ private native void nativeSetJsOnlineProperty(int nativeAwContents, boolean networkUp);
}

Powered by Google App Engine
This is Rietveld 408576698