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

Unified Diff: remoting/client/input/client_input_injector.h

Issue 2868383003: [CRD iOS] Send key events to the session. (Closed)
Patch Set: Adding the interface for ClientInputInjector, removing the direct link between client and client/in… Created 3 years, 7 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/client/input/client_input_injector.h
diff --git a/remoting/client/input/client_input_injector.h b/remoting/client/input/client_input_injector.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e0854e1e3e9a00692ec0d0a99d3a0b4337ad4a9
--- /dev/null
+++ b/remoting/client/input/client_input_injector.h
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
nicholss 2017/05/17 21:25:54 This file is new.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_CLIENT_INPUT_CLIENT_INPUT_INJECTOR_H_
+#define REMOTING_CLIENT_INPUT_CLIENT_INPUT_INJECTOR_H_
+
+#include <stdint.h>
Yuwei 2017/05/17 21:32:38 Remove stdint.h?
+#include <string>
+
+namespace remoting {
+
+// This is an interface used by key input strategies to send processed key
+// events to the client side input injector.
+class ClientInputInjector {
+ public:
+ virtual ~ClientInputInjector() {}
+
+ // Sends the provided keyboard scan code to the host.
+ virtual bool SendKeyEvent(int scan_code, int key_code, bool key_down) = 0;
+
+ // Send utf8 encoded text to the host.
+ virtual void SendTextEvent(const std::string& text) = 0;
+};
+
+} // namespace remoting
+#endif // REMOTING_CLIENT_INPUT_CLIENT_INPUT_INJECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698