OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 5 #ifndef REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 6 #define REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 void OnLastDisconnect(); | 55 void OnLastDisconnect(); |
56 | 56 |
57 // Called when the remote connection has been paused/unpaused. | 57 // Called when the remote connection has been paused/unpaused. |
58 void OnPause(bool pause); | 58 void OnPause(bool pause); |
59 | 59 |
60 private: | 60 private: |
61 class TimerTask; | 61 class TimerTask; |
62 | 62 |
63 void ProcessOnConnect(const std::string& username); | 63 void ProcessOnConnect(const std::string& username); |
64 void ProcessOnLastDisconnect(); | 64 void ProcessOnLastDisconnect(); |
65 void ProcessOnPause(bool pause); | |
66 | 65 |
67 void MonitorLocalInputs(bool enable); | 66 void MonitorLocalInputs(bool enable); |
68 | 67 |
69 // Show or hide the Disconnect window on the UI thread. If |show| is false, | 68 // Show or hide the Disconnect window on the UI thread. If |show| is false, |
70 // hide the window, ignoring the |username| parameter. | 69 // hide the window, ignoring the |username| parameter. |
71 void ShowDisconnectWindow(bool show, const std::string& username); | 70 void ShowDisconnectWindow(bool show, const std::string& username); |
72 | 71 |
73 // Show or hide the Continue Sharing window on the UI thread. | 72 // Show or hide the Continue Sharing window on the UI thread. |
74 void ShowContinueWindow(bool show); | 73 void ShowContinueWindow(bool show); |
75 | 74 |
| 75 // Called by the ContinueWindow implementation (on the UI thread) when the |
| 76 // user dismisses the Continue prompt. |
| 77 // TODO(lambroslambrou): Move this method to the (to be written) |
| 78 // It2MeObserver class. |
| 79 void ContinueSession(bool continue_session); |
| 80 |
76 void StartContinueWindowTimer(bool start); | 81 void StartContinueWindowTimer(bool start); |
77 | 82 |
78 void OnContinueWindowTimer(); | 83 void OnContinueWindowTimer(); |
79 void OnShutdownHostTimer(); | 84 void OnShutdownHostTimer(); |
80 | 85 |
81 // The host that owns this DesktopEnvironment. | 86 // The host that owns this DesktopEnvironment. |
82 ChromotingHost* host_; | 87 ChromotingHost* host_; |
83 | 88 |
84 // Host context used to make sure operations are run on the correct thread. | 89 // Host context used to make sure operations are run on the correct thread. |
85 // This is owned by the ChromotingHost. | 90 // This is owned by the ChromotingHost. |
(...skipping 25 matching lines...) Expand all Loading... |
111 scoped_ptr<TimerTask> timer_task_; | 116 scoped_ptr<TimerTask> timer_task_; |
112 | 117 |
113 ScopedThreadProxy ui_thread_proxy_; | 118 ScopedThreadProxy ui_thread_proxy_; |
114 | 119 |
115 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); | 120 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); |
116 }; | 121 }; |
117 | 122 |
118 } // namespace remoting | 123 } // namespace remoting |
119 | 124 |
120 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ | 125 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ |
OLD | NEW |