This source file includes following definitions.
- JNINamespace
- setAcceptCookie
- acceptCookie
- setCookie
- getCookie
- removeSessionCookie
- removeAllCookie
- hasCookies
- removeExpiredCookie
- flushCookieStore
- allowFileSchemeCookies
- setAcceptFileSchemeCookies
- nativeSetAcceptCookie
- nativeAcceptCookie
- nativeSetCookie
- nativeGetCookie
- nativeRemoveSessionCookie
- nativeRemoveAllCookie
- nativeRemoveExpiredCookie
- nativeFlushCookieStore
- nativeHasCookies
- nativeAllowFileSchemeCookies
- nativeSetAcceptFileSchemeCookies
package org.chromium.android_webview;
import org.chromium.base.JNINamespace;
@JNINamespace("android_webview")
public final class AwCookieManager {
public void setAcceptCookie(boolean accept) {
nativeSetAcceptCookie(accept);
}
public boolean acceptCookie() {
return nativeAcceptCookie();
}
public void setCookie(final String url, final String value) {
nativeSetCookie(url, value);
}
public String getCookie(final String url) {
String cookie = nativeGetCookie(url.toString());
return cookie == null || cookie.trim().isEmpty() ? null : cookie;
}
public void removeSessionCookie() {
nativeRemoveSessionCookie();
}
public void removeAllCookie() {
nativeRemoveAllCookie();
}
public boolean hasCookies() {
return nativeHasCookies();
}
public void removeExpiredCookie() {
nativeRemoveExpiredCookie();
}
public void flushCookieStore() {
nativeFlushCookieStore();
}
public boolean allowFileSchemeCookies() {
return nativeAllowFileSchemeCookies();
}
public void setAcceptFileSchemeCookies(boolean accept) {
nativeSetAcceptFileSchemeCookies(accept);
}
private native void nativeSetAcceptCookie(boolean accept);
private native boolean nativeAcceptCookie();
private native void nativeSetCookie(String url, String value);
private native String nativeGetCookie(String url);
private native void nativeRemoveSessionCookie();
private native void nativeRemoveAllCookie();
private native void nativeRemoveExpiredCookie();
private native void nativeFlushCookieStore();
private native boolean nativeHasCookies();
private native boolean nativeAllowFileSchemeCookies();
private native void nativeSetAcceptFileSchemeCookies(boolean accept);
}