Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / host / ipc_input_injector.h
blob9174ca37c54ca5f85fc3015ec79da453bd80879e
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_IPC_INPUT_INJECTOR_H_
6 #define REMOTING_HOST_IPC_INPUT_INJECTOR_H_
8 #include "base/memory/ref_counted.h"
9 #include "remoting/host/input_injector.h"
10 #include "remoting/proto/event.pb.h"
12 namespace remoting {
14 class DesktopSessionProxy;
16 // Routes InputInjector calls though the IPC channel to the desktop session
17 // agent running in the desktop integration process.
18 class IpcInputInjector : public InputInjector {
19 public:
20 explicit IpcInputInjector(
21 scoped_refptr<DesktopSessionProxy> desktop_session_proxy);
22 virtual ~IpcInputInjector();
24 // ClipboardStub interface.
25 virtual void InjectClipboardEvent(
26 const protocol::ClipboardEvent& event) OVERRIDE;
28 // InputStub interface.
29 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE;
30 virtual void InjectTextEvent(const protocol::TextEvent& event) OVERRIDE;
31 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE;
33 // InputInjector interface.
34 virtual void Start(
35 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE;
37 private:
38 // Wraps the IPC channel to the desktop process.
39 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_;
41 DISALLOW_COPY_AND_ASSIGN(IpcInputInjector);
44 } // namespace remoting
46 #endif // REMOTING_HOST_IPC_INPUT_INJECTOR_H_