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