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

Side by Side Diff: remoting/android/java/src/org/chromium/chromoting/InputInjector.java

Issue 2066683003: [Chromoting] Add InputInjector and InputInjectorWrapper for easy unittesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Suppress FindBugs warning of FE_FLOATING_POINT_EQUALITY Created 4 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 package org.chromium.chromoting;
6
7 import org.chromium.chromoting.jni.TouchEventData;
8
9 /**
10 * A set of functions to send client users' activities to remote host machine. T his interface
11 * represents low level functions without relationships with Android system. Con sumers can use
12 * {@link InputInjectorWrapper} to avoid conversions between Android classes and JNI types. The
13 * implementations of this interface are not required to be thread-safe. All the se functions should
14 * be called from Android UI thread.
15 */
16 public interface InputInjector {
Sergey Ulanov 2016/06/22 06:39:01 This name is confusing because this interface does
Hzj_jie 2016/06/22 23:18:54 Done.
17 /** Sends a mouse event. */
18 void sendMouseEvent(int x, int y, int whichButton, boolean buttonDown);
19
20 /** Sends a mouse wheel event. */
21 void sendMouseWheelEvent(int deltaX, int deltaY);
22
23 /**
24 * Sends a key event, and returns false if both scanCode and keyCode are not able to be
25 * converted to a known usb key code. Nothing will be sent to remote host, i f this function
26 * returns false.
27 */
28 boolean sendKeyEvent(int scanCode, int keyCode, boolean keyDown);
29
30 /**
31 * Sends a string literal. This function is useful to handle outputs from An droid input
32 * methods.
33 */
34 void sendTextEvent(String text);
35
36 /** Sends a set of {@link TouchEventData}. */
37 void sendTouchEvent(TouchEventData.EventType eventType, TouchEventData[] dat a);
38 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698