[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 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. | ||||
4 | |||||
5 | #ifndef REMOTING_HOST_HOST_WINDOW_H_ | ||||
6 | #define REMOTING_HOST_HOST_WINDOW_H_ | ||||
7 | |||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 8 | #include <memory> |
9 | |||||
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 10 | #include "base/memory/ref_counted.h" |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 11 | #include "base/memory/weak_ptr.h" |
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame] | 12 | #include "base/sequence_checker.h" |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 13 | |
14 | namespace remoting { | ||||
15 | |||||
16 | class ClientSessionControl; | ||||
Joe Downing | 8e95ed18 | 2018-08-30 22:57:19 | [diff] [blame] | 17 | class LocalInputMonitor; |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 18 | |
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame] | 19 | class HostWindow { |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 20 | public: |
Peter Boström | e9178e4 | 2021-09-22 18:11:49 | [diff] [blame] | 21 | HostWindow(const HostWindow&) = delete; |
22 | HostWindow& operator=(const HostWindow&) = delete; | ||||
23 | |||||
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame] | 24 | virtual ~HostWindow(); |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 25 | |
26 | // Creates a platform-specific instance of the continue window. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 27 | static std::unique_ptr<HostWindow> CreateContinueWindow(); |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 28 | |
29 | // Creates a platform-specific instance of the disconnect window. | ||||
dcheng | 0765c49 | 2016-04-06 22:41:53 | [diff] [blame] | 30 | static std::unique_ptr<HostWindow> CreateDisconnectWindow(); |
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 31 | |
Joe Downing | 8e95ed18 | 2018-08-30 22:57:19 | [diff] [blame] | 32 | // Creates a platform-specific instance of the disconnect window which hides |
33 | // after a period of inactivity on the local desktop and shows the window when | ||||
34 | // local input is observed. | ||||
35 | static std::unique_ptr<HostWindow> CreateAutoHidingDisconnectWindow( | ||||
36 | std::unique_ptr<LocalInputMonitor> local_input_monitor); | ||||
37 | |||||
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 38 | // Starts the UI state machine. |client_session_control| will be used to |
39 | // notify the caller about the local user's actions. | ||||
40 | virtual void Start( | ||||
41 | const base::WeakPtr<ClientSessionControl>& client_session_control) = 0; | ||||
42 | |||||
43 | protected: | ||||
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame] | 44 | // Let |HostWindowProxy| to call DetachFromSequence() when passing an instance |
45 | // of |HostWindow| to a different sequence. | ||||
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 46 | friend class HostWindowProxy; |
47 | |||||
gab | bf77513a | 2017-06-01 14:35:34 | [diff] [blame] | 48 | HostWindow() {} |
49 | |||||
50 | SEQUENCE_CHECKER(sequence_checker_); | ||||
[email protected] | c308f512 | 2013-04-05 03:32:06 | [diff] [blame] | 51 | }; |
52 | |||||
53 | } // namespace remoting | ||||
54 | |||||
55 | #endif // REMOTING_HOST_HOST_WINDOW_H_ |