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

Unified Diff: remoting/host/host_mock_objects.cc

Issue 11778049: Making DesktopEnvironment a factory class used by ClientSession to create audio/video capturers and… (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 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..2fa3d8f3a798900699ffbc724cf549b5ac1e6124 100644
--- a/remoting/host/host_mock_objects.cc
+++ b/remoting/host/host_mock_objects.cc
@@ -5,20 +5,49 @@
#include "remoting/host/host_mock_objects.h"
#include "base/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
#include "net/base/ip_endpoint.h"
#include "remoting/base/auto_thread_task_runner.h"
+#include "remoting/capturer/video_frame_capturer.h"
+#include "remoting/codec/audio_encoder.h"
+#include "remoting/codec/video_encoder.h"
+#include "remoting/host/audio_capturer.h"
+#include "remoting/host/event_executor.h"
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/transport.h"
namespace remoting {
-MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory()
- : DesktopEnvironmentFactory(NULL, NULL) {
+MockDesktopEnvironment::MockDesktopEnvironment() {}
+
+MockDesktopEnvironment::~MockDesktopEnvironment() {}
+
+scoped_ptr<AudioCapturer> MockDesktopEnvironment::CreateAudioCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) {
+ return scoped_ptr<AudioCapturer>(CreateAudioCapturerPtr(audio_task_runner));
+}
+
+scoped_ptr<EventExecutor> MockDesktopEnvironment::CreateEventExecutor(
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+ return scoped_ptr<EventExecutor>(CreateEventExecutorPtr(input_task_runner,
+ ui_task_runner));
}
+scoped_ptr<VideoFrameCapturer> MockDesktopEnvironment::CreateVideoCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {
+ return scoped_ptr<VideoFrameCapturer>(CreateVideoCapturerPtr(
+ capture_task_runner, encode_task_runner));
+}
+
+MockDesktopEnvironmentFactory::MockDesktopEnvironmentFactory() {}
+
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