| 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 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 jfloat anchor_x, | 1175 jfloat anchor_x, |
| 1176 jfloat anchor_y, | 1176 jfloat anchor_y, |
| 1177 jfloat delta) { | 1177 jfloat delta) { |
| 1178 WebGestureEvent event = MakeGestureEvent( | 1178 WebGestureEvent event = MakeGestureEvent( |
| 1179 WebInputEvent::GesturePinchUpdate, time_ms, anchor_x, anchor_y); | 1179 WebInputEvent::GesturePinchUpdate, time_ms, anchor_x, anchor_y); |
| 1180 event.data.pinchUpdate.scale = delta; | 1180 event.data.pinchUpdate.scale = delta; |
| 1181 | 1181 |
| 1182 SendGestureEvent(event); | 1182 SendGestureEvent(event); |
| 1183 } | 1183 } |
| 1184 | 1184 |
| 1185 void ContentViewCoreImpl::SelectBetweenCoordinates( | |
| 1186 JNIEnv* env, | |
| 1187 const JavaParamRef<jobject>& obj, | |
| 1188 jfloat x1, | |
| 1189 jfloat y1, | |
| 1190 jfloat x2, | |
| 1191 jfloat y2) { | |
| 1192 SelectBetweenCoordinates(gfx::PointF(x1 / dpi_scale(), y1 / dpi_scale()), | |
| 1193 gfx::PointF(x2 / dpi_scale(), y2 / dpi_scale())); | |
| 1194 } | |
| 1195 | |
| 1196 void ContentViewCoreImpl::DismissTextHandles(JNIEnv* env, | 1185 void ContentViewCoreImpl::DismissTextHandles(JNIEnv* env, |
| 1197 const JavaParamRef<jobject>& obj) { | 1186 const JavaParamRef<jobject>& obj) { |
| 1198 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1187 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 1199 if (rwhv) | 1188 if (rwhv) |
| 1200 rwhv->DismissTextHandles(); | 1189 rwhv->DismissTextHandles(); |
| 1201 } | 1190 } |
| 1202 | 1191 |
| 1203 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( | 1192 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( |
| 1204 JNIEnv* env, | 1193 JNIEnv* env, |
| 1205 const JavaParamRef<jobject>& obj, | 1194 const JavaParamRef<jobject>& obj, |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 return ScopedJavaLocalRef<jobject>(); | 1590 return ScopedJavaLocalRef<jobject>(); |
| 1602 | 1591 |
| 1603 return view->GetJavaObject(); | 1592 return view->GetJavaObject(); |
| 1604 } | 1593 } |
| 1605 | 1594 |
| 1606 bool RegisterContentViewCore(JNIEnv* env) { | 1595 bool RegisterContentViewCore(JNIEnv* env) { |
| 1607 return RegisterNativesImpl(env); | 1596 return RegisterNativesImpl(env); |
| 1608 } | 1597 } |
| 1609 | 1598 |
| 1610 } // namespace content | 1599 } // namespace content |
| OLD | NEW |