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

Unified Diff: ui/views/view.cc

Issue 11368072: aura: Add flag to indicate if a drag session is started with touch or mouse. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 1 month 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 | « ui/views/view.h ('k') | ui/views/widget/desktop_native_widget_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
} 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;
« no previous file with comments | « ui/views/view.h ('k') | ui/views/widget/desktop_native_widget_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698