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

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
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..0adc7fd5b4af193d1765cd90d021ca444088610d 100644
--- a/remoting/host/host_mock_objects.cc
+++ b/remoting/host/host_mock_objects.cc
@@ -5,20 +5,52 @@
#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));
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!
+}
+
+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));
Wez 2013/01/11 02:23:41 Ditto.
alexeypa (please no reviews) 2013/01/11 19:59:46 See above.
+}
+
+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));
Wez 2013/01/11 02:23:41 Here too.
alexeypa (please no reviews) 2013/01/11 19:59:46 See above.
+}
+
+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());
}

Powered by Google App Engine
This is Rietveld 408576698