OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ |
| 6 #define REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ |
| 7 |
| 8 #include "remoting/protocol/input_stub.h" |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "ipc/ipc_channel.h" |
| 13 |
| 14 #include "remoting/host/event_executor.h" |
| 15 |
| 16 class MessageLoop; |
| 17 |
| 18 namespace base { |
| 19 |
| 20 class MessageLoopProxy; |
| 21 |
| 22 } // namespace base |
| 23 |
| 24 namespace IPC { |
| 25 |
| 26 class ChannelProxy; |
| 27 |
| 28 } // namespace IPC |
| 29 |
| 30 namespace remoting { |
| 31 |
| 32 class SessionEventExecutor : public EventExecutor, |
| 33 public IPC::Channel::Listener { |
| 34 public: |
| 35 SessionEventExecutor(MessageLoop* message_loop, |
| 36 base::MessageLoopProxy* io_message_loop, |
| 37 scoped_ptr<EventExecutor> nested_executor); |
| 38 ~SessionEventExecutor(); |
| 39 /* |
| 40 // Creates an event executor for session-related events on Windows. |
| 41 // Does not take ownership of |message_loop| or |io_message_loop|. |
| 42 static EventExecutor* Create(MessageLoop* message_loop, |
| 43 base::MessageLoopProxy* io_message_loop); |
| 44 */ |
| 45 // protocol::InputStub implementation. |
| 46 virtual void InjectKeyEvent(const protocol::KeyEvent& event) OVERRIDE; |
| 47 virtual void InjectMouseEvent(const protocol::MouseEvent& event) OVERRIDE; |
| 48 |
| 49 // IPC::Channel::Listener implementation. |
| 50 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 51 |
| 52 private: |
| 53 // Pointer to the next event executor. |
| 54 scoped_ptr<EventExecutor> nested_executor_; |
| 55 |
| 56 MessageLoop* message_loop_; |
| 57 |
| 58 // IPC channel connecting the host with the chromoting service. |
| 59 scoped_ptr<IPC::ChannelProxy> chromoting_session_; |
| 60 |
| 61 bool scroll_pressed_; |
| 62 |
| 63 DISALLOW_COPY_AND_ASSIGN(SessionEventExecutor); |
| 64 }; |
| 65 |
| 66 } // namespace remoting |
| 67 |
| 68 #endif // REMOTING_HOST_SESSION_EVENT_EXECUTOR_WIN_H_ |
OLD | NEW |