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 #include "android_webview/native/aw_quota_manager_bridge_impl.h" | 5 #include "android_webview/native/aw_quota_manager_bridge_impl.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "android_webview/browser/aw_browser_context.h" | 9 #include "android_webview/browser/aw_browser_context.h" |
10 #include "android_webview/browser/aw_content_browser_client.h" | 10 #include "android_webview/browser/aw_content_browser_client.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 task.Run(); | 148 task.Run(); |
149 } else { | 149 } else { |
150 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, task); | 150 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, task); |
151 } | 151 } |
152 } | 152 } |
153 | 153 |
154 } // namespace | 154 } // namespace |
155 | 155 |
156 | 156 |
157 // static | 157 // static |
158 jlong GetDefaultNativeAwQuotaManagerBridge(JNIEnv* env, jclass clazz) { | 158 jlong GetDefaultNativeAwQuotaManagerBridge(JNIEnv* env, |
| 159 const JavaParamRef<jclass>& clazz) { |
159 AwBrowserContext* browser_context = | 160 AwBrowserContext* browser_context = |
160 AwContentBrowserClient::GetAwBrowserContext(); | 161 AwContentBrowserClient::GetAwBrowserContext(); |
161 | 162 |
162 AwQuotaManagerBridgeImpl* bridge = static_cast<AwQuotaManagerBridgeImpl*>( | 163 AwQuotaManagerBridgeImpl* bridge = static_cast<AwQuotaManagerBridgeImpl*>( |
163 browser_context->GetQuotaManagerBridge()); | 164 browser_context->GetQuotaManagerBridge()); |
164 DCHECK(bridge); | 165 DCHECK(bridge); |
165 return reinterpret_cast<intptr_t>(bridge); | 166 return reinterpret_cast<intptr_t>(bridge); |
166 } | 167 } |
167 | 168 |
168 // static | 169 // static |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 350 |
350 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( | 351 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( |
351 env, obj.obj(), jcallback_id, is_quota, usage, quota); | 352 env, obj.obj(), jcallback_id, is_quota, usage, quota); |
352 } | 353 } |
353 | 354 |
354 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { | 355 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { |
355 return RegisterNativesImpl(env); | 356 return RegisterNativesImpl(env); |
356 } | 357 } |
357 | 358 |
358 } // namespace android_webview | 359 } // namespace android_webview |
OLD | NEW |