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

Unified Diff: content/browser/android/content_view_core_impl.cc

Issue 2135493002: Support dragging texts out of webview/Chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Workaround b/30148704 Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
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 b3bbe94d5620a07de286dbb360696bb5a4bd656a..5f3a0054abac453ef5fc1160b8a6c94699bc4ba1 100644
--- a/content/browser/android/content_view_core_impl.cc
+++ b/content/browser/android/content_view_core_impl.cc
@@ -1541,7 +1541,11 @@ void ContentViewCoreImpl::OnDragEvent(
case JNI_DragEvent::ACTION_DRAG_EXITED:
wcva->OnDragExited();
break;
- default: // STARTED and ENDED. Nothing meaningful to do.
+ case JNI_DragEvent::ACTION_DRAG_ENDED:
+ wcva->OnDragEnded();
+ break;
+ case JNI_DragEvent::ACTION_DRAG_STARTED:
+ // Nothing meaningful to do.
break;
}
}
@@ -1573,6 +1577,15 @@ void ContentViewCoreImpl::OnShowUnhandledTapUIIfNeeded(int x_dip, int y_dip) {
static_cast<jint>(y_dip * dpi_scale()));
}
+void ContentViewCoreImpl::HidePopupsAndPreserveSelection() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
+ if (obj.is_null())
+ return;
+
+ Java_ContentViewCore_hidePopupsAndPreserveSelection(env, obj.obj());
+}
+
void ContentViewCoreImpl::OnSmartClipDataExtracted(
const base::string16& text,
const base::string16& html,
« no previous file with comments | « content/browser/android/content_view_core_impl.h ('k') | content/browser/web_contents/web_contents_view_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698