| 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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 | 2503 |
| 2504 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 2504 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
| 2505 host_->SetupForInputRouterTest(); | 2505 host_->SetupForInputRouterTest(); |
| 2506 | 2506 |
| 2507 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 2507 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
| 2508 | 2508 |
| 2509 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 2509 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 } // namespace content | 2512 } // namespace content |
| OLD | NEW |