Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(724)

Side by Side Diff: media/audio/test_audio_thread.h

Issue 2784433002: Ensures that audio tasks cannot run after AudioManager is deleted. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/audio/sounds/sounds_manager_unittest.cc ('k') | media/audio/test_audio_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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_
OLDNEW
« no previous file with comments | « media/audio/sounds/sounds_manager_unittest.cc ('k') | media/audio/test_audio_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698