| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/events/blink/input_handler_proxy.h" | 5 #include "ui/events/blink/input_handler_proxy.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 } | 398 } |
| 399 case WebInputEvent::MouseMove: { | 399 case WebInputEvent::MouseMove: { |
| 400 const WebMouseEvent& mouse_event = | 400 const WebMouseEvent& mouse_event = |
| 401 static_cast<const WebMouseEvent&>(event); | 401 static_cast<const WebMouseEvent&>(event); |
| 402 // TODO(davemoore): This should never happen, but bug #326635 showed some | 402 // TODO(davemoore): This should never happen, but bug #326635 showed some |
| 403 // surprising crashes. | 403 // surprising crashes. |
| 404 CHECK(input_handler_); | 404 CHECK(input_handler_); |
| 405 input_handler_->MouseMoveAt(gfx::Point(mouse_event.x, mouse_event.y)); | 405 input_handler_->MouseMoveAt(gfx::Point(mouse_event.x, mouse_event.y)); |
| 406 return DID_NOT_HANDLE; | 406 return DID_NOT_HANDLE; |
| 407 } | 407 } |
| 408 case WebInputEvent::MouseLeave: { |
| 409 CHECK(input_handler_); |
| 410 input_handler_->MouseLeave(); |
| 411 return DID_NOT_HANDLE; |
| 412 } |
| 408 | 413 |
| 409 default: | 414 default: |
| 410 if (WebInputEvent::isKeyboardEventType(event.type)) { | 415 if (WebInputEvent::isKeyboardEventType(event.type)) { |
| 411 // Only call |CancelCurrentFling()| if a fling was active, as it will | 416 // Only call |CancelCurrentFling()| if a fling was active, as it will |
| 412 // otherwise disrupt an in-progress touch scroll. | 417 // otherwise disrupt an in-progress touch scroll. |
| 413 if (fling_curve_) | 418 if (fling_curve_) |
| 414 CancelCurrentFling(); | 419 CancelCurrentFling(); |
| 415 } | 420 } |
| 416 break; | 421 break; |
| 417 } | 422 } |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 // is made asynchronously, to minimize divergence between main thread and | 1396 // is made asynchronously, to minimize divergence between main thread and |
| 1392 // impl thread event handling paths. | 1397 // impl thread event handling paths. |
| 1393 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1398 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 1394 FROM_HERE, | 1399 FROM_HERE, |
| 1395 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1400 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
| 1396 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1401 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
| 1397 scroll_result)); | 1402 scroll_result)); |
| 1398 } | 1403 } |
| 1399 | 1404 |
| 1400 } // namespace ui | 1405 } // namespace ui |
| OLD | NEW |