| Index: android_webview/native/aw_quota_manager_bridge.cc
|
| diff --git a/android_webview/native/aw_quota_manager_bridge.cc b/android_webview/native/aw_quota_manager_bridge.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e7810475814f5cf7c13a3f10f5111e8a051d53ca
|
| --- /dev/null
|
| +++ b/android_webview/native/aw_quota_manager_bridge.cc
|
| @@ -0,0 +1,65 @@
|
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "android_webview/native/aw_quota_manager_bridge.h"
|
| +
|
| +#include "android_webview/browser/aw_browser_context.h"
|
| +#include "android_webview/browser/aw_content_browser_client.h"
|
| +#include "content/public/common/content_client.h"
|
| +#include "jni/AwQuotaManagerBridge_jni.h"
|
| +
|
| +
|
| +namespace android_webview {
|
| +
|
| +// static
|
| +jint getDefaultNativeAwQuotaManagerBridge(JNIEnv* env, jclass clazz) {
|
| + content::ContentBrowserClient* cbc = content::GetContentClient()->browser();
|
| + DCHECK(cbc);
|
| +
|
| + AwContentBrowserClient* acbc =
|
| + AwContentBrowserClient::FromContentBrowserClient(cbc);
|
| + AwBrowserContext* browser_context = acbc->GetAwBrowserContext();
|
| + DCHECK(browser_context);
|
| +
|
| + return reinterpret_cast<jint>(browser_context);
|
| +}
|
| +
|
| +// static
|
| +AwQuotaManagerBridge* AwQuotaManagerBridge::Create(
|
| + AwBrowserContext* browser_context) {
|
| + return new AwQuotaManagerBridge(browser_context);
|
| +}
|
| +
|
| +AwQuotaManagerBridge::AwQuotaManagerBridge(AwBrowserContext* browser_context)
|
| + : browser_context_(browser_context) {
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::Init(JNIEnv* env, jobject object) {
|
| + java_ref_ = JavaObjectWeakGlobalRef(env, object);
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::DeleteAllData(JNIEnv* env, jobject object) {
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::DeleteOrigin(
|
| + JNIEnv* env, jobject object, jobject origin) {
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::GetOrigins(
|
| + JNIEnv* env, jobject object, jint callback_id) {
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::GetQuotaForOrigin(
|
| + JNIEnv* env, jobject object, jobject origin, jint callback_id) {
|
| +}
|
| +
|
| +void AwQuotaManagerBridge::GetUsageForOrigin(
|
| + JNIEnv* env, jobject object, jobject origin, jint callback_id) {
|
| +}
|
| +
|
| +bool RegisterAwQuotaManagerBridge(JNIEnv* env) {
|
| + return RegisterNativesImpl(env) >= 0;
|
| +}
|
| +
|
| +} // namespace android_webview
|
|
|