Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(511)

Side by Side Diff: webrtc/api/java/jni/classreferenceholder.cc

Issue 1696553003: Android: Make VideoCapturer an interface for all VideoCapturers to implement (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Replace 'replace' with 'dispose' in jni as well Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/java/jni/classreferenceholder.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy"); 83 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy");
84 LoadClass(jni, "org/webrtc/PeerConnection$KeyType"); 84 LoadClass(jni, "org/webrtc/PeerConnection$KeyType");
85 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState"); 85 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState");
86 LoadClass(jni, "org/webrtc/RtpReceiver"); 86 LoadClass(jni, "org/webrtc/RtpReceiver");
87 LoadClass(jni, "org/webrtc/RtpSender"); 87 LoadClass(jni, "org/webrtc/RtpSender");
88 LoadClass(jni, "org/webrtc/SessionDescription"); 88 LoadClass(jni, "org/webrtc/SessionDescription");
89 LoadClass(jni, "org/webrtc/SessionDescription$Type"); 89 LoadClass(jni, "org/webrtc/SessionDescription$Type");
90 LoadClass(jni, "org/webrtc/StatsReport"); 90 LoadClass(jni, "org/webrtc/StatsReport");
91 LoadClass(jni, "org/webrtc/StatsReport$Value"); 91 LoadClass(jni, "org/webrtc/StatsReport$Value");
92 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); 92 LoadClass(jni, "org/webrtc/SurfaceTextureHelper");
93 LoadClass(jni, "org/webrtc/VideoCapturerAndroid"); 93 LoadClass(jni, "org/webrtc/VideoCapturer");
94 LoadClass(jni, "org/webrtc/VideoCapturerAndroid$NativeObserver"); 94 LoadClass(jni, "org/webrtc/VideoCapturer$NativeObserver");
95 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); 95 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame");
96 LoadClass(jni, "org/webrtc/VideoTrack"); 96 LoadClass(jni, "org/webrtc/VideoTrack");
97 } 97 }
98 98
99 ClassReferenceHolder::~ClassReferenceHolder() { 99 ClassReferenceHolder::~ClassReferenceHolder() {
100 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!"; 100 RTC_CHECK(classes_.empty()) << "Must call FreeReferences() before dtor!";
101 } 101 }
102 102
103 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) { 103 void ClassReferenceHolder::FreeReferences(JNIEnv* jni) {
104 for (std::map<std::string, jclass>::const_iterator it = classes_.begin(); 104 for (std::map<std::string, jclass>::const_iterator it = classes_.begin();
(...skipping 20 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « webrtc/api/java/jni/androidvideocapturer_jni.cc ('k') | webrtc/api/java/jni/peerconnection_jni.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698