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

Unified Diff: remoting/host/host_mock_objects.h

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/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..9fce259288db9781762f50739a53a691af01ccec 100644
--- a/remoting/host/host_mock_objects.h
+++ b/remoting/host/host_mock_objects.h
@@ -21,6 +21,50 @@
namespace remoting {
+class MockDesktopEnvironment : public DesktopEnvironment {
+ public:
+ MockDesktopEnvironment();
+ virtual ~MockDesktopEnvironment();
+
+ // protocol::ClipboardStub implementation.
+ MOCK_METHOD1(InjectClipboardEvent, void(const protocol::ClipboardEvent&));
+
+ // protocol::InputStub implementation.
+ MOCK_METHOD1(InjectKeyEvent, void(const protocol::KeyEvent&));
+ MOCK_METHOD1(InjectMouseEvent, void(const protocol::MouseEvent&));
+
+ // DesktopEnvironment implementation.
+ MOCK_METHOD3(StartAudioPtr, void(
+ scoped_refptr<base::SingleThreadTaskRunner>,
+ AudioEncoder*,
+ protocol::AudioStub*));
+ MOCK_METHOD1(PauseAudio, void(bool));
+ MOCK_METHOD3(StartInput, void(
+ scoped_refptr<base::SingleThreadTaskRunner>,
+ scoped_refptr<base::SingleThreadTaskRunner>,
+ protocol::ClipboardStub*));
+ MOCK_METHOD5(StartVideoPtr, void(
+ scoped_refptr<base::SingleThreadTaskRunner>,
+ scoped_refptr<base::SingleThreadTaskRunner>,
+ VideoEncoder*,
+ protocol::CursorShapeStub*,
+ protocol::VideoStub*));
+ MOCK_CONST_METHOD0(GetScreenSize, SkISize());
+ MOCK_METHOD1(PauseVideo, void(bool));
+ MOCK_METHOD1(UpdateSequenceNumber, void(int64));
+
+ virtual void StartAudio(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ scoped_ptr<AudioEncoder> audio_encoder,
+ protocol::AudioStub* audio_stub) OVERRIDE;
+ virtual void 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) OVERRIDE;
+};
+
class MockDisconnectWindow : public DisconnectWindow {
public:
MockDisconnectWindow();
@@ -77,12 +121,15 @@ class MockClientSessionEventHandler : public ClientSession::EventHandler {
class MockDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
public:
- MockDesktopEnvironmentFactory();
+ explicit MockDesktopEnvironmentFactory(
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner);
virtual ~MockDesktopEnvironmentFactory();
MOCK_METHOD0(CreatePtr, DesktopEnvironment*());
- 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