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

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h

Issue 1796983004: Use RTCAudioSessionDelegate in AudioDeviceIOS. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Some nits. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
similarity index 50%
copy from webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
copy to webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
index cc92ba7742422e8407ab2ef970b60cfd896fe831..0140aa043ac3e55843f01b04932ee139c341e151 100644
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
@@ -10,20 +10,21 @@
#import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h"
-NS_ASSUME_NONNULL_BEGIN
+namespace webrtc {
+class AudioSessionObserver;
+}
-@interface RTCAudioSession ()
+/** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate
+ * methods on the AudioSessionObserver.
+ */
+@interface RTCAudioSessionDelegateAdapter : NSObject <RTCAudioSessionDelegate>
-/** The delegates. */
-@property(nonatomic, readonly) NSSet *delegates;
+- (instancetype)init NS_UNAVAILABLE;
-/** Number of times setActive:YES has succeeded without a balanced call to
- * setActive:NO.
+/** |observer| is a raw pointer and should be kept alive
+ * for this object's lifetime.
*/
-@property(nonatomic, readonly) NSInteger activationCount;
-
-- (BOOL)checkLock:(NSError **)outError;
+- (instancetype)initWithObserver:(webrtc::AudioSessionObserver *)observer
+ NS_DESIGNATED_INITIALIZER;
@end
-
-NS_ASSUME_NONNULL_END

Powered by Google App Engine
This is Rietveld 408576698