| Index: media/audio/audio_input_controller.h
|
| diff --git a/media/audio/audio_input_controller.h b/media/audio/audio_input_controller.h
|
| index b21eabadaf2fce91bdfbb5f02a32b54b9a3c4a4a..b8789e0747b68df5375d930ef149160f2fb4ddd2 100644
|
| --- a/media/audio/audio_input_controller.h
|
| +++ b/media/audio/audio_input_controller.h
|
| @@ -9,6 +9,7 @@
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/synchronization/lock.h"
|
| #include "base/threading/thread.h"
|
| +#include "base/timer.h"
|
| #include "media/audio/audio_io.h"
|
| #include "media/audio/audio_manager.h"
|
|
|
| @@ -100,6 +101,7 @@ class AudioInputController
|
| // AudioInputController being created directly.
|
| #if defined(UNIT_TEST)
|
| static void set_factory(Factory* factory) { factory_ = factory; }
|
| + AudioInputStream* stream() { return stream_; }
|
| #endif
|
|
|
| // Starts recording in this audio input stream.
|
| @@ -138,10 +140,18 @@ class AudioInputController
|
| void DoRecord();
|
| void DoClose();
|
| void DoReportError(int code);
|
| + void DoReportNoDataError();
|
| + void DoResetNoDataTimer();
|
|
|
| EventHandler* handler_;
|
| AudioInputStream* stream_;
|
|
|
| + // |no_data_timer_| is used to call DoReportNoDataError when we stop
|
| + // receiving OnData calls without an OnClose call. This can occur when an
|
| + // audio input device is unplugged whilst recording on Windows.
|
| + // See http://crbug.com/79936 for details.
|
| + base::DelayTimer<AudioInputController> no_data_timer_;
|
| +
|
| // |state_| is written on the audio input controller thread and is read on
|
| // the hardware audio thread. These operations need to be locked. But lock
|
| // is not required for reading on the audio input controller thread.
|
|
|