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

Unified Diff: remoting/host/basic_desktop_environment.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/audio_scheduler.cc ('k') | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/basic_desktop_environment.h
diff --git a/remoting/host/basic_desktop_environment.h b/remoting/host/basic_desktop_environment.h
new file mode 100644
index 0000000000000000000000000000000000000000..4d0c08e1b5a89503a407e071925a0231a98a5d09
--- /dev/null
+++ b/remoting/host/basic_desktop_environment.h
@@ -0,0 +1,58 @@
+// 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_BASIC_DESKTOP_ENVIRONMENT_H_
+#define REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/non_thread_safe.h"
+#include "remoting/host/desktop_environment.h"
+
+namespace remoting {
+
+// Used to create audio/video capturers and event executor that work with
+// the local console.
+class BasicDesktopEnvironment
+ : public base::NonThreadSafe,
+ public DesktopEnvironment {
+ public:
+ BasicDesktopEnvironment();
+ virtual ~BasicDesktopEnvironment();
+
+ // 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;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment);
+};
+
+// Used to create |BasicDesktopEnvironment| instances.
+class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
+ public:
+ BasicDesktopEnvironmentFactory();
+ virtual ~BasicDesktopEnvironmentFactory();
+
+ // DesktopEnvironmentFactory implementation.
+ virtual scoped_ptr<DesktopEnvironment> Create(
+ const std::string& client_jid,
+ const base::Closure& disconnect_callback) OVERRIDE;
+ virtual bool SupportsAudioCapture() const OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_BASIC_DESKTOP_ENVIRONMENT_H_
« no previous file with comments | « remoting/host/audio_scheduler.cc ('k') | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698