Index: remoting/host/linux/x_server_keyboard_interface.h |
diff --git a/remoting/host/linux/x_server_keyboard_interface.h b/remoting/host/linux/x_server_keyboard_interface.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1619001d5937dd53fb0513ffb35e97685e05adbd |
--- /dev/null |
+++ b/remoting/host/linux/x_server_keyboard_interface.h |
@@ -0,0 +1,46 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef REMOTING_HOST_LINUX_X_SERVER_KEYBOARD_INTERFACE_H_ |
+#define REMOTING_HOST_LINUX_X_SERVER_KEYBOARD_INTERFACE_H_ |
+ |
+#include <X11/Xlib.h> |
+ |
+#include "base/macros.h" |
+#include "remoting/host/linux/keyboard_interface.h" |
+ |
+namespace remoting { |
+ |
+class XServerKeyboardInterface : public KeyboardInterface { |
Sergey Ulanov
2016/09/21 19:59:24
This is not interface, so it shouldn't have Interf
Yuwei
2016/09/23 01:40:38
Done.
|
+ public: |
+ XServerKeyboardInterface(Display* display); |
+ ~XServerKeyboardInterface() override; |
+ |
+ // KeyboardInterface overrides. |
+ std::vector<uint32_t> GetUnusedKeycodes() override; |
+ |
+ void PressKey(uint32_t keycode, uint32_t modifiers) override; |
+ |
+ bool FindKeycode(uint32_t code_point, |
+ uint32_t* keycode, |
+ uint32_t* modifiers) override; |
+ |
+ bool ChangeKeyMapping(uint32_t keycode, |
+ uint32_t lower_case_code_point, |
+ uint32_t upper_case_code_point) override; |
+ |
+ void Flush() override; |
+ |
+ void Sync() override; |
+ |
+ private: |
+ // X11 graphics context. |
+ Display* display_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(XServerKeyboardInterface); |
+}; |
+ |
+} // namespace remoting |
+ |
+#endif // REMOTING_HOST_LINUX_X_SERVER_KEYBOARD_INTERFACE_H_ |