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 "remoting/host/host_mock_objects.h" | 5 #include "remoting/host/host_mock_objects.h" |
6 | 6 |
7 #include "base/message_loop_proxy.h" | 7 #include "base/message_loop_proxy.h" |
8 #include "base/single_thread_task_runner.h" | |
8 #include "net/base/ip_endpoint.h" | 9 #include "net/base/ip_endpoint.h" |
9 #include "remoting/base/auto_thread_task_runner.h" | 10 #include "remoting/base/auto_thread_task_runner.h" |
11 #include "remoting/capturer/video_frame_capturer.h" | |
12 #include "remoting/codec/audio_encoder.h" | |
13 #include "remoting/codec/video_encoder.h" | |
14 #include "remoting/host/audio_capturer.h" | |
15 #include "remoting/host/event_executor.h" | |
10 #include "remoting/proto/event.pb.h" | 16 #include "remoting/proto/event.pb.h" |
11 #include "remoting/protocol/transport.h" | 17 #include "remoting/protocol/transport.h" |
12 | 18 |
13 namespace remoting { | 19 namespace remoting { |
14 | 20 |
15 MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory() | 21 MockDesktopEnvironment::MockDesktopEnvironment() {} |
16 : DesktopEnvironmentFactory(NULL, NULL) { | 22 |
23 MockDesktopEnvironment::~MockDesktopEnvironment() {} | |
24 | |
25 scoped_ptr<AudioCapturer> MockDesktopEnvironment::CreateAudioCapturer( | |
26 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) { | |
27 return scoped_ptr<AudioCapturer>(CreateAudioCapturerPtr(audio_task_runner)); | |
Wez
2013/01/11 02:23:41
audio_task_runner.get() - implicit cast to raw poi
alexeypa (please no reviews)
2013/01/11 19:59:46
CreateAudioCapturerPtr takes scoped_refptr. The re
Wez
2013/01/12 01:58:06
Ah yes!
| |
28 } | |
29 | |
30 scoped_ptr<EventExecutor> MockDesktopEnvironment::CreateEventExecutor( | |
31 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, | |
32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) { | |
33 return scoped_ptr<EventExecutor>(CreateEventExecutorPtr(input_task_runner, | |
34 ui_task_runner)); | |
Wez
2013/01/11 02:23:41
Ditto.
alexeypa (please no reviews)
2013/01/11 19:59:46
See above.
| |
35 } | |
36 | |
37 scoped_ptr<VideoFrameCapturer> MockDesktopEnvironment::CreateVideoCapturer( | |
38 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner, | |
39 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) { | |
40 return scoped_ptr<VideoFrameCapturer>(CreateVideoCapturerPtr( | |
41 capture_task_runner, encode_task_runner)); | |
Wez
2013/01/11 02:23:41
Here too.
alexeypa (please no reviews)
2013/01/11 19:59:46
See above.
| |
42 } | |
43 | |
44 MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory( | |
45 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner) | |
46 : DesktopEnvironmentFactory(caller_task_runner) { | |
17 } | 47 } |
18 | 48 |
19 MockDesktopEnvironmentFactory::~MockDesktopEnvironmentFactory() {} | 49 MockDesktopEnvironmentFactory::~MockDesktopEnvironmentFactory() {} |
20 | 50 |
21 scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create() { | 51 scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create( |
52 const std::string& client_jid, | |
53 const base::Closure& disconnect_callback) { | |
22 return scoped_ptr<DesktopEnvironment>(CreatePtr()); | 54 return scoped_ptr<DesktopEnvironment>(CreatePtr()); |
23 } | 55 } |
24 | 56 |
25 MockEventExecutor::MockEventExecutor() {} | 57 MockEventExecutor::MockEventExecutor() {} |
26 | 58 |
27 MockEventExecutor::~MockEventExecutor() {} | 59 MockEventExecutor::~MockEventExecutor() {} |
28 | 60 |
29 void MockEventExecutor::Start( | 61 void MockEventExecutor::Start( |
30 scoped_ptr<protocol::ClipboardStub> client_clipboard) { | 62 scoped_ptr<protocol::ClipboardStub> client_clipboard) { |
31 StartPtr(client_clipboard.get()); | 63 StartPtr(client_clipboard.get()); |
(...skipping 21 matching lines...) Expand all Loading... | |
53 | 85 |
54 MockClientSessionEventHandler::MockClientSessionEventHandler() {} | 86 MockClientSessionEventHandler::MockClientSessionEventHandler() {} |
55 | 87 |
56 MockClientSessionEventHandler::~MockClientSessionEventHandler() {} | 88 MockClientSessionEventHandler::~MockClientSessionEventHandler() {} |
57 | 89 |
58 MockHostStatusObserver::MockHostStatusObserver() {} | 90 MockHostStatusObserver::MockHostStatusObserver() {} |
59 | 91 |
60 MockHostStatusObserver::~MockHostStatusObserver() {} | 92 MockHostStatusObserver::~MockHostStatusObserver() {} |
61 | 93 |
62 } // namespace remoting | 94 } // namespace remoting |
OLD | NEW |