OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 5 #ifndef MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 6 #define MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
7 | 7 |
| 8 #include "base/macros.h" |
8 #include "media/audio/audio_manager.h" | 9 #include "media/audio/audio_manager.h" |
9 | 10 |
10 namespace media { | 11 namespace media { |
11 | 12 |
12 // This class is a simple mock around AudioManager, used exclusively for tests, | 13 // This class is a simple mock around AudioManager, used exclusively for tests, |
13 // which has the following purposes: | 14 // which has the following purposes: |
14 // 1) Avoids to use the actual (system and platform dependent) AudioManager. | 15 // 1) Avoids to use the actual (system and platform dependent) AudioManager. |
15 // Some bots does not have input devices, thus using the actual AudioManager | 16 // Some bots does not have input devices, thus using the actual AudioManager |
16 // would causing failures on classes which expect that. | 17 // would causing failures on classes which expect that. |
17 // 2) Allows the mock audio events to be dispatched on an arbitrary thread, | 18 // 2) Allows the mock audio events to be dispatched on an arbitrary thread, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 72 |
72 private: | 73 private: |
73 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 74 scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
74 | 75 |
75 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); | 76 DISALLOW_COPY_AND_ASSIGN(MockAudioManager); |
76 }; | 77 }; |
77 | 78 |
78 } // namespace media. | 79 } // namespace media. |
79 | 80 |
80 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ | 81 #endif // MEDIA_AUDIO_MOCK_AUDIO_MANAGER_H_ |
OLD | NEW |