Chromium Code Reviews| Index: remoting/host/desktop_session_agent_win.cc |
| diff --git a/remoting/host/desktop_session_agent_win.cc b/remoting/host/desktop_session_agent_win.cc |
| index 01174399a7510dd5bb0f2e85d1b839b01c0ee037..e31bcd190dda1e6a94f92c735723031e01423d92 100644 |
| --- a/remoting/host/desktop_session_agent_win.cc |
| +++ b/remoting/host/desktop_session_agent_win.cc |
| @@ -13,7 +13,9 @@ |
| #include "ipc/ipc_channel.h" |
| #include "ipc/ipc_channel_proxy.h" |
| #include "remoting/base/auto_thread_task_runner.h" |
| +#include "remoting/host/event_executor.h" |
| #include "remoting/host/win/launch_process_with_token.h" |
| +#include "remoting/host/win/session_event_executor.h" |
| using base::win::ScopedHandle; |
| @@ -35,6 +37,11 @@ class DesktopSessionAgentWin : public DesktopSessionAgent { |
| virtual bool CreateChannelForNetworkProcess( |
| IPC::PlatformFileForTransit* client_out, |
| scoped_ptr<IPC::ChannelProxy>* server_out) OVERRIDE; |
| + virtual scoped_ptr<EventExecutor> CreateEventExecutor() OVERRIDE; |
| + |
| + // Requests the daemon to inject Secure Attention Sequence into the current |
| + // session. |
| + void InjectSas(); |
| private: |
| DISALLOW_COPY_AND_ASSIGN(DesktopSessionAgentWin); |
| @@ -87,6 +94,25 @@ bool DesktopSessionAgentWin::CreateChannelForNetworkProcess( |
| return true; |
| } |
| +scoped_ptr<EventExecutor> DesktopSessionAgentWin::CreateEventExecutor() { |
| + DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| + |
| + scoped_ptr<EventExecutor> event_executor = |
| + EventExecutor::Create(input_task_runner(), caller_task_runner()); |
| + event_executor.reset(new SessionEventExecutorWin( |
| + input_task_runner(), event_executor.Pass(), caller_task_runner(), |
| + base::Bind(&DesktopSessionAgentWin::InjectSas, this))); |
| + return event_executor.Pass(); |
| +} |
| + |
| +void DesktopSessionAgentWin::InjectSas() { |
| + DCHECK(caller_task_runner()->BelongsToCurrentThread()); |
| + |
| + if (delegate()) { |
| + delegate()->InjectSas(); |
| + } |
|
Jamie
2012/12/06 21:42:25
Should there be an error log if there's no delegat
alexeypa (please no reviews)
2012/12/06 21:56:02
Nope, this case happen when shutting down DesktopS
|
| +} |
| + |
| // static |
| scoped_refptr<DesktopSessionAgent> DesktopSessionAgent::Create( |
| scoped_refptr<AutoThreadTaskRunner> caller_task_runner, |