#ifndef REMOTING_HOST_WIN_SESSION_EVENT_EXECUTOR_H_
#define REMOTING_HOST_WIN_SESSION_EVENT_EXECUTOR_H_
#include <set>
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "remoting/host/event_executor.h"
#include "remoting/host/win/scoped_thread_desktop.h"
namespace base {
class SingleThreadTaskRunner;
}
namespace remoting {
class SasInjector;
class SessionEventExecutorWin : public EventExecutor {
public:
SessionEventExecutorWin(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_ptr<EventExecutor> nested_executor);
~SessionEventExecutorWin();
virtual void Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
virtual void StopAndDelete() OVERRIDE;
virtual void InjectClipboardEvent(
const protocol::ClipboardEvent& event) OVERRIDE;
virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
private:
void SwitchToInputDesktop();
scoped_ptr<EventExecutor> nested_executor_;
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
ScopedThreadDesktop desktop_;
scoped_ptr<SasInjector> sas_injector_;
std::set<uint32> pressed_keys_;
base::WeakPtrFactory<SessionEventExecutorWin> weak_ptr_factory_;
base::WeakPtr<SessionEventExecutorWin> weak_ptr_;
DISALLOW_COPY_AND_ASSIGN(SessionEventExecutorWin);
};
}
#endif