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

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: cleanup 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
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_checker.h"
10 #include "media/audio/audio_thread.h"
11
12 namespace media {
13
14 class TestAudioThread : public AudioThread {
15 public:
16 TestAudioThread();
17 ~TestAudioThread() override;
18
19 // AudioThread implementation.
20 void Stop() override;
21 base::SingleThreadTaskRunner* GetTaskRunner() override;
22 base::SingleThreadTaskRunner* GetWorkerTaskRunner() override;
23
24 private:
25 base::ThreadChecker thread_checker_;
26 scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
27
28 DISALLOW_COPY_AND_ASSIGN(TestAudioThread);
29 };
30
31 } // namespace media
32
33 #endif // MEDIA_AUDIO_TEST_AUDIO_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698