| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/app/android/blimp_client_session_android.h" | 5 #include "blimp/client/app/android/blimp_client_session_android.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 void BlimpClientSessionAndroid::OnAssignmentConnectionAttempted( | 82 void BlimpClientSessionAndroid::OnAssignmentConnectionAttempted( |
| 83 AssignmentSource::Result result) { | 83 AssignmentSource::Result result) { |
| 84 // Notify the front end of the assignment result. | 84 // Notify the front end of the assignment result. |
| 85 JNIEnv* env = base::android::AttachCurrentThread(); | 85 JNIEnv* env = base::android::AttachCurrentThread(); |
| 86 Java_BlimpClientSession_onAssignmentReceived(env, java_obj_.obj(), | 86 Java_BlimpClientSession_onAssignmentReceived(env, java_obj_.obj(), |
| 87 static_cast<jint>(result)); | 87 static_cast<jint>(result)); |
| 88 | 88 |
| 89 BlimpClientSession::OnAssignmentConnectionAttempted(result); | 89 BlimpClientSession::OnAssignmentConnectionAttempted(result); |
| 90 } | 90 } |
| 91 | 91 |
| 92 base::android::ScopedJavaLocalRef<jstring> |
| 93 BlimpClientSessionAndroid::GetEngineIPAddress( |
| 94 JNIEnv* env, |
| 95 const base::android::JavaParamRef<jobject>& jobj) const { |
| 96 return base::android::ConvertUTF8ToJavaString(env, engineIPAddress_); |
| 97 } |
| 98 |
| 99 base::android::ScopedJavaLocalRef<jstring> |
| 100 BlimpClientSessionAndroid::GetEngineVersion( |
| 101 JNIEnv* env, |
| 102 const base::android::JavaParamRef<jobject>& jobj) const { |
| 103 return base::android::ConvertUTF8ToJavaString(env, engineVersion_); |
| 104 } |
| 105 |
| 92 } // namespace client | 106 } // namespace client |
| 93 } // namespace blimp | 107 } // namespace blimp |
| OLD | NEW |