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

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: 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/RTCAudioSessionDelegateAdapter.h b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..ee324d7551f1a505f611ea02d9f353e6798badf1
--- /dev/null
+++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSessionDelegateAdapter.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2016 The WebRTC Project Authors. All rights reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h"
+
+namespace webrtc {
+ class AudioDeviceIOS;
+}
+
+namespace rtc {
+ class Thread;
+}
+
+/** Adapter that forwards RTCAudioSessionDelegate calls to the appropriate
+ * methods on the audio device. In addition, calls those methods async on the
+ * thread supplied during construction.
+ */
+@interface RTCAudioSessionDelegateAdapter : NSObject <RTCAudioSessionDelegate>
+
+- (instancetype)init NS_UNAVAILABLE;
+
+/** Audio device and callback thread are raw pointers and should be kept alive
henrika_webrtc 2016/03/15 08:53:44 Are there any restrictions on the thread here in o
tkchin_webrtc 2016/03/15 20:14:58 Good pt. Edited interfaces a bit.
+ * for this object's lifetime.
+ */
+- (instancetype)initWithAudioDevice:(webrtc::AudioDeviceIOS *)device
+ callbackThread:(rtc::Thread *)callbackThread
+ NS_DESIGNATED_INITIALIZER;
+
+@end

Powered by Google App Engine
This is Rietveld 408576698