diff options
Diffstat (limited to 'ash/drag_drop')
-rw-r--r-- | ash/drag_drop/drag_drop_controller.cc | 12 | ||||
-rw-r--r-- | ash/drag_drop/drag_drop_controller_unittest.cc | 12 |
2 files changed, 18 insertions, 6 deletions
diff --git a/ash/drag_drop/drag_drop_controller.cc b/ash/drag_drop/drag_drop_controller.cc index 5d1611e..77fbd79 100644 --- a/ash/drag_drop/drag_drop_controller.cc +++ b/ash/drag_drop/drag_drop_controller.cc @@ -21,6 +21,7 @@ #include "ui/base/dragdrop/drag_drop_types.h" #include "ui/base/dragdrop/os_exchange_data_provider_aura.h" #include "ui/base/events/event.h" +#include "ui/base/events/event_utils.h" #include "ui/gfx/point.h" #include "ui/gfx/rect.h" #include "ui/gfx/rect_conversions.h" @@ -64,9 +65,14 @@ gfx::Rect AdjustDragImageBoundsForScaleAndOffset( void DispatchGestureEndToWindow(aura::Window* window) { if (window && window->delegate()) { - ui::GestureEvent gesture_end(ui::ET_GESTURE_END, 0, 0, 0, - base::Time::Now() - base::Time::FromDoubleT(0), - ui::GestureEventDetails(ui::ET_GESTURE_END, 0, 0), 0); + ui::GestureEvent gesture_end( + ui::ET_GESTURE_END, + 0, + 0, + 0, + ui::EventTimeForNow(), + ui::GestureEventDetails(ui::ET_GESTURE_END, 0, 0), + 0); window->delegate()->OnGestureEvent(&gesture_end); } } diff --git a/ash/drag_drop/drag_drop_controller_unittest.cc b/ash/drag_drop/drag_drop_controller_unittest.cc index 2af2905..f52893a 100644 --- a/ash/drag_drop/drag_drop_controller_unittest.cc +++ b/ash/drag_drop/drag_drop_controller_unittest.cc @@ -19,6 +19,7 @@ #include "ui/base/dragdrop/drag_utils.h" #include "ui/base/dragdrop/os_exchange_data.h" #include "ui/base/events/event.h" +#include "ui/base/events/event_utils.h" #include "ui/base/gestures/gesture_types.h" #include "ui/base/ui_base_switches.h" #include "ui/gfx/image/image_skia_rep.h" @@ -266,9 +267,14 @@ void AddViewToWidgetAndResize(views::Widget* widget, views::View* view) { } void DispatchGesture(ui::EventType gesture_type, gfx::Point location) { - ui::GestureEvent gesture_event(gesture_type, location.x(), location.y(), 0, - base::Time::NowFromSystemTime() - base::Time(), - ui::GestureEventDetails(gesture_type, 0, 0), 1); + ui::GestureEvent gesture_event( + gesture_type, + location.x(), + location.y(), + 0, + ui::EventTimeForNow(), + ui::GestureEventDetails(gesture_type, 0, 0), + 1); Shell::GetPrimaryRootWindow()->DispatchGestureEvent(&gesture_event); } |