OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 #include "webrtc/api/android/jni/classreferenceholder.h" | 10 #include "webrtc/sdk/android/src/jni/classreferenceholder.h" |
11 | 11 |
12 #include "webrtc/api/android/jni/jni_helpers.h" | 12 #include "webrtc/sdk/android/src/jni/jni_helpers.h" |
13 | 13 |
14 namespace webrtc_jni { | 14 namespace webrtc_jni { |
15 | 15 |
16 // ClassReferenceHolder holds global reference to Java classes in app/webrtc. | 16 // ClassReferenceHolder holds global reference to Java classes in app/webrtc. |
17 class ClassReferenceHolder { | 17 class ClassReferenceHolder { |
18 public: | 18 public: |
19 explicit ClassReferenceHolder(JNIEnv* jni); | 19 explicit ClassReferenceHolder(JNIEnv* jni); |
20 ~ClassReferenceHolder(); | 20 ~ClassReferenceHolder(); |
21 | 21 |
22 void FreeReferences(JNIEnv* jni); | 22 void FreeReferences(JNIEnv* jni); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 125 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
126 } | 126 } |
127 | 127 |
128 // Returns a global reference guaranteed to be valid for the lifetime of the | 128 // Returns a global reference guaranteed to be valid for the lifetime of the |
129 // process. | 129 // process. |
130 jclass FindClass(JNIEnv* jni, const char* name) { | 130 jclass FindClass(JNIEnv* jni, const char* name) { |
131 return g_class_reference_holder->GetClass(name); | 131 return g_class_reference_holder->GetClass(name); |
132 } | 132 } |
133 | 133 |
134 } // namespace webrtc_jni | 134 } // namespace webrtc_jni |
OLD | NEW |