| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_CLIENT_X11_INPUT_HANDLER_H_ | 5 #ifndef REMOTING_CLIENT_X11_INPUT_HANDLER_H_ |
| 6 #define REMOTING_CLIENT_X11_INPUT_HANDLER_H_ | 6 #define REMOTING_CLIENT_X11_INPUT_HANDLER_H_ |
| 7 | 7 |
| 8 #include "remoting/client/input_handler.h" | 8 #include "remoting/client/input_handler.h" |
| 9 | 9 |
| 10 namespace remoting { | 10 namespace remoting { |
| 11 | 11 |
| 12 class ClientContext; | 12 class ClientContext; |
| 13 class ChromotingView; | 13 class ChromotingView; |
| 14 | 14 |
| 15 class X11InputHandler : public InputHandler { | 15 class X11InputHandler : public InputHandler { |
| 16 public: | 16 public: |
| 17 X11InputHandler(ClientContext* context, | 17 X11InputHandler(ClientContext* context, |
| 18 protocol::ConnectionToHost* connection, | 18 protocol::ConnectionToHost* connection, |
| 19 ChromotingView* view); | 19 ChromotingView* view); |
| 20 virtual ~X11InputHandler(); | 20 virtual ~X11InputHandler(); |
| 21 | 21 |
| 22 void Initialize(); | 22 virtual void Initialize(); |
| 23 | 23 |
| 24 private: | 24 private: |
| 25 | 25 |
| 26 void DoProcessX11Events(); | 26 void DoProcessX11Events(); |
| 27 | 27 |
| 28 void ScheduleX11EventHandler(); | 28 void ScheduleX11EventHandler(); |
| 29 | 29 |
| 30 // This is really an XEvent, but if we include Xlib.h in this file, it will | 30 // This is really an XEvent, but if we include Xlib.h in this file, it will |
| 31 // cause conflicts with other headers. See note at top of | 31 // cause conflicts with other headers. See note at top of |
| 32 // x11_input_handler.cc. | 32 // x11_input_handler.cc. |
| 33 void HandleKeyEvent(void* event); | 33 void HandleKeyEvent(void* event); |
| 34 void HandleMouseMoveEvent(int x, int y); | 34 void HandleMouseMoveEvent(int x, int y); |
| 35 void HandleMouseButtonEvent(bool button_down, int xbutton_id); | 35 void HandleMouseButtonEvent(bool button_down, int xbutton_id); |
| 36 | 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(X11InputHandler); | 37 DISALLOW_COPY_AND_ASSIGN(X11InputHandler); |
| 38 }; | 38 }; |
| 39 | 39 |
| 40 } // namespace remoting | 40 } // namespace remoting |
| 41 | 41 |
| 42 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::X11InputHandler); | 42 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::X11InputHandler); |
| 43 | 43 |
| 44 #endif // REMOTING_CLIENT_X11_INPUT_HANDLER_H_ | 44 #endif // REMOTING_CLIENT_X11_INPUT_HANDLER_H_ |
| OLD | NEW |