Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Side by Side Diff: content/browser/android/content_view_core_impl.cc

Issue 11593011: Add a new code/message path for moving an insertion handle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + function rename Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 996
997 void ContentViewCoreImpl::SelectBetweenCoordinates(JNIEnv* env, jobject obj, 997 void ContentViewCoreImpl::SelectBetweenCoordinates(JNIEnv* env, jobject obj,
998 jint x1, jint y1, 998 jint x1, jint y1,
999 jint x2, jint y2) { 999 jint x2, jint y2) {
1000 if (GetRenderWidgetHostViewAndroid()) { 1000 if (GetRenderWidgetHostViewAndroid()) {
1001 GetRenderWidgetHostViewAndroid()->SelectRange(gfx::Point(x1, y1), 1001 GetRenderWidgetHostViewAndroid()->SelectRange(gfx::Point(x1, y1),
1002 gfx::Point(x2, y2)); 1002 gfx::Point(x2, y2));
1003 } 1003 }
1004 } 1004 }
1005 1005
1006 void ContentViewCoreImpl::MoveCaret(JNIEnv* env, jobject obj,
1007 jint x, jint y) {
1008 if (GetRenderWidgetHostViewAndroid()) {
1009 GetRenderWidgetHostViewAndroid()->MoveCaret(gfx::Point(x, y));
1010 }
1011 }
1012
1006 jboolean ContentViewCoreImpl::CanGoBack(JNIEnv* env, jobject obj) { 1013 jboolean ContentViewCoreImpl::CanGoBack(JNIEnv* env, jobject obj) {
1007 return web_contents_->GetController().CanGoBack(); 1014 return web_contents_->GetController().CanGoBack();
1008 } 1015 }
1009 1016
1010 jboolean ContentViewCoreImpl::CanGoForward(JNIEnv* env, jobject obj) { 1017 jboolean ContentViewCoreImpl::CanGoForward(JNIEnv* env, jobject obj) {
1011 return web_contents_->GetController().CanGoForward(); 1018 return web_contents_->GetController().CanGoForward();
1012 } 1019 }
1013 1020
1014 jboolean ContentViewCoreImpl::CanGoToOffset(JNIEnv* env, jobject obj, 1021 jboolean ContentViewCoreImpl::CanGoToOffset(JNIEnv* env, jobject obj,
1015 jint offset) { 1022 jint offset) {
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1342 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 1349 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
1343 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 1350 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
1344 return false; 1351 return false;
1345 } 1352 }
1346 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 1353 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
1347 1354
1348 return RegisterNativesImpl(env) >= 0; 1355 return RegisterNativesImpl(env) >= 0;
1349 } 1356 }
1350 1357
1351 } // namespace content 1358 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698