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

Unified Diff: chrome/browser/tab_contents/web_drop_target_win.cc

Issue 596105: Bookmark Manager Drag and Drop backend.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 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: chrome/browser/tab_contents/web_drop_target_win.cc
===================================================================
--- chrome/browser/tab_contents/web_drop_target_win.cc (revision 39450)
+++ chrome/browser/tab_contents/web_drop_target_win.cc (working copy)
@@ -118,6 +118,13 @@
gfx::Point(cursor_position.x, cursor_position.y),
WebDragOperationCopy); // FIXME(snej): Send actual operation
+ // This is non-null if tab_contents_ is showing an ExtensionDOMUI with
+ // support for (at the moment experimental) drag and drop extensions.
+ if (tab_contents_->GetBookmarkDragDelegate()) {
+ OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object));
+ tab_contents_->GetBookmarkDragDelegate()->OnDragEnter(&os_exchange_data);
+ }
+
// We lie here and always return a DROPEFFECT because we don't want to
// wait for the IPC call to return.
return GetPreferredDropEffect(effect);
@@ -141,6 +148,11 @@
gfx::Point(cursor_position.x, cursor_position.y),
WebDragOperationCopy); // FIXME(snej): Send actual operation
+ if (tab_contents_->GetBookmarkDragDelegate()) {
+ OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object));
+ tab_contents_->GetBookmarkDragDelegate()->OnDragOver(&os_exchange_data);
+ }
+
if (!is_drop_target_)
return DROPEFFECT_NONE;
@@ -157,6 +169,11 @@
} else {
tab_contents_->render_view_host()->DragTargetDragLeave();
}
+
+ if (tab_contents_->GetBookmarkDragDelegate()) {
+ OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object));
+ tab_contents_->GetBookmarkDragDelegate()->OnDragLeave(&os_exchange_data);
+ }
}
DWORD WebDropTarget::OnDrop(IDataObject* data_object,
@@ -179,6 +196,11 @@
gfx::Point(client_pt.x, client_pt.y),
gfx::Point(cursor_position.x, cursor_position.y));
+ if (tab_contents_->GetBookmarkDragDelegate()) {
+ OSExchangeData os_exchange_data(new OSExchangeDataProviderWin(data_object));
+ tab_contents_->GetBookmarkDragDelegate()->OnDrop(&os_exchange_data);
+ }
+
current_rvh_ = NULL;
// We lie and always claim that the drop operation didn't happen because we

Powered by Google App Engine
This is Rietveld 408576698