| Index: remoting/host/linux/audio_pipe_reader.h
|
| diff --git a/remoting/host/linux/audio_pipe_reader.h b/remoting/host/linux/audio_pipe_reader.h
|
| index 465c24663f5025c6b44cb21c990859d3f68ee218..64a459bd1668dc95bc2bde98ce3389bfcadb1c51 100644
|
| --- a/remoting/host/linux/audio_pipe_reader.h
|
| +++ b/remoting/host/linux/audio_pipe_reader.h
|
| @@ -7,7 +7,10 @@
|
|
|
| #include <stdint.h>
|
|
|
| +#include <memory>
|
| +
|
| #include "base/files/file.h"
|
| +#include "base/files/file_descriptor_watcher_posix.h"
|
| #include "base/files/file_path.h"
|
| #include "base/files/file_path_watcher.h"
|
| #include "base/macros.h"
|
| @@ -27,8 +30,8 @@ struct AudioPipeReaderTraits;
|
| // pulseaudio) writes the sound that's being played back and then sends data to
|
| // all registered observers.
|
| class AudioPipeReader
|
| - : public base::RefCountedThreadSafe<AudioPipeReader, AudioPipeReaderTraits>,
|
| - public base::MessageLoopForIO::Watcher {
|
| + : public base::RefCountedThreadSafe<AudioPipeReader,
|
| + AudioPipeReaderTraits> {
|
| public:
|
| // PulseAudio's module-pipe-sink must be configured to use the following
|
| // parameters for the sink we read from.
|
| @@ -54,10 +57,6 @@ class AudioPipeReader
|
| void AddObserver(StreamObserver* observer);
|
| void RemoveObserver(StreamObserver* observer);
|
|
|
| - // MessageLoopForIO::Watcher interface.
|
| - void OnFileCanReadWithoutBlocking(int fd) override;
|
| - void OnFileCanWriteWithoutBlocking(int fd) override;
|
| -
|
| private:
|
| friend class base::DeleteHelper<AudioPipeReader>;
|
| friend class base::RefCountedThreadSafe<AudioPipeReader>;
|
| @@ -65,7 +64,7 @@ class AudioPipeReader
|
|
|
| AudioPipeReader(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
|
| const base::FilePath& pipe_path);
|
| - ~AudioPipeReader() override;
|
| + ~AudioPipeReader();
|
|
|
| void StartOnAudioThread();
|
| void OnDirectoryChanged(const base::FilePath& path, bool error);
|
| @@ -102,7 +101,8 @@ class AudioPipeReader
|
| // Bytes left from the previous read.
|
| std::string left_over_bytes_;
|
|
|
| - base::MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_;
|
| + std::unique_ptr<base::FileDescriptorWatcher::Controller>
|
| + pipe_watch_controller_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(AudioPipeReader);
|
| };
|
|
|