1 // Copyright 2013 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_IT2ME_DESKTOP_ENVIRONMENT_H_
6 #define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/weak_ptr.h"
10 #include "remoting/host/basic_desktop_environment.h"
15 class LocalInputMonitor
;
17 // Same as BasicDesktopEnvironment but also presents the Continue window to
19 class It2MeDesktopEnvironment
: public BasicDesktopEnvironment
{
21 virtual ~It2MeDesktopEnvironment();
24 friend class It2MeDesktopEnvironmentFactory
;
25 It2MeDesktopEnvironment(
26 scoped_refptr
<base::SingleThreadTaskRunner
> caller_task_runner
,
27 scoped_refptr
<base::SingleThreadTaskRunner
> input_task_runner
,
28 scoped_refptr
<base::SingleThreadTaskRunner
> ui_task_runner
,
29 base::WeakPtr
<ClientSessionControl
> client_session_control
);
32 // Presents the continue window to the local user.
33 scoped_ptr
<HostWindow
> continue_window_
;
35 // Presents the disconnect window to the local user.
36 scoped_ptr
<HostWindow
> disconnect_window_
;
38 // Notifies the client session about the local mouse movements.
39 scoped_ptr
<LocalInputMonitor
> local_input_monitor_
;
41 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment
);
44 // Used to create |It2MeDesktopEnvironment| instances.
45 class It2MeDesktopEnvironmentFactory
: public BasicDesktopEnvironmentFactory
{
47 It2MeDesktopEnvironmentFactory(
48 scoped_refptr
<base::SingleThreadTaskRunner
> caller_task_runner
,
49 scoped_refptr
<base::SingleThreadTaskRunner
> input_task_runner
,
50 scoped_refptr
<base::SingleThreadTaskRunner
> ui_task_runner
);
51 virtual ~It2MeDesktopEnvironmentFactory();
53 // DesktopEnvironmentFactory interface.
54 virtual scoped_ptr
<DesktopEnvironment
> Create(
55 base::WeakPtr
<ClientSessionControl
> client_session_control
) OVERRIDE
;
58 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory
);
61 } // namespace remoting
63 #endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_