diff options
author | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-07 03:43:51 +0000 |
---|---|---|
committer | feldstein@chromium.org <feldstein@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-07 03:43:51 +0000 |
commit | eda74d6837b1d8915a15f1a0598d1ce3c99b5cb0 (patch) | |
tree | 22f0a72166f5f9b34e37974489b991319ec16baf /chrome/browser/cocoa/web_drop_target.mm | |
parent | c3c91a64cba4f083f0aed48a7c4719303dd89e7d (diff) | |
download | chromium_src-eda74d6837b1d8915a15f1a0598d1ce3c99b5cb0.zip chromium_src-eda74d6837b1d8915a15f1a0598d1ce3c99b5cb0.tar.gz chromium_src-eda74d6837b1d8915a15f1a0598d1ce3c99b5cb0.tar.bz2 |
Initial implementation of Drag and Drop for the extension BMM.
Review URL: http://codereview.chromium.org/660139
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40858 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/web_drop_target.mm')
-rw-r--r-- | chrome/browser/cocoa/web_drop_target.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/web_drop_target.mm b/chrome/browser/cocoa/web_drop_target.mm index fa08c69..06e0a98 100644 --- a/chrome/browser/cocoa/web_drop_target.mm +++ b/chrome/browser/cocoa/web_drop_target.mm @@ -5,6 +5,7 @@ #import "chrome/browser/cocoa/web_drop_target.h" #include "base/sys_string_conversions.h" +#include "chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" #import "third_party/mozilla/include/NSPasteboard+Utils.h" @@ -78,6 +79,12 @@ using WebKit::WebDragOperationsMask; return NSDragOperationNone; } + // If the tab is showing the boomark manager, send BookmarkDrag events + RenderViewHostDelegate::BookmarkDrag* dragDelegate = + tabContents_->GetBookmarkDragDelegate(); + if(dragDelegate) + dragDelegate->OnDragEnter(NULL); + // Fill out a WebDropData from pasteboard. WebDropData data; [self populateWebDropData:&data fromPasteboard:[info draggingPasteboard]]; @@ -132,6 +139,11 @@ using WebKit::WebDragOperationsMask; gfx::Point(screenPoint.x, screenPoint.y), static_cast<WebDragOperationsMask>(mask)); + // If the tab is showing the boomark manager, send BookmarkDrag events + RenderViewHostDelegate::BookmarkDrag* dragDelegate = + tabContents_->GetBookmarkDragDelegate(); + if(dragDelegate) + dragDelegate->OnDragOver(NULL); return current_operation_; } @@ -153,6 +165,12 @@ using WebKit::WebDragOperationsMask; return NO; } + // If the tab is showing the boomark manager, send BookmarkDrag events + RenderViewHostDelegate::BookmarkDrag* dragDelegate = + tabContents_->GetBookmarkDragDelegate(); + if(dragDelegate) + dragDelegate->OnDrop(NULL); + currentRVH_ = NULL; // Create the appropriate mouse locations for WebCore. The draggingLocation |