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

Unified Diff: chrome/browser/ui/gtk/tab_contents_drag_source.cc

Issue 8196001: content: Split web_drag_dest_gtk.cc into chrome/ and content/ parts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix viewgtk compile Created 9 years, 2 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
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/tab_contents_drag_source.cc
diff --git a/chrome/browser/ui/gtk/tab_contents_drag_source.cc b/chrome/browser/ui/gtk/tab_contents_drag_source.cc
index 28d4ecda3dc9c6f618ec0d0fda15ffbfc74ab71c..6719ede4e8a08b0c8ae8bab402763eed7b54c8de 100644
--- a/chrome/browser/ui/gtk/tab_contents_drag_source.cc
+++ b/chrome/browser/ui/gtk/tab_contents_drag_source.cc
@@ -11,16 +11,17 @@
#include "base/threading/thread_restrictions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/download/download_util.h"
-#include "chrome/browser/ui/gtk/gtk_util.h"
#include "content/browser/download/drag_download_file.h"
#include "content/browser/download/drag_download_util.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
+#include "content/browser/tab_contents/drag_utils_gtk.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "net/base/file_stream.h"
#include "net/base/net_util.h"
#include "ui/base/dragdrop/gtk_dnd_util.h"
+#include "ui/base/gtk/gtk_screen_utils.h"
#include "ui/gfx/gtk_util.h"
#include "webkit/glue/webdropdata.h"
@@ -102,7 +103,7 @@ void TabContentsDragSource::StartDragging(const WebDropData& drop_data,
// The image we get from WebKit makes heavy use of alpha-shading. This looks
// bad on non-compositing WMs. Fall back to the default drag icon.
- if (!image.isNull() && gtk_util::IsScreenComposited())
+ if (!image.isNull() && ui::IsScreenComposited())
drag_pixbuf_ = gfx::GdkPixbufFromSkBitmap(&image);
image_offset_ = image_offset;
@@ -126,7 +127,7 @@ void TabContentsDragSource::StartDragging(const WebDropData& drop_data,
// much, but we should probably look into the possibility of getting the
// initiating event from webkit.
drag_context_ = gtk_drag_begin(drag_widget_, list,
- gtk_util::WebDragOpToGdkDragAction(allowed_ops),
+ content::WebDragOpToGdkDragAction(allowed_ops),
1, // Drags are always initiated by the left button.
reinterpret_cast<GdkEvent*>(last_mouse_down));
// The drag adds a ref; let it own the list.
@@ -153,7 +154,7 @@ void TabContentsDragSource::DidProcessEvent(GdkEvent* event) {
return;
GdkEventMotion* event_motion = reinterpret_cast<GdkEventMotion*>(event);
- gfx::Point client = gtk_util::ClientPoint(GetContentNativeView());
+ gfx::Point client = ui::ClientPoint(GetContentNativeView());
if (tab_contents_->render_view_host()) {
tab_contents_->render_view_host()->DragSourceMovedTo(
@@ -271,8 +272,8 @@ gboolean TabContentsDragSource::OnDragFailed(GtkWidget* sender,
GtkDragResult result) {
drag_failed_ = true;
- gfx::Point root = gtk_util::ScreenPoint(GetContentNativeView());
- gfx::Point client = gtk_util::ClientPoint(GetContentNativeView());
+ gfx::Point root = ui::ScreenPoint(GetContentNativeView());
+ gfx::Point client = ui::ClientPoint(GetContentNativeView());
if (tab_contents_->render_view_host()) {
tab_contents_->render_view_host()->DragSourceEndedAt(
@@ -340,13 +341,13 @@ void TabContentsDragSource::OnDragEnd(GtkWidget* sender,
}
if (!drag_failed_) {
- gfx::Point root = gtk_util::ScreenPoint(GetContentNativeView());
- gfx::Point client = gtk_util::ClientPoint(GetContentNativeView());
+ gfx::Point root = ui::ScreenPoint(GetContentNativeView());
+ gfx::Point client = ui::ClientPoint(GetContentNativeView());
if (tab_contents_->render_view_host()) {
tab_contents_->render_view_host()->DragSourceEndedAt(
client.x(), client.y(), root.x(), root.y(),
- gtk_util::GdkDragActionToWebDragOp(drag_context->action));
+ content::GdkDragActionToWebDragOp(drag_context->action));
}
}
« no previous file with comments | « chrome/browser/ui/gtk/gtk_util.cc ('k') | chrome/browser/ui/gtk/tabs/dragged_view_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698