Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Side by Side Diff: remoting/host/desktop_environment.h

Issue 7714026: Fixed continue window bugs and added 60s auto-shutdown timeout. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated comments froms sergeyu@ Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Called whenever a new client has connected. 51 // Called whenever a new client has connected.
52 void OnConnect(const std::string& username); 52 void OnConnect(const std::string& username);
53 53
54 // Called when the last client has disconnected. 54 // Called when the last client has disconnected.
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 enum ContinueTimerState {
62 INACTIVE, // The timer is not running or has been cancelled.
63 SHOW_DIALOG, // Show the continue dialog when the timer expires.
64 SHUTDOWN_HOST // Shutdown the Chromoting host when the timer expires.
65 };
66
61 void ProcessOnConnect(const std::string& username); 67 void ProcessOnConnect(const std::string& username);
62 void ProcessOnLastDisconnect(); 68 void ProcessOnLastDisconnect();
63 void ProcessOnPause(bool pause); 69 void ProcessOnPause(bool pause);
64 70
65 void MonitorLocalInputs(bool enable); 71 void MonitorLocalInputs(bool enable);
66 72
67 // Show or hide the Disconnect window on the UI thread. If |show| is false, 73 // Show or hide the Disconnect window on the UI thread. If |show| is false,
68 // hide the window, ignoring the |username| parameter. 74 // hide the window, ignoring the |username| parameter.
69 void ShowDisconnectWindow(bool show, const std::string& username); 75 void ShowDisconnectWindow(bool show, const std::string& username);
70 76
(...skipping 27 matching lines...) Expand all
98 // the connection. 104 // the connection.
99 scoped_ptr<ContinueWindow> continue_window_; 105 scoped_ptr<ContinueWindow> continue_window_;
100 106
101 // Monitor local inputs to allow remote inputs to be blocked while the local 107 // Monitor local inputs to allow remote inputs to be blocked while the local
102 // user is trying to do something. 108 // user is trying to do something.
103 scoped_ptr<LocalInputMonitor> local_input_monitor_; 109 scoped_ptr<LocalInputMonitor> local_input_monitor_;
104 110
105 bool is_monitoring_local_inputs_; 111 bool is_monitoring_local_inputs_;
106 112
107 // Timer controlling the "continue session" dialog. 113 // Timer controlling the "continue session" dialog.
108 bool continue_timer_started_; 114 ContinueTimerState continue_timer_state_;
109 base::Time continue_timer_target_time_; 115 base::Time continue_timer_target_time_;
110 116
111 scoped_refptr<UIThreadProxy> proxy_; 117 scoped_refptr<UIThreadProxy> proxy_;
112 118
113 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment); 119 DISALLOW_COPY_AND_ASSIGN(DesktopEnvironment);
114 }; 120 };
115 121
116 } // namespace remoting 122 } // namespace remoting
117 123
118 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_ 124 #endif // REMOTING_HOST_DESKTOP_ENVIRONMENT_H_
OLDNEW
« no previous file with comments | « remoting/host/chromoting_host.cc ('k') | remoting/host/desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698