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

Unified Diff: remoting/host/host_mock_objects.h

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/desktop_session_proxy.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/host_mock_objects.h
diff --git a/remoting/host/host_mock_objects.h b/remoting/host/host_mock_objects.h
index e8dd33a2d4f970c53c038d859d7afebc1b0e2b9b..93ef0d696809a13251754715f2a3bdbef1fe971d 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -10,7 +10,6 @@
#include "remoting/host/client_session.h"
#include "remoting/host/continue_window.h"
#include "remoting/host/desktop_environment.h"
-#include "remoting/host/desktop_environment_factory.h"
#include "remoting/host/disconnect_window.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/host_status_observer.h"
@@ -19,8 +18,38 @@
#include "remoting/proto/control.pb.h"
#include "testing/gmock/include/gmock/gmock.h"
+namespace base {
+class SingleThreadTaskRunner;
+} // namespace base
+
namespace remoting {
+class MockDesktopEnvironment : public DesktopEnvironment {
+ public:
+ MockDesktopEnvironment();
+ virtual ~MockDesktopEnvironment();
+
+ MOCK_METHOD1(CreateAudioCapturerPtr,
+ AudioCapturer*(scoped_refptr<base::SingleThreadTaskRunner>));
+ MOCK_METHOD2(CreateEventExecutorPtr,
+ EventExecutor*(scoped_refptr<base::SingleThreadTaskRunner>,
+ scoped_refptr<base::SingleThreadTaskRunner>));
+ MOCK_METHOD2(
+ CreateVideoCapturerPtr,
+ VideoFrameCapturer*(scoped_refptr<base::SingleThreadTaskRunner>,
+ scoped_refptr<base::SingleThreadTaskRunner>));
+
+ // DesktopEnvironment implementation.
+ virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
+ virtual scoped_ptr<EventExecutor> CreateEventExecutor(
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
+ virtual scoped_ptr<VideoFrameCapturer> CreateVideoCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
+};
+
class MockDisconnectWindow : public DisconnectWindow {
public:
MockDisconnectWindow();
@@ -81,8 +110,11 @@ class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
virtual ~MockDesktopEnvironmentFactory();
MOCK_METHOD0(CreatePtr, DesktopEnvironment*());
+ MOCK_CONST_METHOD0(SupportsAudioCapture, bool());
- virtual scoped_ptr<DesktopEnvironment> Create() OVERRIDE;
+ virtual scoped_ptr<DesktopEnvironment> Create(
+ const std::string& client_jid,
+ const base::Closure& disconnect_callback) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(MockDesktopEnvironmentFactory);
« no previous file with comments | « remoting/host/desktop_session_proxy.cc ('k') | remoting/host/host_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698