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 "remoting/host/mouse_cursor_monitor_proxy.h" | 5 #include "remoting/host/mouse_cursor_monitor_proxy.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 webrtc::MouseCursorMonitor::CursorState state, | 117 webrtc::MouseCursorMonitor::CursorState state, |
118 const webrtc::DesktopVector& position) { | 118 const webrtc::DesktopVector& position) { |
119 NOTREACHED(); | 119 NOTREACHED(); |
120 } | 120 } |
121 | 121 |
122 TEST_F(MouseCursorMonitorProxyTest, CursorShape) { | 122 TEST_F(MouseCursorMonitorProxyTest, CursorShape) { |
123 // Initialize the proxy. | 123 // Initialize the proxy. |
124 proxy_.reset(new MouseCursorMonitorProxy( | 124 proxy_.reset(new MouseCursorMonitorProxy( |
125 capture_thread_.task_runner(), | 125 capture_thread_.task_runner(), |
126 webrtc::DesktopCaptureOptions::CreateDefault())); | 126 webrtc::DesktopCaptureOptions::CreateDefault())); |
127 proxy_->SetMouseCursorMonitorForTests(base::WrapUnique( | 127 proxy_->SetMouseCursorMonitorForTests( |
128 new ThreadCheckMouseCursorMonitor(capture_thread_.task_runner()))); | 128 base::MakeUnique<ThreadCheckMouseCursorMonitor>( |
| 129 capture_thread_.task_runner())); |
129 proxy_->Init(this, webrtc::MouseCursorMonitor::SHAPE_ONLY); | 130 proxy_->Init(this, webrtc::MouseCursorMonitor::SHAPE_ONLY); |
130 proxy_->Capture(); | 131 proxy_->Capture(); |
131 | 132 |
132 // |run_loop_| will be stopped when the first cursor is received. | 133 // |run_loop_| will be stopped when the first cursor is received. |
133 run_loop_.Run(); | 134 run_loop_.Run(); |
134 } | 135 } |
135 | 136 |
136 } // namespace remoting | 137 } // namespace remoting |
OLD | NEW |