blob: 66a12b6d41c4be6a93c858f35c551302c1ae03bd [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:
gabbf77513a2017-06-01 14:35:3422 virtual ~HostWindow();
[email protected]c308f5122013-04-05 03:32:0623
24 // Creates a platform-specific instance of the continue window.
dcheng0765c492016-04-06 22:41:5325 static std::unique_ptr<HostWindow> CreateContinueWindow();
[email protected]c308f5122013-04-05 03:32:0626
27 // Creates a platform-specific instance of the disconnect window.
dcheng0765c492016-04-06 22:41:5328 static std::unique_ptr<HostWindow> CreateDisconnectWindow();
[email protected]c308f5122013-04-05 03:32:0629
Joe Downing8e95ed182018-08-30 22:57:1930 // Creates a platform-specific instance of the disconnect window which hides
31 // after a period of inactivity on the local desktop and shows the window when
32 // local input is observed.
33 static std::unique_ptr<HostWindow> CreateAutoHidingDisconnectWindow(
34 std::unique_ptr<LocalInputMonitor> local_input_monitor);
35
[email protected]c308f5122013-04-05 03:32:0636 // Starts the UI state machine. |client_session_control| will be used to
37 // notify the caller about the local user's actions.
38 virtual void Start(
39 const base::WeakPtr<ClientSessionControl>& client_session_control) = 0;
40
41 protected:
gabbf77513a2017-06-01 14:35:3442 // Let |HostWindowProxy| to call DetachFromSequence() when passing an instance
43 // of |HostWindow| to a different sequence.
[email protected]c308f5122013-04-05 03:32:0644 friend class HostWindowProxy;
45
gabbf77513a2017-06-01 14:35:3446 HostWindow() {}
47
48 SEQUENCE_CHECKER(sequence_checker_);
49
50 private:
[email protected]c308f5122013-04-05 03:32:0651 DISALLOW_COPY_AND_ASSIGN(HostWindow);
52};
53
54} // namespace remoting
55
56#endif // REMOTING_HOST_HOST_WINDOW_H_