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

Unified Diff: ui/android/view_android.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
« no previous file with comments | « ui/android/view_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index 3771c37282d3359e8febec8ebcbb99db1b53a260..5c1d3e45389b18be0970b21f73e175d319f77b05 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -8,12 +8,12 @@
#include "base/android/jni_android.h"
#include "cc/layers/layer.h"
+#include "ui/android/window_android.h"
+
namespace ui {
-using base::android::AttachCurrentThread;
using base::android::JavaRef;
-using base::android::ScopedJavaLocalRef;
ViewAndroid::ViewAndroid(const JavaRef<jobject>& delegate,
WindowAndroid* root_window)
@@ -83,4 +83,13 @@ void ViewAndroid::SetLayer(scoped_refptr<cc::Layer> layer) {
layer_ = layer;
}
+void ViewAndroid::StartDragAndDrop(const JavaRef<jstring>& jtext,
+ const JavaRef<jobject>& jimage) {
+ WindowAndroid* window_android = GetWindowAndroid();
+ if (!window_android)
+ return;
+
+ window_android->StartDragAndDrop(GetViewAndroidDelegate(), jtext, jimage);
+}
+
} // namespace ui
« no previous file with comments | « ui/android/view_android.h ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698