1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_
6 #define REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "remoting/host/input_injector.h"
15 class SingleThreadTaskRunner
;
20 // Monitors and passes key/mouse events to a nested event executor. Injects
21 // Secure Attention Sequence (SAS) when Ctrl+Alt+Del key combination has been
23 class SessionInputInjectorWin
: public InputInjector
{
25 // |inject_sas| is invoked on |inject_sas_task_runner| to generate SAS on
27 SessionInputInjectorWin(
28 scoped_refptr
<base::SingleThreadTaskRunner
> input_task_runner
,
29 scoped_ptr
<InputInjector
> nested_executor
,
30 scoped_refptr
<base::SingleThreadTaskRunner
> inject_sas_task_runner
,
31 const base::Closure
& inject_sas
);
32 ~SessionInputInjectorWin() override
;
34 // InputInjector implementation.
36 scoped_ptr
<protocol::ClipboardStub
> client_clipboard
) override
;
38 // protocol::ClipboardStub implementation.
39 void InjectClipboardEvent(
40 const protocol::ClipboardEvent
& event
) override
;
42 // protocol::InputStub implementation.
43 void InjectKeyEvent(const protocol::KeyEvent
& event
) override
;
44 void InjectTextEvent(const protocol::TextEvent
& event
) override
;
45 void InjectMouseEvent(const protocol::MouseEvent
& event
) override
;
46 void InjectTouchEvent(const protocol::TouchEvent
& event
) override
;
49 // The actual implementation resides in SessionInputInjectorWin::Core class.
51 scoped_refptr
<Core
> core_
;
53 DISALLOW_COPY_AND_ASSIGN(SessionInputInjectorWin
);
56 } // namespace remoting
58 #endif // REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_