| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/continue_window.h" | 5 #include "remoting/host/continue_window.h" |
| 6 | 6 |
| 7 #include "base/location.h" | 7 #include "base/location.h" |
| 8 #include "remoting/host/client_session_control.h" | 8 #include "remoting/host/client_session_control.h" |
| 9 | 9 |
| 10 // Minutes before the local user should confirm that the session should go on. | 10 // Minutes before the local user should confirm that the session should go on. |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 void ContinueWindow::DisconnectSession() { | 52 void ContinueWindow::DisconnectSession() { |
| 53 DCHECK(CalledOnValidThread()); | 53 DCHECK(CalledOnValidThread()); |
| 54 | 54 |
| 55 disconnect_timer_.Stop(); | 55 disconnect_timer_.Stop(); |
| 56 if (client_session_control_.get()) | 56 if (client_session_control_.get()) |
| 57 client_session_control_->DisconnectSession(); | 57 client_session_control_->DisconnectSession(); |
| 58 } | 58 } |
| 59 | 59 |
| 60 ContinueWindow::ContinueWindow(const UiStrings& ui_strings) | 60 ContinueWindow::ContinueWindow() { |
| 61 : ui_strings_(ui_strings) { | |
| 62 } | 61 } |
| 63 | 62 |
| 64 void ContinueWindow::OnSessionExpired() { | 63 void ContinueWindow::OnSessionExpired() { |
| 65 DCHECK(CalledOnValidThread()); | 64 DCHECK(CalledOnValidThread()); |
| 66 | 65 |
| 67 if (!client_session_control_.get()) | 66 if (!client_session_control_.get()) |
| 68 return; | 67 return; |
| 69 | 68 |
| 70 // Stop the remote input while the Continue window is shown. | 69 // Stop the remote input while the Continue window is shown. |
| 71 client_session_control_->SetDisableInputs(true); | 70 client_session_control_->SetDisableInputs(true); |
| 72 | 71 |
| 73 // Show the Continue window and wait for the local user input. | 72 // Show the Continue window and wait for the local user input. |
| 74 ShowUi(); | 73 ShowUi(); |
| 75 disconnect_timer_.Start( | 74 disconnect_timer_.Start( |
| 76 FROM_HERE, base::TimeDelta::FromMinutes(kSessionDisconnectTimeoutMinutes), | 75 FROM_HERE, base::TimeDelta::FromMinutes(kSessionDisconnectTimeoutMinutes), |
| 77 this, &ContinueWindow::DisconnectSession); | 76 this, &ContinueWindow::DisconnectSession); |
| 78 } | 77 } |
| 79 | 78 |
| 80 } // namespace remoting | 79 } // namespace remoting |
| OLD | NEW |