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

Unified Diff: chrome/browser/views/tab_contents/tab_contents_drag_win.cc

Issue 1572027: Return an approximately correct drop effect from WebDragTarget::OnDrop. (Closed)
Patch Set: . Created 10 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
« no previous file with comments | « chrome/browser/tab_contents/web_drop_target_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tab_contents/tab_contents_drag_win.cc
diff --git a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
index c74126f8f602dc6f0bc7967553736d04d9ebec98..4b84313412a04c19e844554a4904a75a8b5acf3c 100644
--- a/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
+++ b/chrome/browser/views/tab_contents/tab_contents_drag_win.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/web_drag_source_win.h"
+#include "chrome/browser/tab_contents/web_drag_utils_win.h"
#include "chrome/browser/tab_contents/web_drop_target_win.h"
#include "chrome/browser/views/tab_contents/tab_contents_view_win.h"
#include "chrome/common/url_constants.h"
@@ -61,17 +62,6 @@ LRESULT CALLBACK MsgFilterProc(int code, WPARAM wparam, LPARAM lparam) {
return CallNextHookEx(msg_hook, code, wparam, lparam);
}
-DWORD WebDragOpToWinDragOp(WebDragOperationsMask op) {
- DWORD win_op = DROPEFFECT_NONE;
- if (op & WebDragOperationCopy)
- win_op |= DROPEFFECT_COPY;
- if (op & WebDragOperationLink)
- win_op |= DROPEFFECT_LINK;
- if (op & WebDragOperationMove)
- win_op |= DROPEFFECT_MOVE;
- return win_op;
-}
-
} // namespace
class DragDropThread : public base::Thread {
@@ -300,7 +290,7 @@ void TabContentsDragWin::DoDragging(const WebDropData& drop_data,
DWORD effect;
MessageLoop::current()->SetNestableTasksAllowed(true);
DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source_,
- WebDragOpToWinDragOp(ops), &effect);
+ web_drag_utils_win::WebDragOpToWinDragOp(ops), &effect);
// This works because WebDragSource::OnDragSourceDrop uses PostTask to
// dispatch the actual event.
drag_source_->set_effect(effect);
« no previous file with comments | « chrome/browser/tab_contents/web_drop_target_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698