Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: remoting/host/video_scheduler_unittest.cc

Issue 14520018: Create the desktop environment before any of the channel were connected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/video_scheduler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 110
111 void VideoSchedulerTest::SetUp() { 111 void VideoSchedulerTest::SetUp() {
112 task_runner_ = new AutoThreadTaskRunner( 112 task_runner_ = new AutoThreadTaskRunner(
113 message_loop_.message_loop_proxy(), run_loop_.QuitClosure()); 113 message_loop_.message_loop_proxy(), run_loop_.QuitClosure());
114 114
115 encoder_ = new MockVideoEncoder(); 115 encoder_ = new MockVideoEncoder();
116 } 116 }
117 117
118 void VideoSchedulerTest::StartVideoScheduler( 118 void VideoSchedulerTest::StartVideoScheduler(
119 scoped_ptr<media::ScreenCapturer> capturer) { 119 scoped_ptr<media::ScreenCapturer> capturer) {
120 scheduler_ = VideoScheduler::Create( 120 scheduler_ = new VideoScheduler(
121 task_runner_, // Capture 121 task_runner_, // Capture
122 task_runner_, // Encode 122 task_runner_, // Encode
123 task_runner_, // Network 123 task_runner_, // Network
124 capturer.Pass(), 124 capturer.Pass(),
125 scoped_ptr<VideoEncoder>(encoder_), 125 scoped_ptr<VideoEncoder>(encoder_),
126 &client_stub_, 126 &client_stub_,
127 &video_stub_); 127 &video_stub_);
128 scheduler_->Start();
128 } 129 }
129 130
130 void VideoSchedulerTest::StopVideoScheduler() { 131 void VideoSchedulerTest::StopVideoScheduler() {
131 scheduler_->Stop(); 132 scheduler_->Stop();
132 scheduler_ = NULL; 133 scheduler_ = NULL;
133 } 134 }
134 135
135 void VideoSchedulerTest::OnCapturerStart( 136 void VideoSchedulerTest::OnCapturerStart(
136 media::ScreenCapturer::Delegate* delegate) { 137 media::ScreenCapturer::Delegate* delegate) {
137 EXPECT_FALSE(capturer_delegate_); 138 EXPECT_FALSE(capturer_delegate_);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 .RetiresOnSaturation(); 189 .RetiresOnSaturation();
189 190
190 // Start video frame capture. 191 // Start video frame capture.
191 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>()); 192 StartVideoScheduler(capturer.PassAs<media::ScreenCapturer>());
192 193
193 task_runner_ = NULL; 194 task_runner_ = NULL;
194 run_loop_.Run(); 195 run_loop_.Run();
195 } 196 }
196 197
197 } // namespace remoting 198 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/video_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698