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

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: Fix FindBugs errors 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 {
17 /** Sends a mouse event. */
18 void sendMouseEvent(int x, int y, int whichButton, boolean buttonDown);
19 /** Sends a mouse wheel event. */
Lambros 2016/06/17 23:00:09 Blank lines before comments please (here and elsew
Hzj_jie 2016/06/19 23:41:38 Done.
20 void sendMouseWheelEvent(int deltaX, int deltaY);
21 /**
22 * Sends a key event, and returns false if both scanCode and keyCode are not able to be
23 * converted to a known usb key code. Nothing will be sent to remote host, i f this function
24 * returns false.
25 */
26 boolean sendKeyEvent(int scanCode, int keyCode, boolean keyDown);
27 /**
28 * Sends a string literal. This function is useful to handle outputs from An droid input
29 * methods.
30 */
31 void sendTextEvent(String text);
32 /** Sends a set of {@link TouchEventData}. */
33 void sendTouchEvent(TouchEventData.EventType eventType, TouchEventData[] dat a);
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698