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

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

Issue 11761019: Tiny little refactoring of DesktopEnvironment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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/host_mock_objects.h ('k') | remoting/host/ipc_audio_capturer.h » ('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 "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 "net/base/ip_endpoint.h" 8 #include "net/base/ip_endpoint.h"
9 #include "remoting/base/auto_thread_task_runner.h" 9 #include "remoting/base/auto_thread_task_runner.h"
10 #include "remoting/codec/audio_encoder.h"
11 #include "remoting/codec/video_encoder.h"
10 #include "remoting/proto/event.pb.h" 12 #include "remoting/proto/event.pb.h"
11 #include "remoting/protocol/transport.h" 13 #include "remoting/protocol/transport.h"
12 14
13 namespace remoting { 15 namespace remoting {
14 16
15 MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory() 17 MockDesktopEnvironment::MockDesktopEnvironment() {}
16 : DesktopEnvironmentFactory(NULL, NULL) { 18
19 MockDesktopEnvironment::~MockDesktopEnvironment() {}
20
21 void MockDesktopEnvironment::StartAudio(
22 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
23 scoped_ptr<AudioEncoder> audio_encoder,
24 protocol::AudioStub* audio_stub) {
25 StartAudioPtr(audio_task_runner, audio_encoder.get(), audio_stub);
26 }
27
28 void MockDesktopEnvironment::StartVideo(
29 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
30 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
31 scoped_ptr<VideoEncoder> video_encoder,
32 protocol::CursorShapeStub* cursor_shape_stub,
33 protocol::VideoStub* video_stub) {
34 StartVideoPtr(capture_task_runner, encode_task_runner, video_encoder.get(),
35 cursor_shape_stub, video_stub);
36 }
37
38 MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory(
39 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner)
40 : DesktopEnvironmentFactory(caller_task_runner) {
17 } 41 }
18 42
19 MockDesktopEnvironmentFactory::~MockDesktopEnvironmentFactory() {} 43 MockDesktopEnvironmentFactory::~MockDesktopEnvironmentFactory() {}
20 44
21 scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create() { 45 scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create(
46 const std::string& client_jid,
47 const base::Closure& disconnect_callback) {
22 return scoped_ptr<DesktopEnvironment>(CreatePtr()); 48 return scoped_ptr<DesktopEnvironment>(CreatePtr());
23 } 49 }
24 50
25 MockEventExecutor::MockEventExecutor() {} 51 MockEventExecutor::MockEventExecutor() {}
26 52
27 MockEventExecutor::~MockEventExecutor() {} 53 MockEventExecutor::~MockEventExecutor() {}
28 54
29 void MockEventExecutor::Start( 55 void MockEventExecutor::Start(
30 scoped_ptr<protocol::ClipboardStub> client_clipboard) { 56 scoped_ptr<protocol::ClipboardStub> client_clipboard) {
31 StartPtr(client_clipboard.get()); 57 StartPtr(client_clipboard.get());
(...skipping 21 matching lines...) Expand all
53 79
54 MockClientSessionEventHandler::MockClientSessionEventHandler() {} 80 MockClientSessionEventHandler::MockClientSessionEventHandler() {}
55 81
56 MockClientSessionEventHandler::~MockClientSessionEventHandler() {} 82 MockClientSessionEventHandler::~MockClientSessionEventHandler() {}
57 83
58 MockHostStatusObserver::MockHostStatusObserver() {} 84 MockHostStatusObserver::MockHostStatusObserver() {}
59 85
60 MockHostStatusObserver::~MockHostStatusObserver() {} 86 MockHostStatusObserver::~MockHostStatusObserver() {}
61 87
62 } // namespace remoting 88 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/ipc_audio_capturer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698