blob: ba1d4561c1197c1fb8ce68e309fded89eedb7644 [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
avic5960f32015-12-22 22:49:4810#include "base/macros.h"
[email protected]c308f5122013-04-05 03:32:0611#include "base/memory/ref_counted.h"
[email protected]c308f5122013-04-05 03:32:0612#include "base/memory/weak_ptr.h"
gabbf77513a2017-06-01 14:35:3413#include "base/sequence_checker.h"
[email protected]c308f5122013-04-05 03:32:0614
15namespace remoting {
16
17class ClientSessionControl;
Joe Downing8e95ed182018-08-30 22:57:1918class LocalInputMonitor;
[email protected]c308f5122013-04-05 03:32:0619
gabbf77513a2017-06-01 14:35:3420class HostWindow {
[email protected]c308f5122013-04-05 03:32:0621 public:
Peter Boströme9178e42021-09-22 18:11:4922 HostWindow(const HostWindow&) = delete;
23 HostWindow& operator=(const HostWindow&) = delete;
24
gabbf77513a2017-06-01 14:35:3425 virtual ~HostWindow();
[email protected]c308f5122013-04-05 03:32:0626
27 // Creates a platform-specific instance of the continue window.
dcheng0765c492016-04-06 22:41:5328 static std::unique_ptr<HostWindow> CreateContinueWindow();
[email protected]c308f5122013-04-05 03:32:0629
30 // Creates a platform-specific instance of the disconnect window.
dcheng0765c492016-04-06 22:41:5331 static std::unique_ptr<HostWindow> CreateDisconnectWindow();
[email protected]c308f5122013-04-05 03:32:0632
Joe Downing8e95ed182018-08-30 22:57:1933 // 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]c308f5122013-04-05 03:32:0639 // 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:
gabbf77513a2017-06-01 14:35:3445 // Let |HostWindowProxy| to call DetachFromSequence() when passing an instance
46 // of |HostWindow| to a different sequence.
[email protected]c308f5122013-04-05 03:32:0647 friend class HostWindowProxy;
48
gabbf77513a2017-06-01 14:35:3449 HostWindow() {}
50
51 SEQUENCE_CHECKER(sequence_checker_);
[email protected]c308f5122013-04-05 03:32:0652};
53
54} // namespace remoting
55
56#endif // REMOTING_HOST_HOST_WINDOW_H_