| 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 "content/browser/renderer_host/input/mock_input_router_client.h" | 5 #include "content/browser/renderer_host/input/mock_input_router_client.h" |
| 6 | 6 |
| 7 #include "content/browser/renderer_host/input/input_router.h" | 7 #include "content/browser/renderer_host/input/input_router.h" |
| 8 #include "content/common/input/input_event.h" | 8 #include "content/common/input/input_event.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 MockInputRouterClient::~MockInputRouterClient() {} | 30 MockInputRouterClient::~MockInputRouterClient() {} |
| 31 | 31 |
| 32 InputEventAckState MockInputRouterClient::FilterInputEvent( | 32 InputEventAckState MockInputRouterClient::FilterInputEvent( |
| 33 const WebInputEvent& input_event, | 33 const WebInputEvent& input_event, |
| 34 const ui::LatencyInfo& latency_info) { | 34 const ui::LatencyInfo& latency_info) { |
| 35 filter_input_event_called_ = true; | 35 filter_input_event_called_ = true; |
| 36 last_filter_event_.reset(new InputEvent(input_event, latency_info)); | 36 last_filter_event_.reset(new InputEvent(input_event, latency_info)); |
| 37 return filter_state_; | 37 return filter_state_; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void MockInputRouterClient::OnForwardEventToRenderer( |
| 41 const blink::WebInputEvent& event, |
| 42 ui::LatencyInfo* latency) { |
| 43 } |
| 44 |
| 40 void MockInputRouterClient::IncrementInFlightEventCount() { | 45 void MockInputRouterClient::IncrementInFlightEventCount() { |
| 41 ++in_flight_event_count_; | 46 ++in_flight_event_count_; |
| 42 } | 47 } |
| 43 | 48 |
| 44 void MockInputRouterClient::DecrementInFlightEventCount() { | 49 void MockInputRouterClient::DecrementInFlightEventCount() { |
| 45 --in_flight_event_count_; | 50 --in_flight_event_count_; |
| 46 } | 51 } |
| 47 | 52 |
| 48 void MockInputRouterClient::OnHasTouchEventHandlers( | 53 void MockInputRouterClient::OnHasTouchEventHandlers( |
| 49 bool has_handlers) { | 54 bool has_handlers) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 73 return did_flush_called_count; | 78 return did_flush_called_count; |
| 74 } | 79 } |
| 75 | 80 |
| 76 DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { | 81 DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { |
| 77 DidOverscrollParams overscroll; | 82 DidOverscrollParams overscroll; |
| 78 std::swap(overscroll_, overscroll); | 83 std::swap(overscroll_, overscroll); |
| 79 return overscroll; | 84 return overscroll; |
| 80 } | 85 } |
| 81 | 86 |
| 82 } // namespace content | 87 } // namespace content |
| OLD | NEW |