Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index dc121514f9d9b3444ce365c89763ed8311006b5c..f44ec341f092257e54e00e5ca1de32d6cc850ccd 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -331,6 +331,21 @@ void ContentViewCoreImpl::OnSelectionChanged(const std::string& text) { |
| NOTIMPLEMENTED() << "not upstreamed yet"; |
| } |
| +void ContentViewCoreImpl::SelectText(const string16& selected_text, |
|
olilan
2012/10/01 13:01:30
This method doesn't select any text - ShowPastePop
|
| + int selection_start_x, |
| + int selection_start_y) { |
| + JNIEnv* env = AttachCurrentThread(); |
| + ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| + if (obj.is_null()) |
| + return; |
| + ScopedJavaLocalRef<jstring> jtext = |
| + ConvertUTF16ToJavaString(env, selected_text); |
| + Java_ContentViewCore_onTextSelected(env, obj.obj(), |
| + jtext.obj(), |
| + static_cast<jint>(selection_start_x), |
| + static_cast<jint>(selection_start_y)); |
| +} |
| + |
| void ContentViewCoreImpl::StartContentIntent(const GURL& content_url) { |
| JNIEnv* env = AttachCurrentThread(); |
| ScopedJavaLocalRef<jobject> j_obj = java_ref_.get(env); |