diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 04:14:03 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-21 04:14:03 +0000 |
commit | bf974e15691b9a0477b776faafe426eeed271685 (patch) | |
tree | 5e29cdae3da6b699992012555a6b6a4d4988f0fa /remoting/host/desktop_environment.h | |
parent | 0b5364316686f5c99e708ae2801eef13d0cddbcb (diff) | |
download | chromium_src-bf974e15691b9a0477b776faafe426eeed271685.zip chromium_src-bf974e15691b9a0477b776faafe426eeed271685.tar.gz chromium_src-bf974e15691b9a0477b776faafe426eeed271685.tar.bz2 |
Always show continue window.
Problem was that the timer function was checking Time::Now() to verify
whether it should run or not. On some systems the task may be called
several milliseconds before the target time, which means that
Time::Now() would return time before |continue_timer_target_time_| and
the window wouldn't show.
BUG=100729
TEST=Continue windows shows every time.
Review URL: http://codereview.chromium.org/8366011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106672 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/host/desktop_environment.h')
-rw-r--r-- | remoting/host/desktop_environment.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/remoting/host/desktop_environment.h b/remoting/host/desktop_environment.h index e0ed196..31335f5 100644 --- a/remoting/host/desktop_environment.h +++ b/remoting/host/desktop_environment.h @@ -58,11 +58,7 @@ class DesktopEnvironment { void OnPause(bool pause); private: - enum ContinueTimerState { - INACTIVE, // The timer is not running or has been cancelled. - SHOW_DIALOG, // Show the continue dialog when the timer expires. - SHUTDOWN_HOST // Shutdown the Chromoting host when the timer expires. - }; + class TimerTask; void ProcessOnConnect(const std::string& username); void ProcessOnLastDisconnect(); @@ -79,7 +75,8 @@ class DesktopEnvironment { void StartContinueWindowTimer(bool start); - void ContinueWindowTimerFunc(); + void OnContinueWindowTimer(); + void OnShutdownHostTimer(); // The host that owns this DesktopEnvironment. ChromotingHost* host_; @@ -111,8 +108,7 @@ class DesktopEnvironment { bool is_monitoring_local_inputs_; // Timer controlling the "continue session" dialog. - ContinueTimerState continue_timer_state_; - base::Time continue_timer_target_time_; + scoped_ptr<TimerTask> timer_task_; ScopedThreadProxy ui_thread_proxy_; |