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

Side by Side Diff: webrtc/sdk/android/src/jni/classreferenceholder.cc

Issue 2807933003: Add Java binding for new getStats implementation. (Closed)
Patch Set: Fixing copyright year. Created 3 years, 8 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/sdk/android/src/jni/classreferenceholder.h" 10 #include "webrtc/sdk/android/src/jni/classreferenceholder.h"
(...skipping 27 matching lines...) Expand all
38 } 38 }
39 39
40 void FreeGlobalClassReferenceHolder() { 40 void FreeGlobalClassReferenceHolder() {
41 g_class_reference_holder->FreeReferences(AttachCurrentThreadIfNeeded()); 41 g_class_reference_holder->FreeReferences(AttachCurrentThreadIfNeeded());
42 delete g_class_reference_holder; 42 delete g_class_reference_holder;
43 g_class_reference_holder = nullptr; 43 g_class_reference_holder = nullptr;
44 } 44 }
45 45
46 ClassReferenceHolder::ClassReferenceHolder(JNIEnv* jni) { 46 ClassReferenceHolder::ClassReferenceHolder(JNIEnv* jni) {
47 LoadClass(jni, "android/graphics/SurfaceTexture"); 47 LoadClass(jni, "android/graphics/SurfaceTexture");
48 LoadClass(jni, "java/lang/Boolean");
49 LoadClass(jni, "java/lang/Double");
50 LoadClass(jni, "java/lang/Integer");
51 LoadClass(jni, "java/lang/Long");
52 LoadClass(jni, "java/lang/String");
53 LoadClass(jni, "java/math/BigInteger");
48 LoadClass(jni, "java/nio/ByteBuffer"); 54 LoadClass(jni, "java/nio/ByteBuffer");
49 LoadClass(jni, "java/util/ArrayList"); 55 LoadClass(jni, "java/util/ArrayList");
56 LoadClass(jni, "java/util/TreeMap");
50 LoadClass(jni, "org/webrtc/AudioTrack"); 57 LoadClass(jni, "org/webrtc/AudioTrack");
51 LoadClass(jni, "org/webrtc/Camera1Enumerator"); 58 LoadClass(jni, "org/webrtc/Camera1Enumerator");
52 LoadClass(jni, "org/webrtc/Camera2Enumerator"); 59 LoadClass(jni, "org/webrtc/Camera2Enumerator");
53 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid"); 60 LoadClass(jni, "org/webrtc/CameraEnumerationAndroid");
54 LoadClass(jni, "org/webrtc/DataChannel"); 61 LoadClass(jni, "org/webrtc/DataChannel");
55 LoadClass(jni, "org/webrtc/DataChannel$Buffer"); 62 LoadClass(jni, "org/webrtc/DataChannel$Buffer");
56 LoadClass(jni, "org/webrtc/DataChannel$Init"); 63 LoadClass(jni, "org/webrtc/DataChannel$Init");
57 LoadClass(jni, "org/webrtc/DataChannel$State"); 64 LoadClass(jni, "org/webrtc/DataChannel$State");
58 LoadClass(jni, "org/webrtc/EglBase"); 65 LoadClass(jni, "org/webrtc/EglBase");
59 LoadClass(jni, "org/webrtc/EglBase$Context"); 66 LoadClass(jni, "org/webrtc/EglBase$Context");
(...skipping 19 matching lines...) Expand all
79 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy"); 86 LoadClass(jni, "org/webrtc/PeerConnection$ContinualGatheringPolicy");
80 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy"); 87 LoadClass(jni, "org/webrtc/PeerConnection$RtcpMuxPolicy");
81 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState"); 88 LoadClass(jni, "org/webrtc/PeerConnection$IceConnectionState");
82 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState"); 89 LoadClass(jni, "org/webrtc/PeerConnection$IceGatheringState");
83 LoadClass(jni, "org/webrtc/PeerConnection$IceTransportsType"); 90 LoadClass(jni, "org/webrtc/PeerConnection$IceTransportsType");
84 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy"); 91 LoadClass(jni, "org/webrtc/PeerConnection$TcpCandidatePolicy");
85 LoadClass(jni, "org/webrtc/PeerConnection$TlsCertPolicy"); 92 LoadClass(jni, "org/webrtc/PeerConnection$TlsCertPolicy");
86 LoadClass(jni, "org/webrtc/PeerConnection$CandidateNetworkPolicy"); 93 LoadClass(jni, "org/webrtc/PeerConnection$CandidateNetworkPolicy");
87 LoadClass(jni, "org/webrtc/PeerConnection$KeyType"); 94 LoadClass(jni, "org/webrtc/PeerConnection$KeyType");
88 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState"); 95 LoadClass(jni, "org/webrtc/PeerConnection$SignalingState");
96 LoadClass(jni, "org/webrtc/RTCStats");
97 LoadClass(jni, "org/webrtc/RTCStatsReport");
89 LoadClass(jni, "org/webrtc/RtpReceiver"); 98 LoadClass(jni, "org/webrtc/RtpReceiver");
90 LoadClass(jni, "org/webrtc/RtpSender"); 99 LoadClass(jni, "org/webrtc/RtpSender");
91 LoadClass(jni, "org/webrtc/SessionDescription"); 100 LoadClass(jni, "org/webrtc/SessionDescription");
92 LoadClass(jni, "org/webrtc/SessionDescription$Type"); 101 LoadClass(jni, "org/webrtc/SessionDescription$Type");
93 LoadClass(jni, "org/webrtc/StatsReport"); 102 LoadClass(jni, "org/webrtc/StatsReport");
94 LoadClass(jni, "org/webrtc/StatsReport$Value"); 103 LoadClass(jni, "org/webrtc/StatsReport$Value");
95 LoadClass(jni, "org/webrtc/SurfaceTextureHelper"); 104 LoadClass(jni, "org/webrtc/SurfaceTextureHelper");
96 LoadClass(jni, "org/webrtc/VideoCapturer"); 105 LoadClass(jni, "org/webrtc/VideoCapturer");
97 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame"); 106 LoadClass(jni, "org/webrtc/VideoRenderer$I420Frame");
98 LoadClass(jni, "org/webrtc/VideoTrack"); 107 LoadClass(jni, "org/webrtc/VideoTrack");
(...skipping 28 matching lines...) Expand all
127 RTC_CHECK(inserted) << "Duplicate class name: " << name; 136 RTC_CHECK(inserted) << "Duplicate class name: " << name;
128 } 137 }
129 138
130 // Returns a global reference guaranteed to be valid for the lifetime of the 139 // Returns a global reference guaranteed to be valid for the lifetime of the
131 // process. 140 // process.
132 jclass FindClass(JNIEnv* jni, const char* name) { 141 jclass FindClass(JNIEnv* jni, const char* name) {
133 return g_class_reference_holder->GetClass(name); 142 return g_class_reference_holder->GetClass(name);
134 } 143 }
135 144
136 } // namespace webrtc_jni 145 } // namespace webrtc_jni
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698