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

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

Issue 11260053: Use correct thread for audio capturing and encoding. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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/client_session.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "remoting/base/auto_thread_task_runner.h" 6 #include "remoting/base/auto_thread_task_runner.h"
7 #include "remoting/base/constants.h" 7 #include "remoting/base/constants.h"
8 #include "remoting/host/audio_capturer.h" 8 #include "remoting/host/audio_capturer.h"
9 #include "remoting/host/client_session.h" 9 #include "remoting/host/client_session.h"
10 #include "remoting/host/desktop_environment.h" 10 #include "remoting/host/desktop_environment.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 new MockConnectionToClient(session, NULL)); 65 new MockConnectionToClient(session, NULL));
66 EXPECT_CALL(*connection, session()).WillRepeatedly(Return(session)); 66 EXPECT_CALL(*connection, session()).WillRepeatedly(Return(session));
67 EXPECT_CALL(*connection, client_stub()) 67 EXPECT_CALL(*connection, client_stub())
68 .WillRepeatedly(Return(&client_stub_)); 68 .WillRepeatedly(Return(&client_stub_));
69 EXPECT_CALL(*connection, video_stub()).WillRepeatedly(Return(&video_stub_)); 69 EXPECT_CALL(*connection, video_stub()).WillRepeatedly(Return(&video_stub_));
70 EXPECT_CALL(*connection, Disconnect()); 70 EXPECT_CALL(*connection, Disconnect());
71 connection_ = connection.get(); 71 connection_ = connection.get();
72 72
73 client_session_ = new ClientSession( 73 client_session_ = new ClientSession(
74 &session_event_handler_, 74 &session_event_handler_,
75 ui_task_runner_, // Audio thread.
75 ui_task_runner_, // Capture thread. 76 ui_task_runner_, // Capture thread.
76 ui_task_runner_, // Encode thread. 77 ui_task_runner_, // Encode thread.
77 ui_task_runner_, // Network thread. 78 ui_task_runner_, // Network thread.
78 connection.PassAs<protocol::ConnectionToClient>(), 79 connection.PassAs<protocol::ConnectionToClient>(),
79 desktop_environment_factory_.get(), 80 desktop_environment_factory_.get(),
80 base::TimeDelta()); 81 base::TimeDelta());
81 } 82 }
82 83
83 virtual void TearDown() OVERRIDE { 84 virtual void TearDown() OVERRIDE {
84 // MockClientSessionEventHandler won't trigger StopAndDelete, so fake it. 85 // MockClientSessionEventHandler won't trigger StopAndDelete, so fake it.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 expected_y[j]))) 371 expected_y[j])))
371 .After(connected); 372 .After(connected);
372 connection_->input_stub()->InjectMouseEvent(event); 373 connection_->input_stub()->InjectMouseEvent(event);
373 } 374 }
374 } 375 }
375 376
376 DisconnectClientSession(); 377 DisconnectClientSession();
377 } 378 }
378 379
379 } // namespace remoting 380 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/client_session.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698