| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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/jni_client.h" | 5 #include "remoting/client/jni/jni_client.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "jni/Client_jni.h" | 10 #include "jni/Client_jni.h" |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 const base::android::JavaParamRef<jobject>& caller) { | 171 const base::android::JavaParamRef<jobject>& caller) { |
| 172 DisconnectFromHost(); | 172 DisconnectFromHost(); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void JniClient::AuthenticationResponse( | 175 void JniClient::AuthenticationResponse( |
| 176 JNIEnv* env, | 176 JNIEnv* env, |
| 177 const JavaParamRef<jobject>& caller, | 177 const JavaParamRef<jobject>& caller, |
| 178 const JavaParamRef<jstring>& pin, | 178 const JavaParamRef<jstring>& pin, |
| 179 jboolean createPair, | 179 jboolean createPair, |
| 180 const JavaParamRef<jstring>& deviceName) { | 180 const JavaParamRef<jstring>& deviceName) { |
| 181 session_->ProvideSecret(ConvertJavaStringToUTF8(env, pin).c_str(), createPair, | 181 session_->ProvideSecret(ConvertJavaStringToUTF8(env, pin), createPair, |
| 182 ConvertJavaStringToUTF8(env, deviceName)); | 182 ConvertJavaStringToUTF8(env, deviceName)); |
| 183 } | 183 } |
| 184 | 184 |
| 185 void JniClient::SendMouseEvent( | 185 void JniClient::SendMouseEvent( |
| 186 JNIEnv* env, | 186 JNIEnv* env, |
| 187 const base::android::JavaParamRef<jobject>& caller, | 187 const base::android::JavaParamRef<jobject>& caller, |
| 188 jint x, | 188 jint x, |
| 189 jint y, | 189 jint y, |
| 190 jint whichButton, | 190 jint whichButton, |
| 191 jboolean buttonDown) { | 191 jboolean buttonDown) { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 base::WeakPtr<JniClient> JniClient::GetWeakPtr() { | 282 base::WeakPtr<JniClient> JniClient::GetWeakPtr() { |
| 283 return weak_ptr_; | 283 return weak_ptr_; |
| 284 } | 284 } |
| 285 | 285 |
| 286 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& caller) { | 286 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& caller) { |
| 287 return reinterpret_cast<intptr_t>( | 287 return reinterpret_cast<intptr_t>( |
| 288 new JniClient(base::android::ScopedJavaGlobalRef<jobject>(env, caller))); | 288 new JniClient(base::android::ScopedJavaGlobalRef<jobject>(env, caller))); |
| 289 } | 289 } |
| 290 | 290 |
| 291 } // namespace remoting | 291 } // namespace remoting |
| OLD | NEW |