| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_contents_statics.h" | 5 #include "android_webview/native/aw_contents_statics.h" |
| 6 | 6 |
| 7 #include "android_webview/browser/aw_browser_context.h" | 7 #include "android_webview/browser/aw_browser_context.h" |
| 8 #include "android_webview/browser/net/aw_url_request_context_getter.h" | 8 #include "android_webview/browser/net/aw_url_request_context_getter.h" |
| 9 #include "android_webview/common/aw_version_info_values.h" | 9 #include "android_webview/common/aw_version_info_values.h" |
| 10 #include "android_webview/native/aw_contents_io_thread_client_impl.h" |
| 10 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 11 #include "base/android/scoped_java_ref.h" | 12 #include "base/android/scoped_java_ref.h" |
| 12 #include "base/callback.h" | 13 #include "base/callback.h" |
| 13 #include "content/public/browser/browser_thread.h" | 14 #include "content/public/browser/browser_thread.h" |
| 14 #include "content/public/common/url_constants.h" | 15 #include "content/public/common/url_constants.h" |
| 15 #include "jni/AwContentsStatics_jni.h" | 16 #include "jni/AwContentsStatics_jni.h" |
| 16 #include "net/cert/cert_database.h" | 17 #include "net/cert/cert_database.h" |
| 17 | 18 |
| 18 using base::android::AttachCurrentThread; | 19 using base::android::AttachCurrentThread; |
| 19 using base::android::ConvertJavaStringToUTF8; | 20 using base::android::ConvertJavaStringToUTF8; |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 jlong delay_ms) { | 96 jlong delay_ms) { |
| 96 AwBrowserContext::SetLegacyCacheRemovalDelayForTest(delay_ms); | 97 AwBrowserContext::SetLegacyCacheRemovalDelayForTest(delay_ms); |
| 97 } | 98 } |
| 98 | 99 |
| 99 // static | 100 // static |
| 100 ScopedJavaLocalRef<jstring> GetProductVersion(JNIEnv* env, | 101 ScopedJavaLocalRef<jstring> GetProductVersion(JNIEnv* env, |
| 101 const JavaParamRef<jclass>&) { | 102 const JavaParamRef<jclass>&) { |
| 102 return base::android::ConvertUTF8ToJavaString(env, PRODUCT_VERSION); | 103 return base::android::ConvertUTF8ToJavaString(env, PRODUCT_VERSION); |
| 103 } | 104 } |
| 104 | 105 |
| 106 // static |
| 107 void SetServiceWorkerIoThreadClient( |
| 108 JNIEnv* env, |
| 109 const JavaParamRef<jclass>&, |
| 110 const base::android::JavaParamRef<jobject>& io_thread_client, |
| 111 const base::android::JavaParamRef<jobject>& browser_context) { |
| 112 AwContentsIoThreadClientImpl::SetServiceWorkerIoThreadClient( |
| 113 io_thread_client, browser_context); |
| 114 } |
| 115 |
| 116 |
| 105 bool RegisterAwContentsStatics(JNIEnv* env) { | 117 bool RegisterAwContentsStatics(JNIEnv* env) { |
| 106 return RegisterNativesImpl(env); | 118 return RegisterNativesImpl(env); |
| 107 } | 119 } |
| 108 | 120 |
| 109 } // namespace android_webview | 121 } // namespace android_webview |
| OLD | NEW |