| 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.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "media/video/capture/screen/screen_capture_data.h" | 10 #include "media/video/capture/screen/screen_capture_data.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 .WillRepeatedly(FinishSend()); | 180 .WillRepeatedly(FinishSend()); |
| 181 | 181 |
| 182 // For the first time when ProcessVideoPacket is received we stop the | 182 // For the first time when ProcessVideoPacket is received we stop the |
| 183 // VideoScheduler. | 183 // VideoScheduler. |
| 184 EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _)) | 184 EXPECT_CALL(video_stub_, ProcessVideoPacketPtr(_, _)) |
| 185 .WillOnce(DoAll( | 185 .WillOnce(DoAll( |
| 186 FinishSend(), | 186 FinishSend(), |
| 187 InvokeWithoutArgs(this, &VideoSchedulerTest::StopVideoScheduler))) | 187 InvokeWithoutArgs(this, &VideoSchedulerTest::StopVideoScheduler))) |
| 188 .RetiresOnSaturation(); | 188 .RetiresOnSaturation(); |
| 189 | 189 |
| 190 EXPECT_CALL(*capturer, Stop()) | |
| 191 .After(capturer_capture) | |
| 192 .WillOnce(Invoke(this, &VideoSchedulerTest::OnCapturerStop)); | |
| 193 | |
| 194 // Start video frame capture. | 190 // Start video frame capture. |
| 195 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); | 191 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); |
| 196 | 192 |
| 197 task_runner_ = NULL; | 193 task_runner_ = NULL; |
| 198 run_loop_.Run(); | 194 run_loop_.Run(); |
| 199 } | 195 } |
| 200 | 196 |
| 201 } // namespace remoting | 197 } // namespace remoting |
| OLD | NEW |