Compute can_use_lcd_text using property trees.
[chromium-blink-merge.git] / remoting / host / continue_window.h
blobaed28635fd3c2fb0e25f8984a957c5f09c493b04
1 // Copyright (c) 2012 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.
5 #ifndef REMOTING_HOST_CONTINUE_WINDOW_H_
6 #define REMOTING_HOST_CONTINUE_WINDOW_H_
8 #include "base/basictypes.h"
9 #include "base/memory/weak_ptr.h"
10 #include "base/timer/timer.h"
11 #include "remoting/host/host_window.h"
13 namespace remoting {
15 class ContinueWindow : public HostWindow {
16 public:
17 ~ContinueWindow() override;
19 // HostWindow override.
20 void Start(const base::WeakPtr<ClientSessionControl>& client_session_control)
21 override;
23 // Resumes paused client session.
24 void ContinueSession();
26 // Disconnects the client session.
27 void DisconnectSession();
29 protected:
30 ContinueWindow();
32 // Shows and hides the UI.
33 virtual void ShowUi() = 0;
34 virtual void HideUi() = 0;
36 private:
37 // Invoked periodically to ask for the local user whether the session should
38 // be continued.
39 void OnSessionExpired();
41 // Used to disconnect the client session.
42 base::WeakPtr<ClientSessionControl> client_session_control_;
44 // Used to disconnect the client session when timeout expires.
45 base::OneShotTimer<ContinueWindow> disconnect_timer_;
47 // Used to ask the local user whether the session should be continued.
48 base::OneShotTimer<ContinueWindow> session_expired_timer_;
50 DISALLOW_COPY_AND_ASSIGN(ContinueWindow);
53 } // namespace remoting
55 #endif // REMOTING_HOST_CONTINUE_WINDOW_H_