| 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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 jfloat anchor_x, | 1150 jfloat anchor_x, |
| 1151 jfloat anchor_y, | 1151 jfloat anchor_y, |
| 1152 jfloat delta) { | 1152 jfloat delta) { |
| 1153 WebGestureEvent event = MakeGestureEvent( | 1153 WebGestureEvent event = MakeGestureEvent( |
| 1154 WebInputEvent::GesturePinchUpdate, time_ms, anchor_x, anchor_y); | 1154 WebInputEvent::GesturePinchUpdate, time_ms, anchor_x, anchor_y); |
| 1155 event.data.pinchUpdate.scale = delta; | 1155 event.data.pinchUpdate.scale = delta; |
| 1156 | 1156 |
| 1157 SendGestureEvent(event); | 1157 SendGestureEvent(event); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 void ContentViewCoreImpl::DismissTextHandles(JNIEnv* env, | |
| 1161 const JavaParamRef<jobject>& obj) { | |
| 1162 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | |
| 1163 if (rwhv) | |
| 1164 rwhv->DismissTextHandles(); | |
| 1165 } | |
| 1166 | |
| 1167 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( | 1160 void ContentViewCoreImpl::SetTextHandlesTemporarilyHidden( |
| 1168 JNIEnv* env, | 1161 JNIEnv* env, |
| 1169 const JavaParamRef<jobject>& obj, | 1162 const JavaParamRef<jobject>& obj, |
| 1170 jboolean hidden) { | 1163 jboolean hidden) { |
| 1171 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); | 1164 RenderWidgetHostViewAndroid* rwhv = GetRenderWidgetHostViewAndroid(); |
| 1172 if (rwhv) | 1165 if (rwhv) |
| 1173 rwhv->SetTextHandlesTemporarilyHidden(hidden); | 1166 rwhv->SetTextHandlesTemporarilyHidden(hidden); |
| 1174 } | 1167 } |
| 1175 | 1168 |
| 1176 void ContentViewCoreImpl::ResetGestureDetection( | 1169 void ContentViewCoreImpl::ResetGestureDetection( |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1567 return ScopedJavaLocalRef<jobject>(); | 1560 return ScopedJavaLocalRef<jobject>(); |
| 1568 | 1561 |
| 1569 return view->GetJavaObject(); | 1562 return view->GetJavaObject(); |
| 1570 } | 1563 } |
| 1571 | 1564 |
| 1572 bool RegisterContentViewCore(JNIEnv* env) { | 1565 bool RegisterContentViewCore(JNIEnv* env) { |
| 1573 return RegisterNativesImpl(env); | 1566 return RegisterNativesImpl(env); |
| 1574 } | 1567 } |
| 1575 | 1568 |
| 1576 } // namespace content | 1569 } // namespace content |
| OLD | NEW |