summaryrefslogtreecommitdiffstats
path: root/app/gtk_dnd_util.cc
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 03:18:28 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-23 03:18:28 +0000
commitfa23bd53f70490619439cee296e084d739c15aa1 (patch)
treef5db3cdf43d327b1d4ec12165fd12bd1e70bbe0d /app/gtk_dnd_util.cc
parentea4a1d01a2d1aad09c92821a51bb44c4412785f8 (diff)
downloadchromium_src-fa23bd53f70490619439cee296e084d739c15aa1.zip
chromium_src-fa23bd53f70490619439cee296e084d739c15aa1.tar.gz
chromium_src-fa23bd53f70490619439cee296e084d739c15aa1.tar.bz2
Fix HTML5 effectAllowed and dragEffect on Chrome Linux.
This hooks up all the chrome side plumbing, but there are a couple webkit changes that need to happen for this to fully work. BUG=14654 Review URL: http://codereview.chromium.org/1084003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42306 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gtk_dnd_util.cc')
-rw-r--r--app/gtk_dnd_util.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/gtk_dnd_util.cc b/app/gtk_dnd_util.cc
index 4d8694d..d6b0903 100644
--- a/app/gtk_dnd_util.cc
+++ b/app/gtk_dnd_util.cc
@@ -226,4 +226,15 @@ bool ExtractURIList(GtkSelectionData* selection_data, std::vector<GURL>* urls) {
return true;
}
+GdkDragAction WebDragOpToGdkDragAction(WebKit::WebDragOperationsMask op) {
+ GdkDragAction action = static_cast<GdkDragAction>(0);
+ if (op & WebKit::WebDragOperationCopy)
+ action = static_cast<GdkDragAction>(action | GDK_ACTION_COPY);
+ if (op & WebKit::WebDragOperationLink)
+ action = static_cast<GdkDragAction>(action | GDK_ACTION_LINK);
+ if (op & WebKit::WebDragOperationMove)
+ action = static_cast<GdkDragAction>(action | GDK_ACTION_MOVE);
+ return action;
+}
+
} // namespace gtk_dnd_util