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/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop_proxy.h" | 8 #include "base/message_loop_proxy.h" |
9 #include "remoting/base/auto_thread_task_runner.h" | 9 #include "remoting/base/auto_thread_task_runner.h" |
10 #include "remoting/capturer/video_frame_capturer_fake.h" | 10 #include "remoting/capturer/video_frame_capturer_fake.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 | 77 |
78 // A test-only version of Start that does not register a HostStatusObserver. | 78 // A test-only version of Start that does not register a HostStatusObserver. |
79 // TODO(rmsousa): Make the unit tests work with the regular Start(). | 79 // TODO(rmsousa): Make the unit tests work with the regular Start(). |
80 virtual void Start(ChromotingHost* host, | 80 virtual void Start(ChromotingHost* host, |
81 const base::Closure& disconnect_callback) OVERRIDE; | 81 const base::Closure& disconnect_callback) OVERRIDE; |
82 }; | 82 }; |
83 | 83 |
84 MockIt2MeHostUserInterface::MockIt2MeHostUserInterface( | 84 MockIt2MeHostUserInterface::MockIt2MeHostUserInterface( |
85 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 85 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, |
86 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) | 86 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) |
87 : It2MeHostUserInterface(network_task_runner, ui_task_runner) { | 87 : It2MeHostUserInterface(network_task_runner, ui_task_runner, UiStrings()) { |
88 } | 88 } |
89 | 89 |
90 void MockIt2MeHostUserInterface::InitFrom( | 90 void MockIt2MeHostUserInterface::InitFrom( |
91 scoped_ptr<DisconnectWindow> disconnect_window, | 91 scoped_ptr<DisconnectWindow> disconnect_window, |
92 scoped_ptr<ContinueWindow> continue_window, | 92 scoped_ptr<ContinueWindow> continue_window, |
93 scoped_ptr<LocalInputMonitor> local_input_monitor) { | 93 scoped_ptr<LocalInputMonitor> local_input_monitor) { |
94 DCHECK(ui_task_runner()->BelongsToCurrentThread()); | 94 DCHECK(ui_task_runner()->BelongsToCurrentThread()); |
95 | 95 |
96 disconnect_window_ = disconnect_window.Pass(); | 96 disconnect_window_ = disconnect_window.Pass(); |
97 continue_window_ = continue_window.Pass(); | 97 continue_window_ = continue_window.Pass(); |
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
688 ExpectClientDisconnected(0, true, video_packet_sent, | 688 ExpectClientDisconnected(0, true, video_packet_sent, |
689 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); | 689 InvokeWithoutArgs(this, &ChromotingHostTest::ShutdownHost)); |
690 EXPECT_CALL(host_status_observer_, OnShutdown()); | 690 EXPECT_CALL(host_status_observer_, OnShutdown()); |
691 | 691 |
692 host_->Start(xmpp_login_); | 692 host_->Start(xmpp_login_); |
693 SimulateClientConnection(0, true, false); | 693 SimulateClientConnection(0, true, false); |
694 message_loop_.Run(); | 694 message_loop_.Run(); |
695 } | 695 } |
696 | 696 |
697 } // namespace remoting | 697 } // namespace remoting |
OLD | NEW |