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

Unified Diff: remoting/host/desktop_environment_fake.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_environment_factory.cc ('k') | remoting/host/desktop_environment_fake.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/desktop_environment_fake.h
diff --git a/remoting/host/desktop_environment_fake.h b/remoting/host/desktop_environment_fake.h
new file mode 100644
index 0000000000000000000000000000000000000000..44a9624388044aa860523e58bead4a9ffcb9d1b1
--- /dev/null
+++ b/remoting/host/desktop_environment_fake.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_FAKE_H_
+#define REMOTING_HOST_DESKTOP_ENVIRONMENT_FAKE_H_
+
+#include "remoting/host/desktop_environment.h"
+
+namespace remoting {
+
+class VideoScheduler;
+
+// A dummy implementation of |DesktopEnvironment| that does nothing.
+class DesktopEnvironmentFake : public DesktopEnvironment {
+ public:
+ explicit DesktopEnvironmentFake(
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner);
+ virtual ~DesktopEnvironmentFake();
+
+ // protocol::ClipboardStub implementation.
+ virtual void InjectClipboardEvent(
+ const protocol::ClipboardEvent& event) OVERRIDE;
+
+ // protocol::InputStub implementation.
+ virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
+ virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
+
+ // DesktopEnvironment implementation.
+ virtual void StartAudio(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
+ scoped_ptr<AudioEncoder> audio_encoder,
+ protocol::AudioStub* audio_stub) OVERRIDE;
+ virtual void PauseAudio(bool pause) OVERRIDE;
+ virtual void StartInput(
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ protocol::ClipboardStub* clipboard_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;
+ virtual SkISize GetScreenSize() const OVERRIDE;
+ virtual void PauseVideo(bool pause) OVERRIDE;
+ virtual void UpdateSequenceNumber(int64 sequence_number) OVERRIDE;
+
+ private:
+ scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner_;
+
+ scoped_refptr<VideoScheduler> video_scheduler_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopEnvironmentFake);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_FAKE_H_
« no previous file with comments | « remoting/host/desktop_environment_factory.cc ('k') | remoting/host/desktop_environment_fake.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698