Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: remoting/host/win/session_input_injector.h

Issue 1930473003: Adding support for Win+L key combo in Windows host. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing CR feedback Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_ 5 #ifndef REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_
6 #define REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_ 6 #define REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "remoting/host/input_injector.h" 13 #include "remoting/host/input_injector.h"
14 14
15 namespace base { 15 namespace base {
16 class SingleThreadTaskRunner; 16 class SingleThreadTaskRunner;
17 } // namespace base 17 } // namespace base
18 18
19 namespace remoting { 19 namespace remoting {
20 20
21 // Monitors and passes key/mouse events to a nested event executor. Injects 21 // Monitors and passes key/mouse events to a nested event executor. Also handles
22 // Secure Attention Sequence (SAS) when Ctrl+Alt+Del key combination has been 22 // Ctrl+Alt+Del and Win+L key combinations by invoking the given callbacks.
23 // detected.
24 class SessionInputInjectorWin : public InputInjector { 23 class SessionInputInjectorWin : public InputInjector {
25 public: 24 public:
26 // |inject_sas| is invoked on |inject_sas_task_runner| to generate SAS on 25 // |inject_sas| and |lock_workstation| are invoked on
27 // Vista+. 26 // |execute_action_task_runner|.
28 SessionInputInjectorWin( 27 SessionInputInjectorWin(
29 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 28 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
30 std::unique_ptr<InputInjector> nested_executor, 29 std::unique_ptr<InputInjector> nested_executor,
31 scoped_refptr<base::SingleThreadTaskRunner> inject_sas_task_runner, 30 scoped_refptr<base::SingleThreadTaskRunner> execute_action_task_runner,
32 const base::Closure& inject_sas); 31 const base::Closure& inject_sas,
32 const base::Closure& lock_workstation);
33 ~SessionInputInjectorWin() override; 33 ~SessionInputInjectorWin() override;
34 34
35 // InputInjector implementation. 35 // InputInjector implementation.
36 void Start( 36 void Start(
37 std::unique_ptr<protocol::ClipboardStub> client_clipboard) override; 37 std::unique_ptr<protocol::ClipboardStub> client_clipboard) override;
38 38
39 // protocol::ClipboardStub implementation. 39 // protocol::ClipboardStub implementation.
40 void InjectClipboardEvent( 40 void InjectClipboardEvent(
41 const protocol::ClipboardEvent& event) override; 41 const protocol::ClipboardEvent& event) override;
42 42
43 // protocol::InputStub implementation. 43 // protocol::InputStub implementation.
44 void InjectKeyEvent(const protocol::KeyEvent& event) override; 44 void InjectKeyEvent(const protocol::KeyEvent& event) override;
45 void InjectTextEvent(const protocol::TextEvent& event) override; 45 void InjectTextEvent(const protocol::TextEvent& event) override;
46 void InjectMouseEvent(const protocol::MouseEvent& event) override; 46 void InjectMouseEvent(const protocol::MouseEvent& event) override;
47 void InjectTouchEvent(const protocol::TouchEvent& event) override; 47 void InjectTouchEvent(const protocol::TouchEvent& event) override;
48 48
49 private: 49 private:
50 // The actual implementation resides in SessionInputInjectorWin::Core class. 50 // The actual implementation resides in SessionInputInjectorWin::Core class.
51 class Core; 51 class Core;
52 scoped_refptr<Core> core_; 52 scoped_refptr<Core> core_;
53 53
54 DISALLOW_COPY_AND_ASSIGN(SessionInputInjectorWin); 54 DISALLOW_COPY_AND_ASSIGN(SessionInputInjectorWin);
55 }; 55 };
56 56
57 } // namespace remoting 57 } // namespace remoting
58 58
59 #endif // REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_ 59 #endif // REMOTING_HOST_WIN_SESSION_INPUT_INJECTOR_H_
OLDNEW
« no previous file with comments | « remoting/host/win/session_desktop_environment.cc ('k') | remoting/host/win/session_input_injector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698