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

Unified Diff: webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.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/RTCAudioSession+Private.h
diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
index cc92ba7742422e8407ab2ef970b60cfd896fe831..43af7c86e2fa202bbf2a6e20d6fc47673e1102d4 100644
--- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession+Private.h
@@ -10,13 +10,12 @@
#import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h"
+#include <vector>
+
NS_ASSUME_NONNULL_BEGIN
@interface RTCAudioSession ()
-/** The delegates. */
-@property(nonatomic, readonly) NSSet *delegates;
-
/** Number of times setActive:YES has succeeded without a balanced call to
* setActive:NO.
*/
@@ -24,6 +23,23 @@ NS_ASSUME_NONNULL_BEGIN
- (BOOL)checkLock:(NSError **)outError;
+/** Adds the delegate to the list of delegates, and places it at the front of
+ * the list. This delegate will be notified before other delegates of
+ * audio events.
+ */
+- (void)pushDelegate:(id<RTCAudioSessionDelegate>)delegate;
+
+// Properties and methods for tests.
+@property(nonatomic, readonly)
+ std::vector<__weak id<RTCAudioSessionDelegate> > delegates;
+- (void)notifyDidBeginInterruption;
+- (void)notifyDidEndInterruptionWithShouldResumeSession:
+ (BOOL)shouldResumeSession;
+- (void)notifyDidChangeRouteWithReason:(AVAudioSessionRouteChangeReason)reason
+ previousRoute:(AVAudioSessionRouteDescription *)previousRoute;
+- (void)notifyMediaServicesWereLost;
+- (void)notifyMediaServicesWereReset;
+
@end
NS_ASSUME_NONNULL_END

Powered by Google App Engine
This is Rietveld 408576698