Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1029)

Unified Diff: remoting/host/input_injector_x11.cc

Issue 799233004: Add touch events to the protocol, the stub layer, and to the client plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac builds Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: remoting/host/input_injector_x11.cc
diff --git a/remoting/host/input_injector_x11.cc b/remoting/host/input_injector_x11.cc
index 53e160451eba81490cb9c3139f88f890df510dd6..c154ef5ca38ae67f0a2c11bdee6251ab8339e7fb 100644
--- a/remoting/host/input_injector_x11.cc
+++ b/remoting/host/input_injector_x11.cc
@@ -35,6 +35,7 @@ using protocol::ClipboardEvent;
using protocol::KeyEvent;
using protocol::TextEvent;
using protocol::MouseEvent;
+using protocol::TouchEvent;
bool FindKeycodeForKeySym(Display* display,
KeySym key_sym,
@@ -106,6 +107,7 @@ class InputInjectorX11 : public InputInjector {
void InjectKeyEvent(const KeyEvent& event) override;
void InjectTextEvent(const TextEvent& event) override;
void InjectMouseEvent(const MouseEvent& event) override;
+ void InjectTouchEvent(const TouchEvent& event) override;
// InputInjector interface.
void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard) override;
@@ -125,6 +127,7 @@ class InputInjectorX11 : public InputInjector {
void InjectKeyEvent(const KeyEvent& event);
void InjectTextEvent(const TextEvent& event);
void InjectMouseEvent(const MouseEvent& event);
+ void InjectTouchEvent(const TouchEvent& event);
// Mirrors the InputInjector interface.
void Start(scoped_ptr<protocol::ClipboardStub> client_clipboard);
@@ -219,6 +222,10 @@ void InputInjectorX11::InjectMouseEvent(const MouseEvent& event) {
core_->InjectMouseEvent(event);
}
+void InputInjectorX11::InjectTouchEvent(const TouchEvent& event) {
+ core_->InjectTouchEvent(event);
+}
+
void InputInjectorX11::Start(
scoped_ptr<protocol::ClipboardStub> client_clipboard) {
core_->Start(client_clipboard.Pass());
@@ -359,6 +366,11 @@ void InputInjectorX11::Core::InjectTextEvent(const TextEvent& event) {
XFlush(display_);
}
+void InputInjectorX11::Core::InjectTouchEvent(const TouchEvent& event) {
+ NOTIMPLEMENTED() << "Raw touch event injection not implemented.";
Wez 2015/01/21 03:08:37 nit: Why does this one get a message and the other
Rintaro Kuroiwa 2015/01/28 01:12:29 Oh I wanted to get Win, Mac, and CroS building and
+ return;
Wez 2015/01/21 03:08:37 ?
Rintaro Kuroiwa 2015/01/28 01:12:29 Not sure why I did this :P
+}
+
InputInjectorX11::Core::~Core() {
CHECK(pressed_keys_.empty());
}

Powered by Google App Engine
This is Rietveld 408576698