OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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.h" | 5 #include "android_webview/native/aw_contents.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
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_browser_main_parts.h" | 10 #include "android_webview/browser/aw_browser_main_parts.h" |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 if (!ok) | 801 if (!ok) |
802 return ScopedJavaLocalRef<jbyteArray>(); | 802 return ScopedJavaLocalRef<jbyteArray>(); |
803 | 803 |
804 // Convert the certificate and return it | 804 // Convert the certificate and return it |
805 std::string der_string; | 805 std::string der_string; |
806 net::X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_string); | 806 net::X509Certificate::GetDEREncoded(cert->os_cert_handle(), &der_string); |
807 return base::android::ToJavaByteArray(env, | 807 return base::android::ToJavaByteArray(env, |
808 reinterpret_cast<const uint8*>(der_string.data()), der_string.length()); | 808 reinterpret_cast<const uint8*>(der_string.data()), der_string.length()); |
809 } | 809 } |
810 | 810 |
811 void AwContents::RequestNewHitTestDataAt(JNIEnv* env, jobject obj, | 811 void AwContents::RequestNewHitTestDataAt(JNIEnv* env, |
812 jint x, jint y) { | 812 jobject obj, |
| 813 jint x, |
| 814 jint y, |
| 815 jfloat touch_major) { |
813 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 816 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
814 render_view_host_ext_->RequestNewHitTestDataAt(x, y); | 817 render_view_host_ext_->RequestNewHitTestDataAt(x, y, touch_major); |
815 } | 818 } |
816 | 819 |
817 void AwContents::UpdateLastHitTestData(JNIEnv* env, jobject obj) { | 820 void AwContents::UpdateLastHitTestData(JNIEnv* env, jobject obj) { |
818 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 821 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
819 if (!render_view_host_ext_->HasNewHitTestData()) return; | 822 if (!render_view_host_ext_->HasNewHitTestData()) return; |
820 | 823 |
821 const AwHitTestData& data = render_view_host_ext_->GetLastHitTestData(); | 824 const AwHitTestData& data = render_view_host_ext_->GetLastHitTestData(); |
822 render_view_host_ext_->MarkHitTestDataRead(); | 825 render_view_host_ext_->MarkHitTestDataRead(); |
823 | 826 |
824 // Make sure to null the Java object if data is empty/invalid. | 827 // Make sure to null the Java object if data is empty/invalid. |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1169 } | 1172 } |
1170 | 1173 |
1171 browser_view_renderer_.TrimMemory(level, visible); | 1174 browser_view_renderer_.TrimMemory(level, visible); |
1172 } | 1175 } |
1173 | 1176 |
1174 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { | 1177 void SetShouldDownloadFavicons(JNIEnv* env, jclass jclazz) { |
1175 g_should_download_favicons = true; | 1178 g_should_download_favicons = true; |
1176 } | 1179 } |
1177 | 1180 |
1178 } // namespace android_webview | 1181 } // namespace android_webview |
OLD | NEW |