Reformat the WebRTC code base
Running clang-format with chromium's style guide. The goal is n-fold: * providing consistency and readability (that's what code guidelines are for) * preventing noise with presubmit checks and git cl format * building on the previous point: making it easier to automatically fix format issues * you name it Please consider using git-hyper-blame to ignore this commit. Bug: webrtc:9340 Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87 Reviewed-on: https://webrtc-review.googlesource.com/81185 Reviewed-by: Patrik Höglund <phoglund@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23660}
This commit is contained in:
@ -21,13 +21,11 @@ namespace webrtc {
|
||||
* id<RTCPeerConnectionDelegate> and call methods on that interface.
|
||||
*/
|
||||
class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
|
||||
|
||||
public:
|
||||
PeerConnectionDelegateAdapter(RTCPeerConnection *peerConnection);
|
||||
virtual ~PeerConnectionDelegateAdapter();
|
||||
|
||||
void OnSignalingChange(
|
||||
PeerConnectionInterface::SignalingState new_state) override;
|
||||
void OnSignalingChange(PeerConnectionInterface::SignalingState new_state) override;
|
||||
|
||||
void OnAddStream(rtc::scoped_refptr<MediaStreamInterface> stream) override;
|
||||
|
||||
@ -35,77 +33,68 @@ class PeerConnectionDelegateAdapter : public PeerConnectionObserver {
|
||||
|
||||
void OnTrack(rtc::scoped_refptr<RtpTransceiverInterface> transceiver) override;
|
||||
|
||||
void OnDataChannel(
|
||||
rtc::scoped_refptr<DataChannelInterface> data_channel) override;
|
||||
void OnDataChannel(rtc::scoped_refptr<DataChannelInterface> data_channel) override;
|
||||
|
||||
void OnRenegotiationNeeded() override;
|
||||
|
||||
void OnIceConnectionChange(
|
||||
PeerConnectionInterface::IceConnectionState new_state) override;
|
||||
void OnIceConnectionChange(PeerConnectionInterface::IceConnectionState new_state) override;
|
||||
|
||||
void OnIceGatheringChange(
|
||||
PeerConnectionInterface::IceGatheringState new_state) override;
|
||||
void OnIceGatheringChange(PeerConnectionInterface::IceGatheringState new_state) override;
|
||||
|
||||
void OnIceCandidate(const IceCandidateInterface *candidate) override;
|
||||
|
||||
void OnIceCandidatesRemoved(
|
||||
const std::vector<cricket::Candidate>& candidates) override;
|
||||
void OnIceCandidatesRemoved(const std::vector<cricket::Candidate> &candidates) override;
|
||||
|
||||
void OnAddTrack(rtc::scoped_refptr<RtpReceiverInterface> receiver,
|
||||
const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams) override;
|
||||
const std::vector<rtc::scoped_refptr<MediaStreamInterface>> &streams) override;
|
||||
|
||||
private:
|
||||
__weak RTCPeerConnection *peer_connection_;
|
||||
};
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
} // namespace webrtc
|
||||
|
||||
@interface RTCPeerConnection ()
|
||||
|
||||
/** The native PeerConnectionInterface created during construction. */
|
||||
@property(nonatomic, readonly)
|
||||
rtc::scoped_refptr<webrtc::PeerConnectionInterface> nativePeerConnection;
|
||||
@property(nonatomic, readonly) rtc::scoped_refptr<webrtc::PeerConnectionInterface>
|
||||
nativePeerConnection;
|
||||
|
||||
/** Initialize an RTCPeerConnection with a configuration, constraints, and
|
||||
* delegate.
|
||||
*/
|
||||
- (instancetype)initWithFactory:
|
||||
(RTCPeerConnectionFactory *)factory
|
||||
configuration:
|
||||
(RTCConfiguration *)configuration
|
||||
constraints:
|
||||
(RTCMediaConstraints *)constraints
|
||||
delegate:
|
||||
(nullable id<RTCPeerConnectionDelegate>)delegate
|
||||
- (instancetype)initWithFactory:(RTCPeerConnectionFactory *)factory
|
||||
configuration:(RTCConfiguration *)configuration
|
||||
constraints:(RTCMediaConstraints *)constraints
|
||||
delegate:(nullable id<RTCPeerConnectionDelegate>)delegate
|
||||
NS_DESIGNATED_INITIALIZER;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::SignalingState)nativeSignalingStateForState:
|
||||
(RTCSignalingState)state;
|
||||
(RTCSignalingState)state;
|
||||
|
||||
+ (RTCSignalingState)signalingStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::SignalingState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::SignalingState)nativeState;
|
||||
|
||||
+ (NSString *)stringForSignalingState:(RTCSignalingState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::IceConnectionState)
|
||||
nativeIceConnectionStateForState:(RTCIceConnectionState)state;
|
||||
+ (webrtc::PeerConnectionInterface::IceConnectionState)nativeIceConnectionStateForState:
|
||||
(RTCIceConnectionState)state;
|
||||
|
||||
+ (RTCIceConnectionState)iceConnectionStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::IceConnectionState)nativeState;
|
||||
|
||||
+ (NSString *)stringForIceConnectionState:(RTCIceConnectionState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::IceGatheringState)
|
||||
nativeIceGatheringStateForState:(RTCIceGatheringState)state;
|
||||
+ (webrtc::PeerConnectionInterface::IceGatheringState)nativeIceGatheringStateForState:
|
||||
(RTCIceGatheringState)state;
|
||||
|
||||
+ (RTCIceGatheringState)iceGatheringStateForNativeState:
|
||||
(webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
|
||||
(webrtc::PeerConnectionInterface::IceGatheringState)nativeState;
|
||||
|
||||
+ (NSString *)stringForIceGatheringState:(RTCIceGatheringState)state;
|
||||
|
||||
+ (webrtc::PeerConnectionInterface::StatsOutputLevel)
|
||||
nativeStatsOutputLevelForLevel:(RTCStatsOutputLevel)level;
|
||||
+ (webrtc::PeerConnectionInterface::StatsOutputLevel)nativeStatsOutputLevelForLevel:
|
||||
(RTCStatsOutputLevel)level;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user