Chromium Code Reviews| Index: media/audio/audio_input_controller.h |
| diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h |
| index ff0022dbee32629e567ac114d657a84d00728bb3..59b5007fee11b5b32e521fd0439be917349504ac 100644 |
| --- a/media/audio/audio_input_controller.h |
| +++ b/media/audio/audio_input_controller.h |
| @@ -13,7 +13,9 @@ |
| #include "base/files/file.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/optional.h" |
| #include "base/single_thread_task_runner.h" |
| +#include "base/timer/timer.h" |
| #include "media/audio/audio_debug_file_writer.h" |
| #include "media/audio/audio_io.h" |
| #include "media/audio/audio_manager_base.h" |
| @@ -107,6 +109,7 @@ class MEDIA_EXPORT AudioInputController |
| ErrorCode error_code) = 0; |
| virtual void OnLog(AudioInputController* controller, |
| const std::string& message) = 0; |
| + virtual void OnMuted(AudioInputController* controller, bool is_muted) = 0; |
| protected: |
| virtual ~EventHandler() {} |
| @@ -323,6 +326,8 @@ class MEDIA_EXPORT AudioInputController |
| float* average_power_dbfs, |
| int* mic_volume_percent); |
| + void CheckMutedState(); |
| + |
| static StreamType ParamsToStreamType(const AudioParameters& params); |
| // Gives access to the task runner of the creating thread. |
| @@ -367,6 +372,11 @@ class MEDIA_EXPORT AudioInputController |
| // Time when the stream started recording. |
| base::TimeTicks stream_create_time_; |
| + bool is_muted_ = false; |
| + // The timer needs to be destroyed on the correct thread, so we can't leave |
|
o1ka
2017/06/02 16:27:27
nit: empty line before the comment
ossu-chromium
2017/06/07 17:27:06
Will fix!
|
| + // that to our destructor. |
| + base::Optional<base::RepeatingTimer> check_muted_state_timer_; |
| + |
| #if BUILDFLAG(ENABLE_WEBRTC) |
| // Used for audio debug recordings. Accessed on audio thread. |
| AudioDebugRecordingHelper debug_recording_helper_; |