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

Unified Diff: remoting/host/basic_desktop_environment.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
« no previous file with comments | « remoting/host/basic_desktop_environment.h ('k') | remoting/host/chromoting_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/basic_desktop_environment.cc
diff --git a/remoting/host/basic_desktop_environment.cc b/remoting/host/basic_desktop_environment.cc
new file mode 100644
index 0000000000000000000000000000000000000000..040fe887139730ae50acc0db42538cc0d7137836
--- /dev/null
+++ b/remoting/host/basic_desktop_environment.cc
@@ -0,0 +1,60 @@
+// 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.
+
+#include "remoting/host/basic_desktop_environment.h"
+
+#include "base/logging.h"
+#include "remoting/capturer/video_frame_capturer.h"
+#include "remoting/host/audio_capturer.h"
+#include "remoting/host/event_executor.h"
+
+namespace remoting {
+
+BasicDesktopEnvironment::BasicDesktopEnvironment() {
+}
+
+BasicDesktopEnvironment::~BasicDesktopEnvironment() {
+ DCHECK(CalledOnValidThread());
+}
+
+scoped_ptr<AudioCapturer> BasicDesktopEnvironment::CreateAudioCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) {
+ DCHECK(CalledOnValidThread());
+
+ return AudioCapturer::Create();
+}
+
+scoped_ptr<EventExecutor> BasicDesktopEnvironment::CreateEventExecutor(
+ scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
+ DCHECK(CalledOnValidThread());
+
+ return EventExecutor::Create(input_task_runner, ui_task_runner);
+}
+
+scoped_ptr<VideoFrameCapturer> BasicDesktopEnvironment::CreateVideoCapturer(
+ scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
+ scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {
+ DCHECK(CalledOnValidThread());
+
+ return VideoFrameCapturer::Create();
+}
+
+BasicDesktopEnvironmentFactory::BasicDesktopEnvironmentFactory() {
+}
+
+BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {
+}
+
+scoped_ptr<DesktopEnvironment> BasicDesktopEnvironmentFactory::Create(
+ const std::string& client_jid,
+ const base::Closure& disconnect_callback) {
+ return scoped_ptr<DesktopEnvironment>(new BasicDesktopEnvironment());
+}
+
+bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
+ return AudioCapturer::IsSupported();
+}
+
+} // namespace remoting
« no previous file with comments | « remoting/host/basic_desktop_environment.h ('k') | remoting/host/chromoting_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698