This source file includes following definitions.
- GetFormDatabaseService
- HasFormData
- ClearFormData
- RegisterAwFormDatabase
#include "android_webview/native/aw_form_database.h"
#include "android_webview/browser/aw_browser_context.h"
#include "android_webview/browser/aw_content_browser_client.h"
#include "android_webview/browser/aw_form_database_service.h"
#include "base/android/jni_android.h"
#include "base/logging.h"
#include "base/time/time.h"
#include "jni/AwFormDatabase_jni.h"
namespace android_webview {
namespace {
AwFormDatabaseService* GetFormDatabaseService() {
AwBrowserContext* context = AwContentBrowserClient::GetAwBrowserContext();
AwFormDatabaseService* service = context->GetFormDatabaseService();
return service;
}
}
jboolean HasFormData(JNIEnv*, jclass) {
return GetFormDatabaseService()->HasFormData();
}
void ClearFormData(JNIEnv*, jclass) {
GetFormDatabaseService()->ClearFormData();
}
bool RegisterAwFormDatabase(JNIEnv* env) {
return RegisterNativesImpl(env) >= 0;
}
}