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.
5 #ifndef REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_
8 #include "base/basictypes.h"
9 #include "base/callback.h"
10 #include "base/compiler_specific.h"
11 #include "base/memory/ref_counted.h"
12 #include "remoting/host/me2me_desktop_environment.h"
18 // Used to create audio/video capturers and event executor that are compatible
19 // with Windows sessions.
20 class SessionDesktopEnvironment
: public Me2MeDesktopEnvironment
{
22 virtual ~SessionDesktopEnvironment();
24 // DesktopEnvironment implementation.
25 virtual scoped_ptr
<InputInjector
> CreateInputInjector() OVERRIDE
;
28 friend class SessionDesktopEnvironmentFactory
;
29 SessionDesktopEnvironment(
30 scoped_refptr
<base::SingleThreadTaskRunner
> caller_task_runner
,
31 scoped_refptr
<base::SingleThreadTaskRunner
> input_task_runner
,
32 scoped_refptr
<base::SingleThreadTaskRunner
> ui_task_runner
,
33 const base::Closure
& inject_sas
);
35 // Used to ask the daemon to inject Secure Attention Sequence.
36 base::Closure inject_sas_
;
38 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironment
);
41 // Used to create |SessionDesktopEnvironment| instances.
42 class SessionDesktopEnvironmentFactory
: public Me2MeDesktopEnvironmentFactory
{
44 SessionDesktopEnvironmentFactory(
45 scoped_refptr
<base::SingleThreadTaskRunner
> caller_task_runner
,
46 scoped_refptr
<base::SingleThreadTaskRunner
> input_task_runner
,
47 scoped_refptr
<base::SingleThreadTaskRunner
> ui_task_runner
,
48 const UiStrings
& ui_strings
,
49 const base::Closure
& inject_sas
);
50 virtual ~SessionDesktopEnvironmentFactory();
52 // DesktopEnvironmentFactory implementation.
53 virtual scoped_ptr
<DesktopEnvironment
> Create(
54 base::WeakPtr
<ClientSessionControl
> client_session_control
) OVERRIDE
;
57 // Used to ask the daemon to inject Secure Attention Sequence.
58 base::Closure inject_sas_
;
60 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironmentFactory
);
63 } // namespace remoting
65 #endif // REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_