summaryrefslogtreecommitdiffstats
path: root/android_webview/browser/jni_dependency_factory.h
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 18:53:04 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-22 18:53:04 +0000
commit2a3a0596a6a5d0703ff49df9d45fd57e9db96959 (patch)
tree77b52f512dd593a3c9a9a335c02c8c5065aadb37 /android_webview/browser/jni_dependency_factory.h
parent6f356a88e6587d7d206f6327b0771e810609cf70 (diff)
downloadchromium_src-2a3a0596a6a5d0703ff49df9d45fd57e9db96959.zip
chromium_src-2a3a0596a6a5d0703ff49df9d45fd57e9db96959.tar.gz
chromium_src-2a3a0596a6a5d0703ff49df9d45fd57e9db96959.tar.bz2
Implement WebStorage API methods
Most of the methods involves calling methods to QuotaManager on the IO thread and translating the arguments between Java and native code. Introduce AwQuotaManagerBridge to facilitate this logic. The Java AwQuotaManagerBridge is currently a singleton but should be owned by AwBrowserContext when we have one. The native one is owned by native AwBrowserContext. Java calls the corresponding native AwBrowserContext to obtain the pointer. Introduced JniDependencyFactory interface used to create native objects under native but is used or passed in BrowserContext or ContentsBrowserClient. Also added base::android::ToJavaLongArray to convert to Java long arrays. BUG= Android only change. Ran through android bots. NOTRY=true Review URL: https://chromiumcodereview.appspot.com/12253057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview/browser/jni_dependency_factory.h')
-rw-r--r--android_webview/browser/jni_dependency_factory.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/android_webview/browser/jni_dependency_factory.h b/android_webview/browser/jni_dependency_factory.h
new file mode 100644
index 0000000..4adcc25
--- /dev/null
+++ b/android_webview/browser/jni_dependency_factory.h
@@ -0,0 +1,34 @@
+// 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.
+
+#ifndef ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
+#define ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_
+
+namespace content {
+class GeolocationPermissionContext;
+class WebContents;
+class WebContentsViewDelegate;
+} // namespace content
+
+namespace android_webview {
+
+class AwBrowserContext;
+class AwQuotaManagerBridge;
+
+// Used to create instances of objects under native that are used in browser.
+class JniDependencyFactory {
+ public:
+ virtual ~JniDependencyFactory() {}
+
+ virtual AwQuotaManagerBridge* CreateAwQuotaManagerBridge(
+ AwBrowserContext* browser_context) = 0;
+ virtual content::GeolocationPermissionContext* CreateGeolocationPermission(
+ AwBrowserContext* browser_context) = 0;
+ virtual content::WebContentsViewDelegate* CreateViewDelegate(
+ content::WebContents* web_contents) = 0;
+};
+
+} // namespace android_webview
+
+#endif // ANDROID_WEBVIEW_BROWSER_JNI_DEPENDENCY_FACTORY_H_