OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ | 5 #ifndef ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ |
6 #define ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ | 6 #define ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 19 matching lines...) Expand all Loading... |
30 namespace android_webview { | 30 namespace android_webview { |
31 | 31 |
32 class AwBrowserContext; | 32 class AwBrowserContext; |
33 | 33 |
34 class AwQuotaManagerBridgeImpl : public AwQuotaManagerBridge { | 34 class AwQuotaManagerBridgeImpl : public AwQuotaManagerBridge { |
35 public: | 35 public: |
36 static scoped_refptr<AwQuotaManagerBridge> Create( | 36 static scoped_refptr<AwQuotaManagerBridge> Create( |
37 AwBrowserContext* browser_context); | 37 AwBrowserContext* browser_context); |
38 | 38 |
39 // Called by Java. | 39 // Called by Java. |
40 void Init(JNIEnv* env, jobject object); | 40 void Init(JNIEnv* env, const base::android::JavaParamRef<jobject>& object); |
41 void DeleteAllData(JNIEnv* env, jobject object); | 41 void DeleteAllData(JNIEnv* env, |
42 void DeleteOrigin(JNIEnv* env, jobject object, jstring origin); | 42 const base::android::JavaParamRef<jobject>& object); |
43 void GetOrigins(JNIEnv* env, jobject object, jint callback_id); | 43 void DeleteOrigin(JNIEnv* env, |
44 void GetUsageAndQuotaForOrigin(JNIEnv* env, | 44 const base::android::JavaParamRef<jobject>& object, |
45 jobject object, | 45 const base::android::JavaParamRef<jstring>& origin); |
46 jstring origin, | 46 void GetOrigins(JNIEnv* env, |
47 jint callback_id, | 47 const base::android::JavaParamRef<jobject>& object, |
48 bool is_quota); | 48 jint callback_id); |
| 49 void GetUsageAndQuotaForOrigin( |
| 50 JNIEnv* env, |
| 51 const base::android::JavaParamRef<jobject>& object, |
| 52 const base::android::JavaParamRef<jstring>& origin, |
| 53 jint callback_id, |
| 54 bool is_quota); |
49 | 55 |
50 typedef base::Callback< | 56 typedef base::Callback< |
51 void(const std::vector<std::string>& /* origin */, | 57 void(const std::vector<std::string>& /* origin */, |
52 const std::vector<int64>& /* usage */, | 58 const std::vector<int64>& /* usage */, |
53 const std::vector<int64>& /* quota */)> GetOriginsCallback; | 59 const std::vector<int64>& /* quota */)> GetOriginsCallback; |
54 typedef base::Callback<void(int64 /* usage */, | 60 typedef base::Callback<void(int64 /* usage */, |
55 int64 /* quota */)> QuotaUsageCallback; | 61 int64 /* quota */)> QuotaUsageCallback; |
56 | 62 |
57 private: | 63 private: |
58 explicit AwQuotaManagerBridgeImpl(AwBrowserContext* browser_context); | 64 explicit AwQuotaManagerBridgeImpl(AwBrowserContext* browser_context); |
(...skipping 24 matching lines...) Expand all Loading... |
83 base::WeakPtrFactory<AwQuotaManagerBridgeImpl> weak_factory_; | 89 base::WeakPtrFactory<AwQuotaManagerBridgeImpl> weak_factory_; |
84 | 90 |
85 DISALLOW_COPY_AND_ASSIGN(AwQuotaManagerBridgeImpl); | 91 DISALLOW_COPY_AND_ASSIGN(AwQuotaManagerBridgeImpl); |
86 }; | 92 }; |
87 | 93 |
88 bool RegisterAwQuotaManagerBridge(JNIEnv* env); | 94 bool RegisterAwQuotaManagerBridge(JNIEnv* env); |
89 | 95 |
90 } // namespace android_webview | 96 } // namespace android_webview |
91 | 97 |
92 #endif // ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ | 98 #endif // ANDROID_WEBVIEW_NATIVE_AW_QUOTA_MANAGER_BRIDGE_IMPL_H_ |
OLD | NEW |