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

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

Issue 2888093004: Removes usage of native base::android::GetApplicationContext() (Closed)
Patch Set: Fix modules unittests. Created 3 years, 7 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
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 10
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1129
1130 JOW(void, MediaStream_free)(JNIEnv*, jclass, jlong j_p) { 1130 JOW(void, MediaStream_free)(JNIEnv*, jclass, jlong j_p) {
1131 CHECK_RELEASE(reinterpret_cast<MediaStreamInterface*>(j_p)); 1131 CHECK_RELEASE(reinterpret_cast<MediaStreamInterface*>(j_p));
1132 } 1132 }
1133 1133
1134 JOW(jlong, PeerConnectionFactory_nativeCreateObserver)( 1134 JOW(jlong, PeerConnectionFactory_nativeCreateObserver)(
1135 JNIEnv * jni, jclass, jobject j_observer) { 1135 JNIEnv * jni, jclass, jobject j_observer) {
1136 return (jlong)new PCOJava(jni, j_observer); 1136 return (jlong)new PCOJava(jni, j_observer);
1137 } 1137 }
1138 1138
1139 JOW(void, PeerConnectionFactory_initializeAndroidGlobals) 1139 JOW(void, PeerConnectionFactory_nativeInitializeAndroidGlobals)
1140 (JNIEnv* jni, 1140 (JNIEnv* jni,
1141 jclass, 1141 jclass,
1142 jobject context, 1142 jobject context,
1143 jboolean video_hw_acceleration) { 1143 jboolean video_hw_acceleration) {
1144 video_hw_acceleration_enabled = video_hw_acceleration; 1144 video_hw_acceleration_enabled = video_hw_acceleration;
1145 AndroidNetworkMonitor::SetAndroidContext(jni, context); 1145 AndroidNetworkMonitor::SetAndroidContext(jni, context);
1146 if (!factory_static_initialized) { 1146 if (!factory_static_initialized) {
1147 RTC_DCHECK(j_application_context == nullptr); 1147 RTC_DCHECK(j_application_context == nullptr);
1148 j_application_context = NewGlobalRef(jni, context); 1148 j_application_context = NewGlobalRef(jni, context);
1149 webrtc::JVM::Initialize(GetJVM(), context); 1149 webrtc::JVM::Initialize(GetJVM());
1150 factory_static_initialized = true; 1150 factory_static_initialized = true;
1151 } 1151 }
1152 } 1152 }
1153 1153
1154 JOW(void, PeerConnectionFactory_initializeFieldTrials)( 1154 JOW(void, PeerConnectionFactory_initializeFieldTrials)(
1155 JNIEnv* jni, jclass, jstring j_trials_init_string) { 1155 JNIEnv* jni, jclass, jstring j_trials_init_string) {
1156 field_trials_init_string = NULL; 1156 field_trials_init_string = NULL;
1157 if (j_trials_init_string != NULL) { 1157 if (j_trials_init_string != NULL) {
1158 const char* init_string = 1158 const char* init_string =
1159 jni->GetStringUTFChars(j_trials_init_string, NULL); 1159 jni->GetStringUTFChars(j_trials_init_string, NULL);
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2741 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer) 2741 return reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)
2742 ->inter_tone_gap(); 2742 ->inter_tone_gap();
2743 } 2743 }
2744 2744
2745 JOW(void, DtmfSender_free) 2745 JOW(void, DtmfSender_free)
2746 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) { 2746 (JNIEnv* jni, jclass, jlong j_dtmf_sender_pointer) {
2747 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release(); 2747 reinterpret_cast<DtmfSenderInterface*>(j_dtmf_sender_pointer)->Release();
2748 } 2748 }
2749 2749
2750 } // namespace webrtc_jni 2750 } // namespace webrtc_jni
OLDNEW
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/PeerConnectionFactory.java ('k') | webrtc/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698