OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef MEDIA_AUDIO_TEST_AUDIO_THREAD_H_ |
| 6 #define MEDIA_AUDIO_TEST_AUDIO_THREAD_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/threading/thread.h" |
| 10 #include "base/threading/thread_checker.h" |
| 11 #include "media/audio/audio_thread.h" |
| 12 |
| 13 namespace media { |
| 14 |
| 15 class TestAudioThread : public AudioThread { |
| 16 public: |
| 17 TestAudioThread(); |
| 18 explicit TestAudioThread(bool use_real_thread); |
| 19 ~TestAudioThread() override; |
| 20 |
| 21 // AudioThread implementation. |
| 22 void Stop() override; |
| 23 base::SingleThreadTaskRunner* GetTaskRunner() override; |
| 24 base::SingleThreadTaskRunner* GetWorkerTaskRunner() override; |
| 25 |
| 26 private: |
| 27 std::unique_ptr<base::Thread> thread_; |
| 28 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 29 |
| 30 THREAD_CHECKER(thread_checker_); |
| 31 DISALLOW_COPY_AND_ASSIGN(TestAudioThread); |
| 32 }; |
| 33 |
| 34 } // namespace media |
| 35 |
| 36 #endif // MEDIA_AUDIO_TEST_AUDIO_THREAD_H_ |
OLD | NEW |