| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 return bounds_; | 468 return bounds_; |
| 469 } | 469 } |
| 470 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, | 470 virtual void ProcessAckedTouchEvent(const TouchEventWithLatencyInfo& touch, |
| 471 InputEventAckState ack_result) OVERRIDE { | 471 InputEventAckState ack_result) OVERRIDE { |
| 472 acked_event_ = touch.event; | 472 acked_event_ = touch.event; |
| 473 ++acked_event_count_; | 473 ++acked_event_count_; |
| 474 } | 474 } |
| 475 virtual void UnhandledWheelEvent(const WebMouseWheelEvent& event) OVERRIDE { | 475 virtual void UnhandledWheelEvent(const WebMouseWheelEvent& event) OVERRIDE { |
| 476 unhandled_wheel_event_ = event; | 476 unhandled_wheel_event_ = event; |
| 477 } | 477 } |
| 478 virtual void GestureEventAck(int gesture_event_type, | 478 virtual void GestureEventAck(const WebGestureEvent& event, |
| 479 InputEventAckState ack_result) OVERRIDE { | 479 InputEventAckState ack_result) OVERRIDE { |
| 480 gesture_event_type_ = gesture_event_type; | 480 gesture_event_type_ = event.type; |
| 481 ack_result_ = ack_result; | 481 ack_result_ = ack_result; |
| 482 } | 482 } |
| 483 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { | 483 virtual gfx::Size GetPhysicalBackingSize() const OVERRIDE { |
| 484 if (use_fake_physical_backing_size_) | 484 if (use_fake_physical_backing_size_) |
| 485 return mock_physical_backing_size_; | 485 return mock_physical_backing_size_; |
| 486 return TestRenderWidgetHostView::GetPhysicalBackingSize(); | 486 return TestRenderWidgetHostView::GetPhysicalBackingSize(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 protected: | 489 protected: |
| 490 WebMouseWheelEvent unhandled_wheel_event_; | 490 WebMouseWheelEvent unhandled_wheel_event_; |
| (...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2498 | 2498 |
| 2499 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 2499 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
| 2500 host_->SetupForInputRouterTest(); | 2500 host_->SetupForInputRouterTest(); |
| 2501 | 2501 |
| 2502 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 2502 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
| 2503 | 2503 |
| 2504 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 2504 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
| 2505 } | 2505 } |
| 2506 | 2506 |
| 2507 } // namespace content | 2507 } // namespace content |
| OLD | NEW |