| 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 15 matching lines...) Expand all Loading... |
| 26 filter_input_event_called_(false), | 26 filter_input_event_called_(false), |
| 27 did_flush_called_count_(0) { | 27 did_flush_called_count_(0) { |
| 28 } | 28 } |
| 29 | 29 |
| 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, false)); | 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 ++in_flight_event_count_; | 41 ++in_flight_event_count_; |
| 42 } | 42 } |
| 43 | 43 |
| 44 void MockInputRouterClient::DecrementInFlightEventCount() { | 44 void MockInputRouterClient::DecrementInFlightEventCount() { |
| 45 --in_flight_event_count_; | 45 --in_flight_event_count_; |
| 46 } | 46 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 73 return did_flush_called_count; | 73 return did_flush_called_count; |
| 74 } | 74 } |
| 75 | 75 |
| 76 DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { | 76 DidOverscrollParams MockInputRouterClient::GetAndResetOverscroll() { |
| 77 DidOverscrollParams overscroll; | 77 DidOverscrollParams overscroll; |
| 78 std::swap(overscroll_, overscroll); | 78 std::swap(overscroll_, overscroll); |
| 79 return overscroll; | 79 return overscroll; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace content | 82 } // namespace content |
| OLD | NEW |