| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <new> | 7 #include <new> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 feature_list_.InitFromCommandLine(base::JoinString(features, ","), | 63 feature_list_.InitFromCommandLine(base::JoinString(features, ","), |
| 64 std::string()); | 64 std::string()); |
| 65 } | 65 } |
| 66 | 66 |
| 67 void SetUp() override { | 67 void SetUp() override { |
| 68 queue_ = new MainThreadEventQueue(kTestRoutingID, this, main_task_runner_, | 68 queue_ = new MainThreadEventQueue(kTestRoutingID, this, main_task_runner_, |
| 69 &renderer_scheduler_); | 69 &renderer_scheduler_); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void HandleEventOnMainThread(int routing_id, | 72 void HandleEventOnMainThread( |
| 73 const blink::WebInputEvent* event, | 73 int routing_id, |
| 74 const ui::LatencyInfo& latency, | 74 const blink::WebInputEvent* event, |
| 75 InputEventDispatchType type) override { | 75 const std::vector<const blink::WebInputEvent*>& coalescedEvents, |
| 76 const ui::LatencyInfo& latency, |
| 77 InputEventDispatchType type) override { |
| 76 EXPECT_EQ(kTestRoutingID, routing_id); | 78 EXPECT_EQ(kTestRoutingID, routing_id); |
| 77 handled_events_.push_back(ui::WebInputEventTraits::Clone(*event)); | 79 handled_events_.push_back(ui::WebInputEventTraits::Clone(*event)); |
| 78 queue_->EventHandled(event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED); | 80 queue_->EventHandled(event->type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| 79 } | 81 } |
| 80 | 82 |
| 81 void SendInputEventAck(int routing_id, | 83 void SendInputEventAck(int routing_id, |
| 82 blink::WebInputEvent::Type type, | 84 blink::WebInputEvent::Type type, |
| 83 InputEventAckState ack_result, | 85 InputEventAckState ack_result, |
| 84 uint32_t touch_event_id) override { | 86 uint32_t touch_event_id) override { |
| 85 additional_acked_events_.push_back(touch_event_id); | 87 additional_acked_events_.push_back(touch_event_id); |
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 | 579 |
| 578 // The boolean parameterized test varies whether rAF aligned input | 580 // The boolean parameterized test varies whether rAF aligned input |
| 579 // is enabled or not. | 581 // is enabled or not. |
| 580 INSTANTIATE_TEST_CASE_P( | 582 INSTANTIATE_TEST_CASE_P( |
| 581 MainThreadEventQueueTests, | 583 MainThreadEventQueueTests, |
| 582 MainThreadEventQueueTest, | 584 MainThreadEventQueueTest, |
| 583 testing::Range(0u, | 585 testing::Range(0u, |
| 584 (kRafAlignedEnabledTouch | kRafAlignedEnabledMouse) + 1)); | 586 (kRafAlignedEnabledTouch | kRafAlignedEnabledMouse) + 1)); |
| 585 | 587 |
| 586 } // namespace content | 588 } // namespace content |
| OLD | NEW |