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

Unified 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, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/host_mock_objects.h ('k') | remoting/host/ipc_audio_capturer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_mock_objects.cc
diff --git a/remoting/host/host_mock_objects.cc b/remoting/host/host_mock_objects.cc
index f9b6c52a523894cf4e7e57bad03754a3a157b188..5a99ff5ad0b3bc1b3f902d67fcbe6434f1de5305 100644
--- a/remoting/host/host_mock_objects.cc
+++ b/remoting/host/host_mock_objects.cc
@@ -7,18 +7,44 @@
#include "base/message_loop_proxy.h"
#include "net/base/ip_endpoint.h"
#include "remoting/base/auto_thread_task_runner.h"
+#include "remoting/codec/audio_encoder.h"
+#include "remoting/codec/video_encoder.h"
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/transport.h"
namespace remoting {
-MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory()
- : DesktopEnvironmentFactory(NULL, NULL) {
+MockDesktopEnvironment::MockDesktopEnvironment() {}
+
+MockDesktopEnvironment::~MockDesktopEnvironment() {}
+
+void MockDesktopEnvironment::StartAudio(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ scoped_ptr<AudioEncoder> audio_encoder,
+ protocol::AudioStub* audio_stub) {
+ StartAudioPtr(audio_task_runner, audio_encoder.get(), audio_stub);
+}
+
+void MockDesktopEnvironment::StartVideo(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner,
+ scoped_ptr<VideoEncoder> video_encoder,
+ protocol::CursorShapeStub* cursor_shape_stub,
+ protocol::VideoStub* video_stub) {
+ StartVideoPtr(capture_task_runner, encode_task_runner, video_encoder.get(),
+ cursor_shape_stub, video_stub);
+}
+
+MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner)
+ : DesktopEnvironmentFactory(caller_task_runner) {
}
MockDesktopEnvironmentFactory::~MockDesktopEnvironmentFactory() {}
-scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create() {
+scoped_ptr<DesktopEnvironment> MockDesktopEnvironmentFactory::Create(
+ const std::string& client_jid,
+ const base::Closure& disconnect_callback) {
return scoped_ptr<DesktopEnvironment>(CreatePtr());
}
« 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