| 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 "content/browser/android/content_view_core_impl.h" | 5 #include "content/browser/android/content_view_core_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/android/jni_android.h" | 9 #include "base/android/jni_android.h" |
| 10 #include "base/android/jni_array.h" | 10 #include "base/android/jni_array.h" |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 JNIEnv* env, | 1147 JNIEnv* env, |
| 1148 const JavaParamRef<jobject>& obj, | 1148 const JavaParamRef<jobject>& obj, |
| 1149 jfloat x1, | 1149 jfloat x1, |
| 1150 jfloat y1, | 1150 jfloat y1, |
| 1151 jfloat x2, | 1151 jfloat x2, |
| 1152 jfloat y2) { | 1152 jfloat y2) { |
| 1153 SelectBetweenCoordinates(gfx::PointF(x1 / dpi_scale(), y1 / dpi_scale()), | 1153 SelectBetweenCoordinates(gfx::PointF(x1 / dpi_scale(), y1 / dpi_scale()), |
| 1154 gfx::PointF(x2 / dpi_scale(), y2 / dpi_scale())); | 1154 gfx::PointF(x2 / dpi_scale(), y2 / dpi_scale())); |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 void ContentViewCoreImpl::MoveCaret(JNIEnv* env, | |
| 1158 const JavaParamRef<jobject>& obj, | |
| 1159 jfloat x, | |
| 1160 jfloat y) { | |
| 1161 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | |
| 1162 if (rwhv) | |
| 1163 rwhv->MoveCaret(gfx::Point(x / dpi_scale_, y / dpi_scale_)); | |
| 1164 } | |
| 1165 | |
| 1166 void ContentViewCoreImpl::DismissTextHandles(JNIEnv* env, | 1157 void ContentViewCoreImpl::DismissTextHandles(JNIEnv* env, |
| 1167 const JavaParamRef<jobject>& obj) { | 1158 const JavaParamRef<jobject>& obj) { |
| 1168 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1159 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 1169 if (rwhv) | 1160 if (rwhv) |
| 1170 rwhv->DismissTextHandles(); | 1161 rwhv->DismissTextHandles(); |
| 1171 } | 1162 } |
| 1172 | 1163 |
| 1173 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( | 1164 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( |
| 1174 JNIEnv* env, | 1165 JNIEnv* env, |
| 1175 const JavaParamRef<jobject>& obj, | 1166 const JavaParamRef<jobject>& obj, |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1516 return ScopedJavaLocalRef<jobject>(); | 1507 return ScopedJavaLocalRef<jobject>(); |
| 1517 | 1508 |
| 1518 return view->GetJavaObject(); | 1509 return view->GetJavaObject(); |
| 1519 } | 1510 } |
| 1520 | 1511 |
| 1521 bool RegisterContentViewCore(JNIEnv* env) { | 1512 bool RegisterContentViewCore(JNIEnv* env) { |
| 1522 return RegisterNativesImpl(env); | 1513 return RegisterNativesImpl(env); |
| 1523 } | 1514 } |
| 1524 | 1515 |
| 1525 } // namespace content | 1516 } // namespace content |
| OLD | NEW |