| 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_EVENT_EXECUTOR_H_ | 5 #ifndef REMOTING_HOST_IPC_EVENT_EXECUTOR_H_ |
| 6 #define REMOTING_HOST_IPC_EVENT_EXECUTOR_H_ | 6 #define REMOTING_HOST_IPC_EVENT_EXECUTOR_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "remoting/host/event_executor.h" | 9 #include "remoting/host/event_executor.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 EventExecutor calls though the IPC channel to the desktop session | 16 // Routes EventExecutor 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 IpcEventExecutor : public EventExecutor { | 18 class IpcEventExecutor : public EventExecutor { |
| 19 public: | 19 public: |
| 20 IpcEventExecutor(scoped_refptr<DesktopSessionProxy> desktop_session_proxy); | 20 explicit IpcEventExecutor( |
| 21 scoped_refptr<DesktopSessionProxy> desktop_session_proxy); |
| 21 virtual ~IpcEventExecutor(); | 22 virtual ~IpcEventExecutor(); |
| 22 | 23 |
| 23 // ClipboardStub interface. | 24 // ClipboardStub interface. |
| 24 virtual void InjectClipboardEvent( | 25 virtual void InjectClipboardEvent( |
| 25 const protocol::ClipboardEvent& event) OVERRIDE; | 26 const protocol::ClipboardEvent& event) OVERRIDE; |
| 26 | 27 |
| 27 // InputStub interface. | 28 // InputStub interface. |
| 28 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; | 29 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; |
| 29 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; | 30 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; |
| 30 | 31 |
| 31 // EventExecutor interface. | 32 // EventExecutor interface. |
| 32 virtual void Start( | 33 virtual void Start( |
| 33 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE; | 34 scoped_ptr<protocol::ClipboardStub> client_clipboard) OVERRIDE; |
| 34 | 35 |
| 35 private: | 36 private: |
| 36 // Wraps the IPC channel to the desktop process. | 37 // Wraps the IPC channel to the desktop process. |
| 37 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; | 38 scoped_refptr<DesktopSessionProxy> desktop_session_proxy_; |
| 38 | 39 |
| 39 DISALLOW_COPY_AND_ASSIGN(IpcEventExecutor); | 40 DISALLOW_COPY_AND_ASSIGN(IpcEventExecutor); |
| 40 }; | 41 }; |
| 41 | 42 |
| 42 } // namespace remoting | 43 } // namespace remoting |
| 43 | 44 |
| 44 #endif // REMOTING_HOST_IPC_EVENT_EXECUTOR_H_ | 45 #endif // REMOTING_HOST_IPC_EVENT_EXECUTOR_H_ |
| OLD | NEW |