Chromium Code Reviews| Index: ash/pointer_watcher_delegate_aura.cc |
| diff --git a/ash/pointer_watcher_delegate_aura.cc b/ash/pointer_watcher_delegate_aura.cc |
| index d70720d5a1932395559a707fb2e3defc33ac896f..6fe12f6f6f6f6cd693cd50bdb9d53587d98ecbc9 100644 |
| --- a/ash/pointer_watcher_delegate_aura.cc |
| +++ b/ash/pointer_watcher_delegate_aura.cc |
| @@ -34,17 +34,25 @@ void PointerWatcherDelegateAura::RemovePointerWatcher( |
| } |
| void PointerWatcherDelegateAura::OnMouseEvent(ui::MouseEvent* event) { |
| - if (event->type() == ui::ET_MOUSE_PRESSED) |
| - FOR_EACH_OBSERVER(views::PointerWatcher, pointer_watchers_, |
| - OnMousePressed(*event, GetLocationInScreen(*event), |
| - GetTargetWidget(*event))); |
| + // For compatibility with the mus version, don't send moves. |
| + if (event->type() == ui::ET_MOUSE_MOVED) |
|
James Cook
2016/08/02 21:19:50
Now that I think about it more, these tests should
riajiang
2016/08/02 22:01:41
Done.
|
| + return; |
| + ui::PointerEvent mouse_pointer_event(*event); |
| + FOR_EACH_OBSERVER( |
| + views::PointerWatcher, pointer_watchers_, |
| + OnPointerEventObserved(mouse_pointer_event, GetLocationInScreen(*event), |
| + GetTargetWidget(*event))); |
| } |
| void PointerWatcherDelegateAura::OnTouchEvent(ui::TouchEvent* event) { |
| - if (event->type() == ui::ET_TOUCH_PRESSED) |
| - FOR_EACH_OBSERVER(views::PointerWatcher, pointer_watchers_, |
| - OnTouchPressed(*event, GetLocationInScreen(*event), |
| - GetTargetWidget(*event))); |
| + // For compatibility with the mus version, don't send moves. |
| + if (event->type() == ui::ET_TOUCH_MOVED) |
|
James Cook
2016/08/02 21:19:50
ditto
riajiang
2016/08/02 22:01:40
Done.
|
| + return; |
| + ui::PointerEvent touch_pointer_event(*event); |
| + FOR_EACH_OBSERVER( |
| + views::PointerWatcher, pointer_watchers_, |
| + OnPointerEventObserved(touch_pointer_event, GetLocationInScreen(*event), |
| + GetTargetWidget(*event))); |
| } |
| gfx::Point PointerWatcherDelegateAura::GetLocationInScreen( |