| 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..2f1a1cc5df8b3c960a9d02365aefe9057b72adf1 100644
|
| --- a/content/browser/web_contents/web_drag_source_gtk.cc
|
| +++ b/content/browser/web_contents/web_drag_source_gtk.cc
|
| @@ -36,7 +36,7 @@ using WebKit::WebDragOperationNone;
|
| namespace content {
|
|
|
| WebDragSourceGtk::WebDragSourceGtk(WebContents* web_contents)
|
| - : web_contents_(web_contents),
|
| + : web_contents_(static_cast<WebContentsImpl*>(web_contents)),
|
| drag_pixbuf_(NULL),
|
| drag_failed_(false),
|
| drag_widget_(gtk_invisible_new()),
|
| @@ -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();
|
| }
|
|
|