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 0716d13d2fb2ae9053899b12397de5234c4c44ea..8495f25e96b77311a09789823fc38e6d376fb269 100644 |
--- a/content/browser/web_contents/web_contents_view_android.cc |
+++ b/content/browser/web_contents/web_contents_view_android.cc |
@@ -13,8 +13,10 @@ |
#include "content/browser/web_contents/web_contents_impl.h" |
#include "content/public/browser/render_widget_host.h" |
#include "content/public/browser/web_contents_delegate.h" |
+#include "content/public/common/drop_data.h" |
namespace content { |
+ |
WebContentsView* CreateWebContentsView( |
WebContentsImpl* web_contents, |
WebContentsViewDelegate* delegate, |
@@ -199,6 +201,37 @@ void WebContentsViewAndroid::UpdateDragCursor(blink::WebDragOperation op) { |
NOTIMPLEMENTED(); |
} |
+void WebContentsViewAndroid::OnDragEntered( |
+ const std::vector<DropData::Metadata>& metadata, |
+ std::vector<int> locations) { |
+ const gfx::Point location(locations[0], locations[1]); |
+ const gfx::Point screen_location(locations[2], locations[3]); |
+ |
+ web_contents_->GetRenderViewHost()->DragTargetDragEnterWithMetaData( |
+ metadata, location, screen_location, blink::WebDragOperationCopy, 0); |
+} |
+void WebContentsViewAndroid::OnDragUpdated(std::vector<int> locations) { |
+ const gfx::Point location(locations[0], locations[1]); |
+ const gfx::Point screen_location(locations[2], locations[3]); |
+ |
+ web_contents_->GetRenderViewHost()->DragTargetDragOver( |
+ location, screen_location, blink::WebDragOperationCopy, 0); |
+} |
+ |
+void WebContentsViewAndroid::OnDragExited() { |
+ web_contents_->GetRenderViewHost()->DragTargetDragLeave(); |
+} |
+ |
+void WebContentsViewAndroid::OnPerformDrop(DropData& drop_data, |
+ std::vector<int> locations) { |
+ const gfx::Point location(locations[0], locations[1]); |
+ const gfx::Point screen_location(locations[2], locations[3]); |
+ |
+ web_contents_->GetRenderViewHost()->FilterDropData(&drop_data); |
+ web_contents_->GetRenderViewHost()->DragTargetDrop(drop_data, location, |
+ screen_location, 0); |
+} |
+ |
void WebContentsViewAndroid::GotFocus() { |
// This is only used in the views FocusManager stuff but it bleeds through |
// all subclasses. http://crbug.com/21875 |