blob: a7f12cfa16a7c78c0ccb5bfec5d64b8c510d0e00 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
// 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:
virtual ~BasicDesktopEnvironment();
// DesktopEnvironment implementation.
virtual scoped_ptr<AudioCapturer> CreateAudioCapturer(
scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) OVERRIDE;
virtual scoped_ptr<InputInjector> CreateInputInjector(
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner) OVERRIDE;
virtual scoped_ptr<SessionController> CreateSessionController() OVERRIDE;
virtual scoped_ptr<media::ScreenCapturer> CreateVideoCapturer(
scoped_refptr<base::SingleThreadTaskRunner> capture_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> encode_task_runner) OVERRIDE;
protected:
friend class BasicDesktopEnvironmentFactory;
BasicDesktopEnvironment();
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_
|