OLD | NEW |
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_IPC_INPUT_INJECTOR_H_ | 5 #ifndef REMOTING_HOST_IPC_INPUT_INJECTOR_H_ |
6 #define REMOTING_HOST_IPC_INPUT_INJECTOR_H_ | 6 #define REMOTING_HOST_IPC_INPUT_INJECTOR_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "remoting/host/input_injector.h" | 9 #include "remoting/host/input_injector.h" |
10 #include "remoting/proto/event.pb.h" | 10 #include "remoting/proto/event.pb.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 | 13 |
14 class DesktopSessionProxy; | 14 class DesktopSessionProxy; |
15 | 15 |
16 // Routes InputInjector calls though the IPC channel to the desktop session | 16 // Routes InputInjector calls though the IPC channel to the desktop session |
17 // agent running in the desktop integration process. | 17 // agent running in the desktop integration process. |
18 class IpcInputInjector : public InputInjector { | 18 class IpcInputInjector : public InputInjector { |
19 public: | 19 public: |
20 explicit IpcInputInjector( | 20 explicit IpcInputInjector( |
21 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); | 21 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); |
22 virtual ~IpcInputInjector(); | 22 ~IpcInputInjector() override; |
23 | 23 |
24 // ClipboardStub interface. | 24 // ClipboardStub interface. |
25 virtual void InjectClipboardEvent( | 25 void InjectClipboardEvent(const protocol::ClipboardEvent& event) override; |
26 const protocol::ClipboardEvent& event) override; | |
27 | 26 |
28 // InputStub interface. | 27 // InputStub interface. |
29 virtual void InjectKeyEvent(const protocol::KeyEvent& event) override; | 28 void InjectKeyEvent(const protocol::KeyEvent& event) override; |
30 virtual void InjectTextEvent(const protocol::TextEvent& event) override; | 29 void InjectTextEvent(const protocol::TextEvent& event) override; |
31 virtual void InjectMouseEvent(const protocol::MouseEvent& event) override; | 30 void InjectMouseEvent(const protocol::MouseEvent& event) override; |
32 | 31 |
33 // InputInjector interface. | 32 // InputInjector interface. |
34 virtual void Start( | 33 void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override; |
35 scoped_ptr<protocol::ClipboardStub> client_clipboard) override; | |
36 | 34 |
37 private: | 35 private: |
38 // Wraps the IPC channel to the desktop process. | 36 // Wraps the IPC channel to the desktop process. |
39 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; | 37 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; |
40 | 38 |
41 DISALLOW_COPY_AND_ASSIGN(IpcInputInjector); | 39 DISALLOW_COPY_AND_ASSIGN(IpcInputInjector); |
42 }; | 40 }; |
43 | 41 |
44 } // namespace remoting | 42 } // namespace remoting |
45 | 43 |
46 #endif // REMOTING_HOST_IPC_INPUT_INJECTOR_H_ | 44 #endif // REMOTING_HOST_IPC_INPUT_INJECTOR_H_ |
OLD | NEW |