| 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/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
| 8 #include "remoting/jingle_glue/mock_objects.h" | 8 #include "remoting/jingle_glue/mock_objects.h" |
| 9 #include "remoting/host/capturer_fake.h" | 9 #include "remoting/host/capturer_fake.h" |
| 10 #include "remoting/host/chromoting_host.h" | 10 #include "remoting/host/chromoting_host.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 .WillByDefault(Return(message_loop_proxy_.get())); | 81 .WillByDefault(Return(message_loop_proxy_.get())); |
| 82 EXPECT_CALL(context_, main_message_loop()) | 82 EXPECT_CALL(context_, main_message_loop()) |
| 83 .Times(AnyNumber()); | 83 .Times(AnyNumber()); |
| 84 EXPECT_CALL(context_, encode_message_loop()) | 84 EXPECT_CALL(context_, encode_message_loop()) |
| 85 .Times(AnyNumber()); | 85 .Times(AnyNumber()); |
| 86 EXPECT_CALL(context_, network_message_loop()) | 86 EXPECT_CALL(context_, network_message_loop()) |
| 87 .Times(AnyNumber()); | 87 .Times(AnyNumber()); |
| 88 EXPECT_CALL(context_, ui_message_loop()) | 88 EXPECT_CALL(context_, ui_message_loop()) |
| 89 .Times(AnyNumber()); | 89 .Times(AnyNumber()); |
| 90 | 90 |
| 91 Capturer* capturer = new CapturerFake(); | 91 scoped_ptr<Capturer> capturer(new CapturerFake()); |
| 92 event_executor_ = new MockEventExecutor(); | 92 event_executor_ = new MockEventExecutor(); |
| 93 desktop_environment_.reset( | 93 desktop_environment_ = DesktopEnvironment::CreateFake( |
| 94 new DesktopEnvironment(&context_, capturer, event_executor_)); | 94 &context_, |
| 95 capturer.Pass(), |
| 96 scoped_ptr<protocol::InputStub>(event_executor_)); |
| 95 | 97 |
| 96 host_ = new ChromotingHost( | 98 host_ = new ChromotingHost( |
| 97 &context_, &signal_strategy_, desktop_environment_.get(), | 99 &context_, &signal_strategy_, desktop_environment_.get(), |
| 98 protocol::NetworkSettings()); | 100 protocol::NetworkSettings()); |
| 99 | 101 |
| 100 disconnect_window_ = new MockDisconnectWindow(); | 102 disconnect_window_ = new MockDisconnectWindow(); |
| 101 continue_window_ = new MockContinueWindow(); | 103 continue_window_ = new MockContinueWindow(); |
| 102 local_input_monitor_ = new MockLocalInputMonitor(); | 104 local_input_monitor_ = new MockLocalInputMonitor(); |
| 103 it2me_host_user_interface_.reset(new It2MeHostUserInterface(host_, | 105 it2me_host_user_interface_.reset(new It2MeHostUserInterface(host_, |
| 104 &context_)); | 106 &context_)); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 EXPECT_CALL(*connection_, Disconnect()) | 369 EXPECT_CALL(*connection_, Disconnect()) |
| 368 .RetiresOnSaturation(); | 370 .RetiresOnSaturation(); |
| 369 EXPECT_CALL(*connection2_, Disconnect()) | 371 EXPECT_CALL(*connection2_, Disconnect()) |
| 370 .RetiresOnSaturation(); | 372 .RetiresOnSaturation(); |
| 371 | 373 |
| 372 SimulateClientConnection(0, true); | 374 SimulateClientConnection(0, true); |
| 373 message_loop_.Run(); | 375 message_loop_.Run(); |
| 374 } | 376 } |
| 375 | 377 |
| 376 } // namespace remoting | 378 } // namespace remoting |
| OLD | NEW |