| 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 "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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |