OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 | 459 |
460 // RenderWidgetHostView override. | 460 // RenderWidgetHostView override. |
461 virtual gfx::Rect GetViewBounds() const OVERRIDE { | 461 virtual gfx::Rect GetViewBounds() const OVERRIDE { |
462 return bounds_; | 462 return bounds_; |
463 } | 463 } |
464 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 464 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
465 InputEventAckState ack_result) OVERRIDE { | 465 InputEventAckState ack_result) OVERRIDE { |
466 acked_event_ = touch.event; | 466 acked_event_ = touch.event; |
467 ++acked_event_count_; | 467 ++acked_event_count_; |
468 } | 468 } |
469 virtual void UnhandledWheelEvent(const WebMouseWheelEvent& event) OVERRIDE { | 469 virtual void HandledWheelEvent(const blink::WebMouseWheelEvent& event, |
470 unhandled_wheel_event_count_++; | 470 bool consumed) OVERRIDE { |
471 unhandled_wheel_event_ = event; | 471 if (!consumed) { |
| 472 unhandled_wheel_event_count_++; |
| 473 unhandled_wheel_event_ = event; |
| 474 } |
472 } | 475 } |
473 virtual void GestureEventAck(const WebGestureEvent& event, | 476 virtual void GestureEventAck(const WebGestureEvent& event, |
474 InputEventAckState ack_result) OVERRIDE { | 477 InputEventAckState ack_result) OVERRIDE { |
475 gesture_event_type_ = event.type; | 478 gesture_event_type_ = event.type; |
476 ack_result_ = ack_result; | 479 ack_result_ = ack_result; |
477 } | 480 } |
478 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { | 481 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { |
479 if (use_fake_physical_backing_size_) | 482 if (use_fake_physical_backing_size_) |
480 return mock_physical_backing_size_; | 483 return mock_physical_backing_size_; |
481 return TestRenderWidgetHostView::GetPhysicalBackingSize(); | 484 return TestRenderWidgetHostView::GetPhysicalBackingSize(); |
(...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2611 | 2614 |
2612 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). | 2615 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). |
2613 PressTouchPoint(0, 1); | 2616 PressTouchPoint(0, 1); |
2614 SendTouchEvent(); | 2617 SendTouchEvent(); |
2615 CheckLatencyInfoComponentInMessage( | 2618 CheckLatencyInfoComponentInMessage( |
2616 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); | 2619 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); |
2617 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); | 2620 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); |
2618 } | 2621 } |
2619 | 2622 |
2620 } // namespace content | 2623 } // namespace content |
OLD | NEW |