blob: 6756dc6f80ac534de5bd06d038030abcdb2109df [file] [log] [blame]
[email protected]ac115ce2013-04-24 20:44:381// 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.
4
5#ifndef REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
6#define REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_
7
dcheng0765c492016-04-06 22:41:538#include <memory>
9
avic5960f32015-12-22 22:49:4810#include "base/macros.h"
[email protected]ac115ce2013-04-24 20:44:3811#include "base/memory/weak_ptr.h"
Gabriel Charette5ff87ce2017-05-16 18:03:4512#include "base/single_thread_task_runner.h"
[email protected]ac115ce2013-04-24 20:44:3813#include "remoting/host/basic_desktop_environment.h"
14
15namespace remoting {
16
17class HostWindow;
18class LocalInputMonitor;
19
20// Same as BasicDesktopEnvironment but also presents the Continue window to
21// the local user.
22class It2MeDesktopEnvironment : public BasicDesktopEnvironment {
23 public:
dcheng562aba52014-10-21 12:30:1424 ~It2MeDesktopEnvironment() override;
[email protected]ac115ce2013-04-24 20:44:3825
26 protected:
27 friend class It2MeDesktopEnvironmentFactory;
28 It2MeDesktopEnvironment(
29 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
sergeyu85df3c482016-02-15 05:59:0830 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
[email protected]ac115ce2013-04-24 20:44:3831 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
32 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
rkuroiwaa7815e72015-06-05 21:39:0433 base::WeakPtr<ClientSessionControl> client_session_control,
zijiehe4aa6ea42016-11-12 01:28:1634 const DesktopEnvironmentOptions& options);
[email protected]ac115ce2013-04-24 20:44:3835
36 private:
37 // Presents the continue window to the local user.
dcheng0765c492016-04-06 22:41:5338 std::unique_ptr<HostWindow> continue_window_;
[email protected]ac115ce2013-04-24 20:44:3839
40 // Presents the disconnect window to the local user.
dcheng0765c492016-04-06 22:41:5341 std::unique_ptr<HostWindow> disconnect_window_;
[email protected]ac115ce2013-04-24 20:44:3842
43 // Notifies the client session about the local mouse movements.
dcheng0765c492016-04-06 22:41:5344 std::unique_ptr<LocalInputMonitor> local_input_monitor_;
[email protected]ac115ce2013-04-24 20:44:3845
46 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironment);
47};
48
49// Used to create |It2MeDesktopEnvironment| instances.
50class It2MeDesktopEnvironmentFactory : public BasicDesktopEnvironmentFactory {
51 public:
52 It2MeDesktopEnvironmentFactory(
53 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
sergeyu85df3c482016-02-15 05:59:0854 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
[email protected]ac115ce2013-04-24 20:44:3855 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
Scott Violet9778dcd2019-06-20 21:59:3756 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
dcheng562aba52014-10-21 12:30:1457 ~It2MeDesktopEnvironmentFactory() override;
[email protected]ac115ce2013-04-24 20:44:3858
59 // DesktopEnvironmentFactory interface.
dcheng0765c492016-04-06 22:41:5360 std::unique_ptr<DesktopEnvironment> Create(
zijiehe4aa6ea42016-11-12 01:28:1661 base::WeakPtr<ClientSessionControl> client_session_control,
62 const DesktopEnvironmentOptions& options) override;
zijiehedd0b05c2016-05-05 18:44:1563
[email protected]ac115ce2013-04-24 20:44:3864 private:
[email protected]ac115ce2013-04-24 20:44:3865 DISALLOW_COPY_AND_ASSIGN(It2MeDesktopEnvironmentFactory);
66};
67
68} // namespace remoting
69
70#endif // REMOTING_HOST_IT2ME_DESKTOP_ENVIRONMENT_H_