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

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

Issue 12228005: Pass is_anchor_first with SelectionBounds_Params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 7 years, 10 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
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 if (obj.is_null()) 537 if (obj.is_null())
538 return; 538 return;
539 ScopedJavaLocalRef<jobject> anchor_rect( 539 ScopedJavaLocalRef<jobject> anchor_rect(
540 java_object_->CreateJavaRect(env, params.anchor_rect, GetDpiScale())); 540 java_object_->CreateJavaRect(env, params.anchor_rect, GetDpiScale()));
541 ScopedJavaLocalRef<jobject> focus_rect( 541 ScopedJavaLocalRef<jobject> focus_rect(
542 java_object_->CreateJavaRect(env, params.focus_rect, GetDpiScale())); 542 java_object_->CreateJavaRect(env, params.focus_rect, GetDpiScale()));
543 Java_ContentViewCore_onSelectionBoundsChanged(env, obj.obj(), 543 Java_ContentViewCore_onSelectionBoundsChanged(env, obj.obj(),
544 anchor_rect.obj(), 544 anchor_rect.obj(),
545 params.anchor_dir, 545 params.anchor_dir,
546 focus_rect.obj(), 546 focus_rect.obj(),
547 params.focus_dir); 547 params.focus_dir,
548 params.is_anchor_first);
548 } 549 }
549 550
550 void ContentViewCoreImpl::ShowPastePopup(int x, int y) { 551 void ContentViewCoreImpl::ShowPastePopup(int x, int y) {
551 JNIEnv* env = AttachCurrentThread(); 552 JNIEnv* env = AttachCurrentThread();
552 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); 553 ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
553 if (obj.is_null()) 554 if (obj.is_null())
554 return; 555 return;
555 Java_ContentViewCore_showPastePopup(env, obj.obj(), static_cast<jint>(x), 556 Java_ContentViewCore_showPastePopup(env, obj.obj(), static_cast<jint>(x),
556 static_cast<jint>(y)); 557 static_cast<jint>(y));
557 } 558 }
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
1397 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) { 1398 if (!HasField(env, clazz, "mNativeContentViewCore", "I")) {
1398 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!"; 1399 DLOG(ERROR) << "Unable to find ContentView.mNativeContentViewCore!";
1399 return false; 1400 return false;
1400 } 1401 }
1401 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I"); 1402 g_native_content_view = GetFieldID(env, clazz, "mNativeContentViewCore", "I");
1402 1403
1403 return RegisterNativesImpl(env) >= 0; 1404 return RegisterNativesImpl(env) >= 0;
1404 } 1405 }
1405 1406
1406 } // namespace content 1407 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698