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

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

Issue 7650003: Fix up confirmation window not reshowing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « no previous file | no next file » | 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 #include "remoting/host/desktop_environment.h" 5 #include "remoting/host/desktop_environment.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "remoting/host/capturer.h" 9 #include "remoting/host/capturer.h"
10 #include "remoting/host/chromoting_host.h" 10 #include "remoting/host/chromoting_host.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (show) { 181 if (show) {
182 continue_window_->Show(host_); 182 continue_window_->Show(host_);
183 } else { 183 } else {
184 continue_window_->Hide(); 184 continue_window_->Hide();
185 } 185 }
186 } 186 }
187 187
188 void DesktopEnvironment::StartContinueWindowTimer(bool start) { 188 void DesktopEnvironment::StartContinueWindowTimer(bool start) {
189 DCHECK(context_->IsUIThread()); 189 DCHECK(context_->IsUIThread());
190 190
191 if (start && ! continue_timer_started_) { 191 if (start && !continue_timer_started_) {
192 continue_timer_target_time_ = base::Time::Now() + 192 continue_timer_target_time_ = base::Time::Now() +
193 base::TimeDelta::FromMilliseconds(kContinueWindowTimeoutMs); 193 base::TimeDelta::FromMilliseconds(kContinueWindowTimeoutMs);
194 proxy_->CallOnUIThreadDelayed( 194 proxy_->CallOnUIThreadDelayed(
195 FROM_HERE, base::Bind(&DesktopEnvironment::ContinueWindowTimerFunc, 195 FROM_HERE, base::Bind(&DesktopEnvironment::ContinueWindowTimerFunc,
196 base::Unretained(this)), 196 base::Unretained(this)),
197 kContinueWindowTimeoutMs); 197 kContinueWindowTimeoutMs);
198 } 198 }
199 199
200 continue_timer_started_ = start; 200 continue_timer_started_ = start;
201 } 201 }
202 202
203 void DesktopEnvironment::ContinueWindowTimerFunc() { 203 void DesktopEnvironment::ContinueWindowTimerFunc() {
204 DCHECK(context_->IsUIThread()); 204 DCHECK(context_->IsUIThread());
205 205
206 // This function may be called prematurely if timer was stopped and 206 // This function may be called prematurely if timer was stopped and
207 // then started again. In that case we just ignore this call. 207 // then started again. In that case we just ignore this call.
208 if (continue_timer_target_time_ > base::Time::Now()) 208 if (continue_timer_target_time_ > base::Time::Now())
209 return; 209 return;
210 210
211 continue_timer_started_ = false;
Jamie 2011/08/12 23:11:30 D'oh!
211 host_->PauseSession(true); 212 host_->PauseSession(true);
212 ShowContinueWindow(true); 213 ShowContinueWindow(true);
213 } 214 }
214 215
215 216
216 } // namespace remoting 217 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698