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

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

Issue 12086095: Fixed drag and drop into and out of Browser Plugin. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed Comments Created 7 years, 8 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
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();
}

Powered by Google App Engine
This is Rietveld 408576698