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/java/jni/classreferenceholder.h" | 10 #include "webrtc/api/android/jni/classreferenceholder.h" |
11 | 11 |
12 #include "webrtc/api/java/jni/jni_helpers.h" | 12 #include "webrtc/api/android/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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 RTC_CHECK(inserted) << "Duplicate class name: " << name; | 128 RTC_CHECK(inserted) << "Duplicate class name: " << name; |
129 } | 129 } |
130 | 130 |
131 // Returns a global reference guaranteed to be valid for the lifetime of the | 131 // Returns a global reference guaranteed to be valid for the lifetime of the |
132 // process. | 132 // process. |
133 jclass FindClass(JNIEnv* jni, const char* name) { | 133 jclass FindClass(JNIEnv* jni, const char* name) { |
134 return g_class_reference_holder->GetClass(name); | 134 return g_class_reference_holder->GetClass(name); |
135 } | 135 } |
136 | 136 |
137 } // namespace webrtc_jni | 137 } // namespace webrtc_jni |
OLD | NEW |