Roll src/third_party/WebKit f36d5e0:68b67cd (svn 193299:193303)
[chromium-blink-merge.git] / remoting / host / win / session_desktop_environment.h
blob949fa5eb0adf2c7f288a69117f49b13dc389fbff
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"
14 namespace remoting {
16 // Used to create audio/video capturers and event executor that are compatible
17 // with Windows sessions.
18 class SessionDesktopEnvironment : public Me2MeDesktopEnvironment {
19 public:
20 virtual ~SessionDesktopEnvironment();
22 // DesktopEnvironment implementation.
23 virtual scoped_ptr<InputInjector> CreateInputInjector() override;
25 private:
26 friend class SessionDesktopEnvironmentFactory;
27 SessionDesktopEnvironment(
28 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
30 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
31 const base::Closure& inject_sas);
33 // Used to ask the daemon to inject Secure Attention Sequence.
34 base::Closure inject_sas_;
36 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironment);
39 // Used to create |SessionDesktopEnvironment| instances.
40 class SessionDesktopEnvironmentFactory : public Me2MeDesktopEnvironmentFactory {
41 public:
42 SessionDesktopEnvironmentFactory(
43 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
44 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
45 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
46 const base::Closure& inject_sas);
47 virtual ~SessionDesktopEnvironmentFactory();
49 // DesktopEnvironmentFactory implementation.
50 virtual scoped_ptr<DesktopEnvironment> Create(
51 base::WeakPtr<ClientSessionControl> client_session_control) override;
53 private:
54 // Used to ask the daemon to inject Secure Attention Sequence.
55 base::Closure inject_sas_;
57 DISALLOW_COPY_AND_ASSIGN(SessionDesktopEnvironmentFactory);
60 } // namespace remoting
62 #endif // REMOTING_HOST_WIN_SESSION_DESKTOP_ENVIRONMENT_H_