| 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 "content/renderer/mus/compositor_mus_connection.h" | 5 #include "content/renderer/mus/compositor_mus_connection.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 // Empty implementation of InputHandlerManagerClient. | 117 // Empty implementation of InputHandlerManagerClient. |
| 118 class TestInputHandlerManagerClient | 118 class TestInputHandlerManagerClient |
| 119 : public content::InputHandlerManagerClient { | 119 : public content::InputHandlerManagerClient { |
| 120 public: | 120 public: |
| 121 TestInputHandlerManagerClient() {} | 121 TestInputHandlerManagerClient() {} |
| 122 ~TestInputHandlerManagerClient() override{}; | 122 ~TestInputHandlerManagerClient() override{}; |
| 123 | 123 |
| 124 // content::InputHandlerManagerClient: | 124 // content::InputHandlerManagerClient: |
| 125 void SetBoundHandler(const Handler& handler) override {} | 125 void SetInputHandlerManager( |
| 126 content::InputHandlerManager* input_handler_manager) override {} |
| 126 void RegisterRoutingID(int routing_id) override {} | 127 void RegisterRoutingID(int routing_id) override {} |
| 127 void UnregisterRoutingID(int routing_id) override {} | 128 void UnregisterRoutingID(int routing_id) override {} |
| 128 void DidOverscroll(int routing_id, | 129 void DidOverscroll(int routing_id, |
| 129 const ui::DidOverscrollParams& params) override {} | 130 const ui::DidOverscrollParams& params) override {} |
| 130 void DidStartFlinging(int routing_id) override {} | 131 void DidStartFlinging(int routing_id) override {} |
| 131 void DidStopFlinging(int routing_id) override {} | 132 void DidStopFlinging(int routing_id) override {} |
| 132 void NotifyInputEventHandled( | 133 void NotifyInputEventHandled( |
| 133 int routing_id, | 134 int routing_id, |
| 134 blink::WebInputEvent::Type type, | 135 blink::WebInputEvent::Type type, |
| 135 content::InputEventAckState ack_result) override {} | 136 content::InputEventAckState ack_result) override {} |
| 137 void ProcessRafAlignedInput(int routing_id) override {} |
| 136 | 138 |
| 137 private: | 139 private: |
| 138 DISALLOW_COPY_AND_ASSIGN(TestInputHandlerManagerClient); | 140 DISALLOW_COPY_AND_ASSIGN(TestInputHandlerManagerClient); |
| 139 }; | 141 }; |
| 140 | 142 |
| 141 // Implementation of RenderWidget for testing, performs no initialization. | 143 // Implementation of RenderWidget for testing, performs no initialization. |
| 142 class TestRenderWidget : public content::RenderWidget { | 144 class TestRenderWidget : public content::RenderWidget { |
| 143 public: | 145 public: |
| 144 explicit TestRenderWidget(content::CompositorDependencies* compositor_deps) | 146 explicit TestRenderWidget(content::CompositorDependencies* compositor_deps) |
| 145 : content::RenderWidget(compositor_deps, | 147 : content::RenderWidget(compositor_deps, |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 EXPECT_FALSE(ack_callback.get()); | 485 EXPECT_FALSE(ack_callback.get()); |
| 484 | 486 |
| 485 VerifyAndRunQueues(true, true); | 487 VerifyAndRunQueues(true, true); |
| 486 | 488 |
| 487 // The ack callback should have been called | 489 // The ack callback should have been called |
| 488 EXPECT_TRUE(test_callback->called()); | 490 EXPECT_TRUE(test_callback->called()); |
| 489 EXPECT_EQ(EventResult::HANDLED, test_callback->result()); | 491 EXPECT_EQ(EventResult::HANDLED, test_callback->result()); |
| 490 } | 492 } |
| 491 | 493 |
| 492 } // namespace content | 494 } // namespace content |
| OLD | NEW |