| OLD | NEW |
| 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/library_loader/library_loader_hooks.h" | 10 #include "base/android/library_loader/library_loader_hooks.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 static void SendMouseWheelEvent(JNIEnv* env, | 132 static void SendMouseWheelEvent(JNIEnv* env, |
| 133 const JavaParamRef<jclass>& clazz, | 133 const JavaParamRef<jclass>& clazz, |
| 134 jint delta_x, | 134 jint delta_x, |
| 135 jint delta_y) { | 135 jint delta_y) { |
| 136 remoting::ChromotingJniRuntime::GetInstance()->session()->SendMouseWheelEvent( | 136 remoting::ChromotingJniRuntime::GetInstance()->session()->SendMouseWheelEvent( |
| 137 delta_x, delta_y); | 137 delta_x, delta_y); |
| 138 } | 138 } |
| 139 | 139 |
| 140 static jboolean SendKeyEvent(JNIEnv* env, | 140 static jboolean SendKeyEvent(JNIEnv* env, |
| 141 const JavaParamRef<jclass>& clazz, | 141 const JavaParamRef<jclass>& clazz, |
| 142 jint scanCode, |
| 142 jint keyCode, | 143 jint keyCode, |
| 143 jboolean keyDown) { | 144 jboolean keyDown) { |
| 144 return remoting::ChromotingJniRuntime::GetInstance()->session()->SendKeyEvent( | 145 return remoting::ChromotingJniRuntime::GetInstance()->session()->SendKeyEvent( |
| 145 keyCode, keyDown); | 146 scanCode, keyCode, keyDown); |
| 146 } | 147 } |
| 147 | 148 |
| 148 static void SendTextEvent(JNIEnv* env, | 149 static void SendTextEvent(JNIEnv* env, |
| 149 const JavaParamRef<jclass>& clazz, | 150 const JavaParamRef<jclass>& clazz, |
| 150 const JavaParamRef<jstring>& text) { | 151 const JavaParamRef<jstring>& text) { |
| 151 remoting::ChromotingJniRuntime::GetInstance()->session()->SendTextEvent( | 152 remoting::ChromotingJniRuntime::GetInstance()->session()->SendTextEvent( |
| 152 ConvertJavaStringToUTF8(env, text)); | 153 ConvertJavaStringToUTF8(env, text)); |
| 153 } | 154 } |
| 154 | 155 |
| 155 static void EnableVideoChannel(JNIEnv* env, | 156 static void EnableVideoChannel(JNIEnv* env, |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 | 368 |
| 368 JNIEnv* env = base::android::AttachCurrentThread(); | 369 JNIEnv* env = base::android::AttachCurrentThread(); |
| 369 Java_JniInterface_redrawGraphicsInternal(env); | 370 Java_JniInterface_redrawGraphicsInternal(env); |
| 370 } | 371 } |
| 371 | 372 |
| 372 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) { | 373 void ChromotingJniRuntime::DetachFromVmAndSignal(base::WaitableEvent* waiter) { |
| 373 base::android::DetachFromVM(); | 374 base::android::DetachFromVM(); |
| 374 waiter->Signal(); | 375 waiter->Signal(); |
| 375 } | 376 } |
| 376 } // namespace remoting | 377 } // namespace remoting |
| OLD | NEW |