Index: content/browser/web_contents/web_drag_source_gtk.cc |
diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc |
index 64e883b71e0c8224f42fa5eb2c3fb76dd8585c12..d2113b26d672d9a0cde6667acce7cf529e3bcb70 100644 |
--- a/content/browser/web_contents/web_drag_source_gtk.cc |
+++ b/content/browser/web_contents/web_drag_source_gtk.cc |
@@ -163,8 +163,8 @@ void WebDragSourceGtk::DidProcessEvent(GdkEvent* event) { |
GdkEventMotion* event_motion = reinterpret_cast<GdkEventMotion*>(event); |
gfx::Point client = ui::ClientPoint(GetContentNativeView()); |
- if (GetRenderViewHost()) { |
- GetRenderViewHost()->DragSourceMovedTo( |
+ if (web_contents_) { |
+ web_contents_->DragSourceMovedTo( |
client.x(), client.y(), |
static_cast<int>(event_motion->x_root), |
static_cast<int>(event_motion->y_root)); |
@@ -299,8 +299,8 @@ gboolean WebDragSourceGtk::OnDragFailed(GtkWidget* sender, |
gfx::Point root = ui::ScreenPoint(GetContentNativeView()); |
gfx::Point client = ui::ClientPoint(GetContentNativeView()); |
- if (GetRenderViewHost()) { |
- GetRenderViewHost()->DragSourceEndedAt( |
+ if (web_contents_) { |
+ web_contents_->DragSourceEndedAt( |
client.x(), client.y(), root.x(), root.y(), |
WebDragOperationNone); |
} |
@@ -371,8 +371,8 @@ void WebDragSourceGtk::OnDragEnd(GtkWidget* sender, |
gfx::Point root = ui::ScreenPoint(GetContentNativeView()); |
gfx::Point client = ui::ClientPoint(GetContentNativeView()); |
- if (GetRenderViewHost()) { |
- GetRenderViewHost()->DragSourceEndedAt( |
+ if (web_contents_) { |
+ web_contents_->DragSourceEndedAt( |
client.x(), client.y(), root.x(), root.y(), |
GdkDragActionToWebDragOp(drag_context->action)); |
} |
@@ -384,10 +384,6 @@ void WebDragSourceGtk::OnDragEnd(GtkWidget* sender, |
drag_context_ = NULL; |
} |
-RenderViewHostImpl* WebDragSourceGtk::GetRenderViewHost() const { |
- return static_cast<RenderViewHostImpl*>(web_contents_->GetRenderViewHost()); |
-} |
- |
gfx::NativeView WebDragSourceGtk::GetContentNativeView() const { |
return web_contents_->GetView()->GetContentNativeView(); |
} |