| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/video_scheduler.h" | 5 #include "remoting/host/video_scheduler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 private: | 120 private: |
| 121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 121 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 122 | 122 |
| 123 DISALLOW_COPY_AND_ASSIGN(ThreadCheckMouseCursorMonitor); | 123 DISALLOW_COPY_AND_ASSIGN(ThreadCheckMouseCursorMonitor); |
| 124 }; | 124 }; |
| 125 | 125 |
| 126 class VideoSchedulerTest : public testing::Test { | 126 class VideoSchedulerTest : public testing::Test { |
| 127 public: | 127 public: |
| 128 VideoSchedulerTest(); | 128 VideoSchedulerTest(); |
| 129 | 129 |
| 130 virtual void SetUp() override; | 130 void SetUp() override; |
| 131 virtual void TearDown() override; | 131 void TearDown() override; |
| 132 | 132 |
| 133 void StartVideoScheduler( | 133 void StartVideoScheduler( |
| 134 scoped_ptr<webrtc::DesktopCapturer> capturer, | 134 scoped_ptr<webrtc::DesktopCapturer> capturer, |
| 135 scoped_ptr<VideoEncoder> encoder, | 135 scoped_ptr<VideoEncoder> encoder, |
| 136 scoped_ptr<webrtc::MouseCursorMonitor> mouse_monitor); | 136 scoped_ptr<webrtc::MouseCursorMonitor> mouse_monitor); |
| 137 void StopVideoScheduler(); | 137 void StopVideoScheduler(); |
| 138 | 138 |
| 139 // webrtc::DesktopCapturer mocks. | 139 // webrtc::DesktopCapturer mocks. |
| 140 void OnCapturerStart(webrtc::DesktopCapturer::Callback* callback); | 140 void OnCapturerStart(webrtc::DesktopCapturer::Callback* callback); |
| 141 void OnCaptureFrame(const webrtc::DesktopRegion& region); | 141 void OnCaptureFrame(const webrtc::DesktopRegion& region); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 new ThreadCheckMouseCursorMonitor(capture_task_runner_)); | 338 new ThreadCheckMouseCursorMonitor(capture_task_runner_)); |
| 339 | 339 |
| 340 // Start and stop the scheduler, so it will tear down the screen capturer, | 340 // Start and stop the scheduler, so it will tear down the screen capturer, |
| 341 // video encoder and mouse monitor. | 341 // video encoder and mouse monitor. |
| 342 StartVideoScheduler(capturer.Pass(), encoder.Pass(), | 342 StartVideoScheduler(capturer.Pass(), encoder.Pass(), |
| 343 mouse_cursor_monitor.Pass()); | 343 mouse_cursor_monitor.Pass()); |
| 344 StopVideoScheduler(); | 344 StopVideoScheduler(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 } // namespace remoting | 347 } // namespace remoting |
| OLD | NEW |