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

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: Splitting up patch 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..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();
}
« no previous file with comments | « content/browser/web_contents/web_drag_source_gtk.h ('k') | content/browser/web_contents/web_drag_source_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698