Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index a0b774c69af92ef1754246e312db78b7737df123..593530b3d1b75c00ad8963ce6cdad0a0b44b3744 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -1962,8 +1962,10 @@ bool View::ProcessMouseDragged(const ui::MouseEvent& event, |
| ExceededDragThreshold(drag_info->start_pt - event.location())) { |
| if (!drag_controller_ || |
| drag_controller_->CanStartDragForView( |
| - this, drag_info->start_pt, event.location())) |
| - DoDrag(event, drag_info->start_pt); |
| + this, drag_info->start_pt, event.location())) { |
| + DoDrag(event, drag_info->start_pt, |
| + ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); |
|
sky
2012/11/05 18:13:56
On windows we map touch events to mosue events. Se
varunjain
2012/11/05 18:25:49
I have not used the source value in any windows dr
sky
2012/11/05 21:51:56
Certainly. But don't we want to send the right val
|
| + } |
| } else { |
| if (OnMouseDragged(event)) |
| return true; |
| @@ -2131,7 +2133,9 @@ void View::UpdateTooltip() { |
| // Drag and drop --------------------------------------------------------------- |
| -bool View::DoDrag(const ui::LocatedEvent& event, const gfx::Point& press_pt) { |
| +bool View::DoDrag(const ui::LocatedEvent& event, |
| + const gfx::Point& press_pt, |
| + ui::DragDropTypes::DragEventSource source) { |
| #if !defined(OS_MACOSX) |
| int drag_operations = GetDragOperations(press_pt); |
| if (drag_operations == ui::DragDropTypes::DRAG_NONE) |
| @@ -2144,7 +2148,8 @@ bool View::DoDrag(const ui::LocatedEvent& event, const gfx::Point& press_pt) { |
| // the RootView can detect it and avoid calling us back. |
| gfx::Point widget_location(event.location()); |
| ConvertPointToWidget(this, &widget_location); |
| - GetWidget()->RunShellDrag(this, data, widget_location, drag_operations); |
| + GetWidget()->RunShellDrag(this, data, widget_location, drag_operations, |
| + source); |
| return true; |
| #else |
| return false; |