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 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 166 } |
167 | 167 |
168 // static | 168 // static |
169 scoped_refptr<AwQuotaManagerBridge> AwQuotaManagerBridgeImpl::Create( | 169 scoped_refptr<AwQuotaManagerBridge> AwQuotaManagerBridgeImpl::Create( |
170 AwBrowserContext* browser_context) { | 170 AwBrowserContext* browser_context) { |
171 return new AwQuotaManagerBridgeImpl(browser_context); | 171 return new AwQuotaManagerBridgeImpl(browser_context); |
172 } | 172 } |
173 | 173 |
174 AwQuotaManagerBridgeImpl::AwQuotaManagerBridgeImpl( | 174 AwQuotaManagerBridgeImpl::AwQuotaManagerBridgeImpl( |
175 AwBrowserContext* browser_context) | 175 AwBrowserContext* browser_context) |
176 : weak_factory_(this), | 176 : browser_context_(browser_context), |
177 browser_context_(browser_context) { | 177 weak_factory_(this) { |
178 } | 178 } |
179 | 179 |
180 AwQuotaManagerBridgeImpl::~AwQuotaManagerBridgeImpl() {} | 180 AwQuotaManagerBridgeImpl::~AwQuotaManagerBridgeImpl() {} |
181 | 181 |
182 void AwQuotaManagerBridgeImpl::Init(JNIEnv* env, jobject object) { | 182 void AwQuotaManagerBridgeImpl::Init(JNIEnv* env, jobject object) { |
183 java_ref_ = JavaObjectWeakGlobalRef(env, object); | 183 java_ref_ = JavaObjectWeakGlobalRef(env, object); |
184 } | 184 } |
185 | 185 |
186 StoragePartition* AwQuotaManagerBridgeImpl::GetStoragePartition() const { | 186 StoragePartition* AwQuotaManagerBridgeImpl::GetStoragePartition() const { |
187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 187 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( | 350 Java_AwQuotaManagerBridge_onGetUsageAndQuotaForOriginCallback( |
351 env, obj.obj(), jcallback_id, is_quota, usage, quota); | 351 env, obj.obj(), jcallback_id, is_quota, usage, quota); |
352 } | 352 } |
353 | 353 |
354 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { | 354 bool RegisterAwQuotaManagerBridge(JNIEnv* env) { |
355 return RegisterNativesImpl(env); | 355 return RegisterNativesImpl(env); |
356 } | 356 } |
357 | 357 |
358 } // namespace android_webview | 358 } // namespace android_webview |
OLD | NEW |