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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/basic_desktop_environment.h ('k') | remoting/host/chromoting_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "remoting/host/basic_desktop_environment.h"
6
7 #include "base/logging.h"
8 #include "remoting/capturer/video_frame_capturer.h"
9 #include "remoting/host/audio_capturer.h"
10 #include "remoting/host/event_executor.h"
11
12 namespace remoting {
13
14 BasicDesktopEnvironment::BasicDesktopEnvironment() {
15 }
16
17 BasicDesktopEnvironment::~BasicDesktopEnvironment() {
18 DCHECK(CalledOnValidThread());
19 }
20
21 scoped_ptr<AudioCapturer> BasicDesktopEnvironment::CreateAudioCapturer(
22 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) {
23 DCHECK(CalledOnValidThread());
24
25 return AudioCapturer::Create();
26 }
27
28 scoped_ptr<EventExecutor> BasicDesktopEnvironment::CreateEventExecutor(
29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
30 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) {
31 DCHECK(CalledOnValidThread());
32
33 return EventExecutor::Create(input_task_runner, ui_task_runner);
34 }
35
36 scoped_ptr<VideoFrameCapturer> BasicDesktopEnvironment::CreateVideoCapturer(
37 scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
38 scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) {
39 DCHECK(CalledOnValidThread());
40
41 return VideoFrameCapturer::Create();
42 }
43
44 BasicDesktopEnvironmentFactory::BasicDesktopEnvironmentFactory() {
45 }
46
47 BasicDesktopEnvironmentFactory::~BasicDesktopEnvironmentFactory() {
48 }
49
50 scoped_ptr<DesktopEnvironment> BasicDesktopEnvironmentFactory::Create(
51 const std::string& client_jid,
52 const base::Closure& disconnect_callback) {
53 return scoped_ptr<DesktopEnvironment>(new BasicDesktopEnvironment());
54 }
55
56 bool BasicDesktopEnvironmentFactory::SupportsAudioCapture() const {
57 return AudioCapturer::IsSupported();
58 }
59
60 } // namespace remoting
OLDNEW
« 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