diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:42:59 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-28 21:42:59 +0000 |
commit | 4768c65bc656d4352632a6fc718c8eb6d5046c84 (patch) | |
tree | c75cffe227847e1e1ab0952d337c3c853692924e /views/view.cc | |
parent | 6638b8716b5630233efa54f8e8ea4b4758f01ca4 (diff) | |
download | chromium_src-4768c65bc656d4352632a6fc718c8eb6d5046c84.zip chromium_src-4768c65bc656d4352632a6fc718c8eb6d5046c84.tar.gz chromium_src-4768c65bc656d4352632a6fc718c8eb6d5046c84.tar.bz2 |
Adds support for initiating drags from bookmark menus.
BUG=none
TEST=make sure bookmark menus work on Windows.
Review URL: http://codereview.chromium.org/176006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/views/view.cc b/views/view.cc index 30a6e74..65e642e 100644 --- a/views/view.cc +++ b/views/view.cc @@ -554,6 +554,20 @@ void View::RemoveAllChildViews(bool delete_views) { UpdateTooltip(); } +void View::DoDrag(const MouseEvent& e, int press_x, int press_y) { + int drag_operations = GetDragOperations(press_x, press_y); + if (drag_operations == DragDropTypes::DRAG_NONE) + return; + + OSExchangeData data; + WriteDragData(press_x, press_y, &data); + + // Message the RootView to do the drag and drop. That way if we're removed + // the RootView can detect it and avoid calling us back. + RootView* root_view = GetRootView(); + root_view->StartDragForViewFromMouseEvent(this, data, drag_operations); +} + void View::DoRemoveChildView(View* a_view, bool update_focus_cycle, bool update_tool_tip, |