blob: 584d0f3ceb28520f4125bc2631515c6bc47cc325 [file] [log] [blame]
[email protected]c308f5122013-04-05 03:32:061// 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
dcheng0765c492016-04-06 22:41:538#include <memory>
9
[email protected]c308f5122013-04-05 03:32:0610#include "base/memory/ref_counted.h"
[email protected]c308f5122013-04-05 03:32:0611#include "base/memory/weak_ptr.h"
gabbf77513a2017-06-01 14:35:3412#include "base/sequence_checker.h"
[email protected]c308f5122013-04-05 03:32:0613
14namespace remoting {
15
16class ClientSessionControl;
Joe Downing8e95ed182018-08-30 22:57:1917class LocalInputMonitor;
[email protected]c308f5122013-04-05 03:32:0618
gabbf77513a2017-06-01 14:35:3419class HostWindow {
[email protected]c308f5122013-04-05 03:32:0620 public:
Peter Boströme9178e42021-09-22 18:11:4921 HostWindow(const HostWindow&) = delete;
22 HostWindow& operator=(const HostWindow&) = delete;
23
gabbf77513a2017-06-01 14:35:3424 virtual ~HostWindow();
[email protected]c308f5122013-04-05 03:32:0625
26 // Creates a platform-specific instance of the continue window.
dcheng0765c492016-04-06 22:41:5327 static std::unique_ptr<HostWindow> CreateContinueWindow();
[email protected]c308f5122013-04-05 03:32:0628
29 // Creates a platform-specific instance of the disconnect window.
dcheng0765c492016-04-06 22:41:5330 static std::unique_ptr<HostWindow> CreateDisconnectWindow();
[email protected]c308f5122013-04-05 03:32:0631
Joe Downing8e95ed182018-08-30 22:57:1932 // 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]c308f5122013-04-05 03:32:0638 // 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:
gabbf77513a2017-06-01 14:35:3444 // Let |HostWindowProxy| to call DetachFromSequence() when passing an instance
45 // of |HostWindow| to a different sequence.
[email protected]c308f5122013-04-05 03:32:0646 friend class HostWindowProxy;
47
gabbf77513a2017-06-01 14:35:3448 HostWindow() {}
49
50 SEQUENCE_CHECKER(sequence_checker_);
[email protected]c308f5122013-04-05 03:32:0651};
52
53} // namespace remoting
54
55#endif // REMOTING_HOST_HOST_WINDOW_H_