OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "remoting/host/mouse_shape_pump.h" | 5 #include "remoting/host/mouse_shape_pump.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 12 #include "base/run_loop.h" |
11 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
12 #include "remoting/base/auto_thread.h" | 14 #include "remoting/base/auto_thread.h" |
13 #include "remoting/base/auto_thread_task_runner.h" | 15 #include "remoting/base/auto_thread_task_runner.h" |
14 #include "remoting/host/host_mock_objects.h" | 16 #include "remoting/host/host_mock_objects.h" |
15 #include "remoting/proto/control.pb.h" | 17 #include "remoting/proto/control.pb.h" |
16 #include "remoting/proto/video.pb.h" | 18 #include "remoting/proto/video.pb.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 base::RunLoop run_loop; | 133 base::RunLoop run_loop; |
132 | 134 |
133 // Stop the |run_loop| once it has captured the cursor. | 135 // Stop the |run_loop| once it has captured the cursor. |
134 EXPECT_CALL(client_stub_, SetCursorShape(_)) | 136 EXPECT_CALL(client_stub_, SetCursorShape(_)) |
135 .WillOnce(DoAll( | 137 .WillOnce(DoAll( |
136 Invoke(this, &MouseShapePumpTest::SetCursorShape), | 138 Invoke(this, &MouseShapePumpTest::SetCursorShape), |
137 InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit))) | 139 InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit))) |
138 .RetiresOnSaturation(); | 140 .RetiresOnSaturation(); |
139 | 141 |
140 // Start the pump. | 142 // Start the pump. |
141 pump_.reset(new MouseShapePump(capture_task_runner_, cursor_monitor.Pass(), | 143 pump_.reset(new MouseShapePump(capture_task_runner_, |
142 &client_stub_)); | 144 std::move(cursor_monitor), &client_stub_)); |
143 | 145 |
144 run_loop.Run(); | 146 run_loop.Run(); |
145 } | 147 } |
146 | 148 |
147 } // namespace remoting | 149 } // namespace remoting |
OLD | NEW |