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 "base/android/jni_string.h" | 10 #include "base/android/jni_string.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 aw_url_request_context_getter, | 70 aw_url_request_context_getter, |
71 ConvertJavaStringToUTF8(env, key))); | 71 ConvertJavaStringToUTF8(env, key))); |
72 } | 72 } |
73 | 73 |
74 // static | 74 // static |
75 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) { | 75 void SetDataReductionProxyEnabled(JNIEnv* env, jclass, jboolean enabled) { |
76 AwBrowserContext::SetDataReductionProxyEnabled(enabled); | 76 AwBrowserContext::SetDataReductionProxyEnabled(enabled); |
77 } | 77 } |
78 | 78 |
79 // static | 79 // static |
80 ScopedJavaLocalRef<jstring> GetUnreachableWebDataUrl(JNIEnv* env, jclass) { | 80 jstring GetUnreachableWebDataUrl(JNIEnv* env, jclass) { |
81 return base::android::ConvertUTF8ToJavaString( | 81 return base::android::ConvertUTF8ToJavaString( |
82 env, content::kUnreachableWebDataURL); | 82 env, content::kUnreachableWebDataURL).Release(); |
83 } | 83 } |
84 | 84 |
85 // static | 85 // static |
86 void SetRecordFullDocument(JNIEnv* env, jclass, jboolean record_full_document) { | 86 void SetRecordFullDocument(JNIEnv* env, jclass, jboolean record_full_document) { |
87 content::SynchronousCompositor::SetRecordFullDocument(record_full_document); | 87 content::SynchronousCompositor::SetRecordFullDocument(record_full_document); |
88 } | 88 } |
89 | 89 |
90 // static | 90 // static |
91 void SetLegacyCacheRemovalDelayForTest(JNIEnv*, jclass, jlong delay_ms) { | 91 void SetLegacyCacheRemovalDelayForTest(JNIEnv*, jclass, jlong delay_ms) { |
92 AwBrowserContext::SetLegacyCacheRemovalDelayForTest(delay_ms); | 92 AwBrowserContext::SetLegacyCacheRemovalDelayForTest(delay_ms); |
93 } | 93 } |
94 | 94 |
95 // static | 95 // static |
96 ScopedJavaLocalRef<jstring> GetProductVersion(JNIEnv* env, jclass) { | 96 jstring GetProductVersion(JNIEnv* env, jclass) { |
97 return base::android::ConvertUTF8ToJavaString(env, PRODUCT_VERSION); | 97 return base::android::ConvertUTF8ToJavaString(env, PRODUCT_VERSION).Release(); |
98 } | 98 } |
99 | 99 |
100 bool RegisterAwContentsStatics(JNIEnv* env) { | 100 bool RegisterAwContentsStatics(JNIEnv* env) { |
101 return RegisterNativesImpl(env); | 101 return RegisterNativesImpl(env); |
102 } | 102 } |
103 | 103 |
104 } // namespace android_webview | 104 } // namespace android_webview |
OLD | NEW |