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

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

Issue 341693004: Fix Desktop.dispatchKeyEvent() to return correct result. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.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 #include "remoting/client/jni/chromoting_jni_runtime.h" 5 #include "remoting/client/jni/chromoting_jni_runtime.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 static void SendMouseWheelEvent(JNIEnv* env, 124 static void SendMouseWheelEvent(JNIEnv* env,
125 jclass clazz, 125 jclass clazz,
126 jint delta_x, 126 jint delta_x,
127 jint delta_y) { 127 jint delta_y) {
128 remoting::ChromotingJniRuntime::GetInstance()->session()->SendMouseWheelEvent( 128 remoting::ChromotingJniRuntime::GetInstance()->session()->SendMouseWheelEvent(
129 delta_x, delta_y); 129 delta_x, delta_y);
130 } 130 }
131 131
132 static void SendKeyEvent(JNIEnv* env, 132 static jboolean SendKeyEvent(JNIEnv* env,
133 jclass clazz, 133 jclass clazz,
134 jint keyCode, 134 jint keyCode,
135 jboolean keyDown) { 135 jboolean keyDown) {
136 remoting::ChromotingJniRuntime::GetInstance()->session()->SendKeyEvent( 136 return remoting::ChromotingJniRuntime::GetInstance()->session()->SendKeyEvent(
137 keyCode, keyDown); 137 keyCode, keyDown);
138 } 138 }
139 139
140 static void SendTextEvent(JNIEnv* env, 140 static void SendTextEvent(JNIEnv* env,
141 jclass clazz, 141 jclass clazz,
142 jstring text) { 142 jstring text) {
143 remoting::ChromotingJniRuntime::GetInstance()->session()->SendTextEvent( 143 remoting::ChromotingJniRuntime::GetInstance()->session()->SendTextEvent(
144 ConvertJavaStringToUTF8(env, text)); 144 ConvertJavaStringToUTF8(env, text));
145 } 145 }
146 146
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 JNIEnv* env = base::android::AttachCurrentThread(); 325 JNIEnv* env = base::android::AttachCurrentThread();
326 Java_JniInterface_redrawGraphicsInternal(env); 326 Java_JniInterface_redrawGraphicsInternal(env);
327 } 327 }
328 328
329 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) { 329 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) {
330 base::android::DetachFromVM(); 330 base::android::DetachFromVM();
331 waiter->Signal(); 331 waiter->Signal();
332 } 332 }
333 } // namespace remoting 333 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698