Chromium Code Reviews| Index: remoting/host/remoting_me2me_host.cc |
| diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc |
| index 2d1a3b7c249dca496079ae9f3e490cd25bbac52f..00dbd5e42b351cd82a96da971dd0025d949d38da 100644 |
| --- a/remoting/host/remoting_me2me_host.cc |
| +++ b/remoting/host/remoting_me2me_host.cc |
| @@ -854,6 +854,12 @@ bool HostProcess::OnCurtainPolicyUpdate(bool curtain_required) { |
| curtain_required_ = curtain_required; |
| if (curtaining_host_observer_) |
| curtaining_host_observer_->SetEnableCurtaining(curtain_required_); |
| + |
| + // The current curtain mode implementation relies on this code restarting |
|
rmsousa
2013/03/05 00:36:00
nit: current windows/RDP curtain mode implementati
alexeypa (please no reviews)
2013/03/05 00:52:10
Done.
|
| + // the host when the curtain mode policy changes. For example if the policy |
| + // is enabled while someone is already connected to the console that session |
| + // should be either curtained or disconnected. This code makes sure that |
| + // the session will be disconnected by restarting the host. |
| return true; |
| } |
| return false; |
| @@ -943,10 +949,18 @@ void HostProcess::StartHost() { |
| resizing_host_observer_.reset( |
| new ResizingHostObserver(desktop_resizer_.get(), host_->AsWeakPtr())); |
| +#if defined(REMOTING_RDP_SESSION) |
| + // TODO(alexeypa): do not create |curtain_| in this case. |
| + CurtainMode* curtain = static_cast<IpcDesktopEnvironmentFactory*>( |
| + desktop_environment_factory_.get()); |
| +#else // !defined(REMOTING_RDP_SESSION) |
| + CurtainMode* curtain = curtain_.get(); |
| +#endif // !defined(REMOTING_RDP_SESSION) |
| + |
| // Create a host observer to enable/disable curtain mode as clients connect |
| // and disconnect. |
| curtaining_host_observer_.reset(new CurtainingHostObserver( |
| - curtain_.get(), host_->AsWeakPtr())); |
| + curtain, host_->AsWeakPtr())); |
| curtaining_host_observer_->SetEnableCurtaining(curtain_required_); |
| if (host_user_interface_.get()) { |