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/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 return bounds_; | 470 return bounds_; |
471 } | 471 } |
472 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 472 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
473 InputEventAckState ack_result) OVERRIDE { | 473 InputEventAckState ack_result) OVERRIDE { |
474 acked_event_ = touch.event; | 474 acked_event_ = touch.event; |
475 ++acked_event_count_; | 475 ++acked_event_count_; |
476 } | 476 } |
477 virtual void UnhandledWheelEvent(const WebMouseWheelEvent& event) OVERRIDE { | 477 virtual void UnhandledWheelEvent(const WebMouseWheelEvent& event) OVERRIDE { |
478 unhandled_wheel_event_ = event; | 478 unhandled_wheel_event_ = event; |
479 } | 479 } |
480 virtual void GestureEventAck(int gesture_event_type, | 480 virtual void GestureEventAck(const WebGestureEvent& event, |
481 InputEventAckState ack_result) OVERRIDE { | 481 InputEventAckState ack_result) OVERRIDE { |
482 gesture_event_type_ = gesture_event_type; | 482 gesture_event_type_ = event.type; |
483 ack_result_ = ack_result; | 483 ack_result_ = ack_result; |
484 } | 484 } |
485 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { | 485 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { |
486 if (use_fake_physical_backing_size_) | 486 if (use_fake_physical_backing_size_) |
487 return mock_physical_backing_size_; | 487 return mock_physical_backing_size_; |
488 return TestRenderWidgetHostView::GetPhysicalBackingSize(); | 488 return TestRenderWidgetHostView::GetPhysicalBackingSize(); |
489 } | 489 } |
490 | 490 |
491 protected: | 491 protected: |
492 WebMouseWheelEvent unhandled_wheel_event_; | 492 WebMouseWheelEvent unhandled_wheel_event_; |
(...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2616 | 2616 |
2617 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). | 2617 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). |
2618 PressTouchPoint(0, 1); | 2618 PressTouchPoint(0, 1); |
2619 SendTouchEvent(); | 2619 SendTouchEvent(); |
2620 CheckLatencyInfoComponentInMessage( | 2620 CheckLatencyInfoComponentInMessage( |
2621 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); | 2621 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); |
2622 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); | 2622 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); |
2623 } | 2623 } |
2624 | 2624 |
2625 } // namespace content | 2625 } // namespace content |
OLD | NEW |