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 } | |
413 | 408 |
414 default: | 409 default: |
415 if (WebInputEvent::isKeyboardEventType(event.type)) { | 410 if (WebInputEvent::isKeyboardEventType(event.type)) { |
416 // Only call |CancelCurrentFling()| if a fling was active, as it will | 411 // Only call |CancelCurrentFling()| if a fling was active, as it will |
417 // otherwise disrupt an in-progress touch scroll. | 412 // otherwise disrupt an in-progress touch scroll. |
418 if (fling_curve_) | 413 if (fling_curve_) |
419 CancelCurrentFling(); | 414 CancelCurrentFling(); |
420 } | 415 } |
421 break; | 416 break; |
422 } | 417 } |
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1396 // is made asynchronously, to minimize divergence between main thread and | 1391 // is made asynchronously, to minimize divergence between main thread and |
1397 // impl thread event handling paths. | 1392 // impl thread event handling paths. |
1398 base::ThreadTaskRunnerHandle::Get()->PostTask( | 1393 base::ThreadTaskRunnerHandle::Get()->PostTask( |
1399 FROM_HERE, | 1394 FROM_HERE, |
1400 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, | 1395 base::Bind(&InputScrollElasticityController::ObserveGestureEventAndResult, |
1401 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, | 1396 scroll_elasticity_controller_->GetWeakPtr(), gesture_event, |
1402 scroll_result)); | 1397 scroll_result)); |
1403 } | 1398 } |
1404 | 1399 |
1405 } // namespace ui | 1400 } // namespace ui |
OLD | NEW |