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 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1218 void ContentViewCoreImpl::OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip) { | 1218 void ContentViewCoreImpl::OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip) { |
1219 JNIEnv* env = AttachCurrentThread(); | 1219 JNIEnv* env = AttachCurrentThread(); |
1220 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1220 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
1221 if (obj.is_null()) | 1221 if (obj.is_null()) |
1222 return; | 1222 return; |
1223 Java_ContentViewCore_onShowUnhandledTapUIIfNeeded( | 1223 Java_ContentViewCore_onShowUnhandledTapUIIfNeeded( |
1224 env, obj, static_cast<jint>(x_dip * dpi_scale()), | 1224 env, obj, static_cast<jint>(x_dip * dpi_scale()), |
1225 static_cast<jint>(y_dip * dpi_scale())); | 1225 static_cast<jint>(y_dip * dpi_scale())); |
1226 } | 1226 } |
1227 | 1227 |
| 1228 void ContentViewCoreImpl::OnSelectWordAroundCaretAck(bool did_select, |
| 1229 int start_adjust, |
| 1230 int end_adjust) { |
| 1231 JNIEnv* env = AttachCurrentThread(); |
| 1232 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1233 if (obj.is_null()) |
| 1234 return; |
| 1235 Java_ContentViewCore_onSelectWordAroundCaretAck(env, obj, did_select, |
| 1236 start_adjust, end_adjust); |
| 1237 } |
| 1238 |
1228 void ContentViewCoreImpl::HidePopupsAndPreserveSelection() { | 1239 void ContentViewCoreImpl::HidePopupsAndPreserveSelection() { |
1229 JNIEnv* env = AttachCurrentThread(); | 1240 JNIEnv* env = AttachCurrentThread(); |
1230 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1241 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
1231 if (obj.is_null()) | 1242 if (obj.is_null()) |
1232 return; | 1243 return; |
1233 | 1244 |
1234 Java_ContentViewCore_hidePopupsAndPreserveSelection(env, obj); | 1245 Java_ContentViewCore_hidePopupsAndPreserveSelection(env, obj); |
1235 } | 1246 } |
1236 | 1247 |
1237 void ContentViewCoreImpl::WebContentsDestroyed() { | 1248 void ContentViewCoreImpl::WebContentsDestroyed() { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 return ScopedJavaLocalRef<jobject>(); | 1291 return ScopedJavaLocalRef<jobject>(); |
1281 | 1292 |
1282 return view->GetJavaObject(); | 1293 return view->GetJavaObject(); |
1283 } | 1294 } |
1284 | 1295 |
1285 bool RegisterContentViewCore(JNIEnv* env) { | 1296 bool RegisterContentViewCore(JNIEnv* env) { |
1286 return RegisterNativesImpl(env); | 1297 return RegisterNativesImpl(env); |
1287 } | 1298 } |
1288 | 1299 |
1289 } // namespace content | 1300 } // namespace content |
OLD | NEW |