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

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

Issue 2632203003: Delete deprecated PeerConnection methods, and corresponding using declarations. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 return init; 157 return init;
158 } 158 }
159 159
160 class ConstraintsWrapper; 160 class ConstraintsWrapper;
161 161
162 // Adapter between the C++ PeerConnectionObserver interface and the Java 162 // Adapter between the C++ PeerConnectionObserver interface and the Java
163 // PeerConnection.Observer interface. Wraps an instance of the Java interface 163 // PeerConnection.Observer interface. Wraps an instance of the Java interface
164 // and dispatches C++ callbacks to Java. 164 // and dispatches C++ callbacks to Java.
165 class PCOJava : public PeerConnectionObserver { 165 class PCOJava : public PeerConnectionObserver {
166 public: 166 public:
167 // We need these using declarations because there are two versions of each of
168 // the below methods and we only override one of them.
169 // TODO(deadbeef): Remove once there's only one version of the methods.
170 using PeerConnectionObserver::OnAddStream;
171 using PeerConnectionObserver::OnRemoveStream;
172 using PeerConnectionObserver::OnDataChannel;
173
174 PCOJava(JNIEnv* jni, jobject j_observer) 167 PCOJava(JNIEnv* jni, jobject j_observer)
175 : j_observer_global_(jni, j_observer), 168 : j_observer_global_(jni, j_observer),
176 j_observer_class_(jni, GetObjectClass(jni, *j_observer_global_)), 169 j_observer_class_(jni, GetObjectClass(jni, *j_observer_global_)),
177 j_media_stream_class_(jni, FindClass(jni, "org/webrtc/MediaStream")), 170 j_media_stream_class_(jni, FindClass(jni, "org/webrtc/MediaStream")),
178 j_media_stream_ctor_( 171 j_media_stream_ctor_(
179 GetMethodID(jni, *j_media_stream_class_, "<init>", "(J)V")), 172 GetMethodID(jni, *j_media_stream_class_, "<init>", "(J)V")),
180 j_audio_track_class_(jni, FindClass(jni, "org/webrtc/AudioTrack")), 173 j_audio_track_class_(jni, FindClass(jni, "org/webrtc/AudioTrack")),
181 j_audio_track_ctor_( 174 j_audio_track_ctor_(
182 GetMethodID(jni, *j_audio_track_class_, "<init>", "(J)V")), 175 GetMethodID(jni, *j_audio_track_class_, "<init>", "(J)V")),
183 j_video_track_class_(jni, FindClass(jni, "org/webrtc/VideoTrack")), 176 j_video_track_class_(jni, FindClass(jni, "org/webrtc/VideoTrack")),
(...skipping 2425 matching lines...) Expand 10 before | Expand all | Expand 10 after
2609 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer) 2602 reinterpret_cast<RtpReceiverInterface*>(j_rtp_receiver_pointer)
2610 ->SetObserver(nullptr); 2603 ->SetObserver(nullptr);
2611 RtpReceiverObserver* observer = 2604 RtpReceiverObserver* observer =
2612 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer); 2605 reinterpret_cast<RtpReceiverObserver*>(j_observer_pointer);
2613 if (observer) { 2606 if (observer) {
2614 delete observer; 2607 delete observer;
2615 } 2608 }
2616 } 2609 }
2617 2610
2618 } // namespace webrtc_jni 2611 } // namespace webrtc_jni
OLDNEW
« webrtc/api/peerconnectioninterface.h ('K') | « webrtc/pc/test/peerconnectiontestwrapper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698