Implement basic point-and-touch mouse input for Android client
One can now use a remote computer as if it were a touchscreen device. This also trims down our requested permissions to see whether all devices are okay without the somewhat intrusive MANAGE_ACCOUNTS.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=213209
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromoting_jni_instance.cc File remoting/client/jni/chromoting_jni_instance.cc (right): https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromoting_jni_instance.cc#newcode88 remoting/client/jni/chromoting_jni_instance.cc:88: protocol::MouseEvent_MouseButton button) { This should be a MouseEvent so ...
7 years, 6 months ago
(2013-07-20 21:25:26 UTC)
#2
This one should *actually* be ready for review now. https://codereview.chromium.org/19500017/diff/1/remoting/android/java/src/org/chromium/chromoting/DesktopView.java File remoting/android/java/src/org/chromium/chromoting/DesktopView.java (right): https://codereview.chromium.org/19500017/diff/1/remoting/android/java/src/org/chromium/chromoting/DesktopView.java#newcode257 remoting/android/java/src/org/chromium/chromoting/DesktopView.java:257: ...
7 years, 6 months ago
(2013-07-22 19:13:47 UTC)
#3
This one should *actually* be ready for review now.
https://codereview.chromium.org/19500017/diff/1/remoting/android/java/src/org...
File remoting/android/java/src/org/chromium/chromoting/DesktopView.java (right):
https://codereview.chromium.org/19500017/diff/1/remoting/android/java/src/org...
remoting/android/java/src/org/chromium/chromoting/DesktopView.java:257:
mMouseButton = 1; // TODO Name me!
Sorry; I had forgotten how rough this revision was! I shouldn't have sent it out
for review on Friday...
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromotin...
File remoting/client/jni/chromoting_jni_instance.cc (right):
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromotin...
remoting/client/jni/chromoting_jni_instance.cc:88:
protocol::MouseEvent_MouseButton button) {
On 2013/07/20 21:25:26, garykac wrote:
> This should be a MouseEvent so that you have all the mouse event information.
Since this is being called from the JNI binding in jni_interface.cc, I just
added a boolean pressed flag here to avoid making that binding do anything more
than forwarding the call.
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromotin...
remoting/client/jni/chromoting_jni_instance.cc:106:
static_cast<protocol::MouseEvent_MouseButton>(abs(button)));
On 2013/07/20 21:25:26, garykac wrote:
> abs(button)...
>
> This whole static_cast ickiness goes away if you use the MouseEvent's button
and
> button_down values.
I accomplished this with a boolean flag, as aforementioned.
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromotin...
File remoting/client/jni/chromoting_jni_instance.h (right):
https://codereview.chromium.org/19500017/diff/1/remoting/client/jni/chromotin...
remoting/client/jni/chromoting_jni_instance.h:61: // A negative value of
|button| releases the button described by -|button|.
On 2013/07/20 21:25:26, garykac wrote:
> Button press/release should be stored as a boolean rather than overloading the
> button id in this manner.
>
> The approach used here leads to code like:
> if (button.id < 0)
> rather than:
> if (button.pressed)
> The latter being much more readable.
>
> Also, MouseEvent_MouseButton is an enum defined to have only positive values.
> Storing invalid values here can lead to madness.
Done.
garykac
https://codereview.chromium.org/19500017/diff/16001/remoting/android/java/src/org/chromium/chromoting/DesktopView.java File remoting/android/java/src/org/chromium/chromoting/DesktopView.java (right): https://codereview.chromium.org/19500017/diff/16001/remoting/android/java/src/org/chromium/chromoting/DesktopView.java#newcode49 remoting/android/java/src/org/chromium/chromoting/DesktopView.java:49: private static class MouseButton { this seems more complex ...
7 years, 6 months ago
(2013-07-22 23:43:38 UTC)
#4
Issue 19500017: Implement basic point-and-touch mouse input for Android client
(Closed)
Created 7 years, 6 months ago by solb
Modified 7 years, 6 months ago
Reviewers: garykac
Base URL: svn://svn.chromium.org/chrome/trunk/src
Comments: 9