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

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

Issue 174364: Plumb the DragOperation through all the layers between the platform DnD code ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 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/views/tab_contents/tab_contents_view_win.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tab_contents/tab_contents_view_win.cc
===================================================================
--- chrome/browser/views/tab_contents/tab_contents_view_win.cc (revision 25321)
+++ chrome/browser/views/tab_contents/tab_contents_view_win.cc (working copy)
@@ -32,6 +32,9 @@
#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webdropdata.h"
+using WebKit::WebDragOperation;
+using WebKit::WebDragOperationNone;
+using WebKit::WebDragOperationsMask;
using WebKit::WebInputEvent;
namespace {
@@ -132,7 +135,8 @@
GetBounds(out, false);
}
-void TabContentsViewWin::StartDragging(const WebDropData& drop_data) {
+void TabContentsViewWin::StartDragging(const WebDropData& drop_data,
+ WebDragOperationsMask ops) {
OSExchangeData data;
// TODO(tc): Generate an appropriate drag image.
@@ -189,6 +193,7 @@
MessageLoop::current()->SetNestableTasksAllowed(true);
DoDragDrop(OSExchangeDataProviderWin::GetIDataObject(data), drag_source_,
DROPEFFECT_COPY | DROPEFFECT_LINK, &effects);
+ // TODO(snej): Use 'ops' param instead of hardcoding dropeffects
MessageLoop::current()->SetNestableTasksAllowed(old_state);
drag_source_ = NULL;
@@ -358,8 +363,8 @@
close_tab_after_drag_ends_ = true;
}
-void TabContentsViewWin::UpdateDragCursor(bool is_drop_target) {
- drop_target_->set_is_drop_target(is_drop_target);
+void TabContentsViewWin::UpdateDragCursor(WebDragOperation operation) {
+ drop_target_->set_is_drop_target(operation != WebDragOperationNone);
}
void TabContentsViewWin::GotFocus() {
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.h ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698