This source file includes following definitions.
- getGeolocationPermissions
- getCookieManager
- getFormDatabase
- getHttpAuthDatabase
- pauseTimers
- resumeTimers
package org.chromium.android_webview;
import android.content.Context;
import android.content.SharedPreferences;
import org.chromium.content.browser.ContentViewStatics;
public class AwBrowserContext {
private static final String HTTP_AUTH_DATABASE_FILE = "http_auth.db";
private SharedPreferences mSharedPreferences;
private AwGeolocationPermissions mGeolocationPermissions;
private AwCookieManager mCookieManager;
private AwFormDatabase mFormDatabase;
private HttpAuthDatabase mHttpAuthDatabase;
public AwBrowserContext(SharedPreferences sharedPreferences) {
mSharedPreferences = sharedPreferences;
}
public AwGeolocationPermissions getGeolocationPermissions() {
if (mGeolocationPermissions == null) {
mGeolocationPermissions = new AwGeolocationPermissions(mSharedPreferences);
}
return mGeolocationPermissions;
}
public AwCookieManager getCookieManager() {
if (mCookieManager == null) {
mCookieManager = new AwCookieManager();
}
return mCookieManager;
}
public AwFormDatabase getFormDatabase() {
if (mFormDatabase == null) {
mFormDatabase = new AwFormDatabase();
}
return mFormDatabase;
}
public HttpAuthDatabase getHttpAuthDatabase(Context context) {
if (mHttpAuthDatabase == null) {
mHttpAuthDatabase = new HttpAuthDatabase(context, HTTP_AUTH_DATABASE_FILE);
}
return mHttpAuthDatabase;
}
public void pauseTimers() {
ContentViewStatics.setWebKitSharedTimersSuspended(true);
}
public void resumeTimers() {
ContentViewStatics.setWebKitSharedTimersSuspended(false);
}
}