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

Side by Side Diff: remoting/client/jni/jni_interface.cc

Issue 21236002: Chromoting Android app mouse/keyboard bugfixes and enhancements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: One last (TODO) comment change Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This file defines functions that implement the static methods declared in a 5 // This file defines functions that implement the static methods declared in a
6 // closely-related Java class in the platform-specific user interface 6 // closely-related Java class in the platform-specific user interface
7 // implementation. In effect, it is the entry point for all JNI calls *into* 7 // implementation. In effect, it is the entry point for all JNI calls *into*
8 // the C++ codebase from Java. The separate ChromotingJniRuntime class serves 8 // the C++ codebase from Java. The separate ChromotingJniRuntime class serves
9 // as the corresponding exit point, and is responsible for making all JNI calls 9 // as the corresponding exit point, and is responsible for making all JNI calls
10 // *out of* the C++ codebase into Java. 10 // *out of* the C++ codebase into Java.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 remoting::ChromotingJniRuntime::GetInstance()->session()->RedrawDesktop(); 113 remoting::ChromotingJniRuntime::GetInstance()->session()->RedrawDesktop();
114 } 114 }
115 115
116 JNIEXPORT void JNICALL JNI_IMPLEMENTATION(mouseActionNative)( 116 JNIEXPORT void JNICALL JNI_IMPLEMENTATION(mouseActionNative)(
117 JNIEnv* env, 117 JNIEnv* env,
118 jobject that, 118 jobject that,
119 jint x, 119 jint x,
120 jint y, 120 jint y,
121 jint which_button, 121 jint which_button,
122 jboolean button_down) { 122 jboolean button_down) {
123 // Button must be within the bounds of the MouseEvent_MouseButton enum.
124 DCHECK(which_button >= 0 && which_button < 5);
125
123 remoting::ChromotingJniRuntime::GetInstance()->session()->PerformMouseAction( 126 remoting::ChromotingJniRuntime::GetInstance()->session()->PerformMouseAction(
124 x, 127 x,
125 y, 128 y,
126 static_cast<remoting::protocol::MouseEvent_MouseButton>(which_button), 129 static_cast<remoting::protocol::MouseEvent_MouseButton>(which_button),
127 button_down); 130 button_down);
128 } 131 }
129 132
130 JNIEXPORT void JNICALL JNI_IMPLEMENTATION(keyboardActionNative)( 133 JNIEXPORT void JNICALL JNI_IMPLEMENTATION(keyboardActionNative)(
131 JNIEnv* env, 134 JNIEnv* env,
132 jobject that, 135 jobject that,
133 jint key_code, 136 jint key_code,
134 jboolean key_down) { 137 jboolean key_down) {
135 remoting::ChromotingJniRuntime::GetInstance()->session()-> 138 remoting::ChromotingJniRuntime::GetInstance()->session()->
136 PerformKeyboardAction(key_code, key_down); 139 PerformKeyboardAction(key_code, key_down);
137 } 140 }
138 141
139 } // extern "C" 142 } // extern "C"
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698