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

Unified Diff: content/browser/web_contents/web_contents_view_android.cc

Issue 2308103002: Disable WebView/Chrome's drag and drop feature on M and below. (Closed)
Patch Set: Created 4 years, 3 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
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_view_android.cc
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index c5a8e50c394792bbc20cff34d5859c6d7806178d..f5b6743af56214a0192f34810a331431cebf7a8a 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -251,8 +251,12 @@ void WebContentsViewAndroid::StartDragging(
ScopedJavaLocalRef<jstring> jtext =
ConvertUTF16ToJavaString(env, drop_data.text.string());
- native_view->StartDragAndDrop(jtext,
- gfx::ConvertToJavaBitmap(image.bitmap()));
+ if (!native_view->StartDragAndDrop(
+ jtext, gfx::ConvertToJavaBitmap(image.bitmap()))) {
+ // Need to clear drag and drop state in blink.
+ OnDragEnded();
+ return;
+ }
if (content_view_core_)
content_view_core_->HidePopupsAndPreserveSelection();
« 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