| 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 24 matching lines...) Expand all Loading... |
| 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::IncrementInFlightEventCount( | 40 void MockInputRouterClient::IncrementInFlightEventCount( |
| 41 blink::WebInputEvent::Type event_type) { | 41 blink::WebInputEvent::Type event_type) { |
| 42 ++in_flight_event_count_; | 42 ++in_flight_event_count_; |
| 43 } | 43 } |
| 44 | 44 |
| 45 void MockInputRouterClient::DecrementInFlightEventCount() { | 45 void MockInputRouterClient::DecrementInFlightEventCount( |
| 46 InputEventAckSource ack_source) { |
| 46 --in_flight_event_count_; | 47 --in_flight_event_count_; |
| 47 } | 48 } |
| 48 | 49 |
| 49 void MockInputRouterClient::OnHasTouchEventHandlers( | 50 void MockInputRouterClient::OnHasTouchEventHandlers( |
| 50 bool has_handlers) { | 51 bool has_handlers) { |
| 51 has_touch_handler_ = has_handlers; | 52 has_touch_handler_ = has_handlers; |
| 52 } | 53 } |
| 53 | 54 |
| 54 void MockInputRouterClient::DidFlush() { | 55 void MockInputRouterClient::DidFlush() { |
| 55 ++did_flush_called_count_; | 56 ++did_flush_called_count_; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 83 return did_flush_called_count; | 84 return did_flush_called_count; |
| 84 } | 85 } |
| 85 | 86 |
| 86 ui::DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { | 87 ui::DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { |
| 87 ui::DidOverscrollParams overscroll; | 88 ui::DidOverscrollParams overscroll; |
| 88 std::swap(overscroll_, overscroll); | 89 std::swap(overscroll_, overscroll); |
| 89 return overscroll; | 90 return overscroll; |
| 90 } | 91 } |
| 91 | 92 |
| 92 } // namespace content | 93 } // namespace content |
| OLD | NEW |