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

Side by Side Diff: webrtc/api/objc/RTCDataChannel.mm

Issue 1824573002: Fix some warnings in ObjC code. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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/api/objc/RTCDataChannel.h ('k') | webrtc/api/objc/RTCIceCandidate.h » ('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 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 10
(...skipping 16 matching lines...) Expand all
27 27
28 void OnMessage(const DataBuffer& buffer) override { 28 void OnMessage(const DataBuffer& buffer) override {
29 RTCDataBuffer *data_buffer = 29 RTCDataBuffer *data_buffer =
30 [[RTCDataBuffer alloc] initWithNativeBuffer:buffer]; 30 [[RTCDataBuffer alloc] initWithNativeBuffer:buffer];
31 [channel_.delegate dataChannel:channel_ 31 [channel_.delegate dataChannel:channel_
32 didReceiveMessageWithBuffer:data_buffer]; 32 didReceiveMessageWithBuffer:data_buffer];
33 } 33 }
34 34
35 void OnBufferedAmountChange(uint64_t previousAmount) override { 35 void OnBufferedAmountChange(uint64_t previousAmount) override {
36 id<RTCDataChannelDelegate> delegate = channel_.delegate; 36 id<RTCDataChannelDelegate> delegate = channel_.delegate;
37 if ([delegate 37 SEL sel = @selector(dataChannel:didChangeBufferedAmount:);
38 respondsToSelector:@selector(channel:didChangeBufferedAmount:)]) { 38 if ([delegate respondsToSelector:sel]) {
39 [delegate dataChannel:channel_ didChangeBufferedAmount:previousAmount]; 39 [delegate dataChannel:channel_ didChangeBufferedAmount:previousAmount];
40 } 40 }
41 } 41 }
42 42
43 private: 43 private:
44 __weak RTCDataChannel *channel_; 44 __weak RTCDataChannel *channel_;
45 }; 45 };
46 } 46 }
47 47
48 48
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 case RTCDataChannelStateOpen: 214 case RTCDataChannelStateOpen:
215 return @"Open"; 215 return @"Open";
216 case RTCDataChannelStateClosing: 216 case RTCDataChannelStateClosing:
217 return @"Closing"; 217 return @"Closing";
218 case RTCDataChannelStateClosed: 218 case RTCDataChannelStateClosed:
219 return @"Closed"; 219 return @"Closed";
220 } 220 }
221 } 221 }
222 222
223 @end 223 @end
OLDNEW
« no previous file with comments | « webrtc/api/objc/RTCDataChannel.h ('k') | webrtc/api/objc/RTCIceCandidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698