Index: media/audio/audio_manager_base.h |
=================================================================== |
--- media/audio/audio_manager_base.h (revision 194406) |
+++ media/audio/audio_manager_base.h (working copy) |
@@ -20,6 +20,10 @@ |
#include "base/win/scoped_com_initializer.h" |
#endif |
+#if defined(OS_ANDROID) |
+#include "base/android/jni_android.h" |
+#endif |
+ |
namespace base { |
class Thread; |
} |
@@ -93,6 +97,10 @@ |
virtual AudioParameters GetInputStreamParameters( |
const std::string& device_id) OVERRIDE; |
+#if defined(OS_ANDROID) |
+ static bool RegisterAudioManager(JNIEnv* env); |
+#endif |
+ |
protected: |
AudioManagerBase(); |
@@ -128,14 +136,16 @@ |
// from the audio thread (no locking). |
AudioOutputDispatchersMap output_dispatchers_; |
- // Get number of input or output streams. |
- int input_stream_count() { return num_input_streams_; } |
- int output_stream_count() { return num_output_streams_; } |
- |
private: |
// Called by Shutdown(). |
void ShutdownOnAudioThread(); |
+#if defined(OS_ANDROID) |
+ void SetAudioMode(int mode); |
+ void RegisterHeadsetReceiver(); |
+ void UnregisterHeadsetReceiver(); |
+#endif |
+ |
// Counts the number of active input streams to find out if something else |
// is currently recording in Chrome. |
base::AtomicRefCount num_active_input_streams_; |
@@ -165,6 +175,11 @@ |
// and GetMessageLoop() starts returning NULL. |
scoped_refptr<base::MessageLoopProxy> message_loop_; |
+#if defined(OS_ANDROID) |
+ // Java AudioManager instance. |
+ base::android::ScopedJavaGlobalRef<jobject> j_audio_manager_; |
+#endif |
+ |
DISALLOW_COPY_AND_ASSIGN(AudioManagerBase); |
}; |