| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SOURCE_CALLBACK_H_ | 5 #ifndef MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ |
| 6 #define MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ | 6 #define MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "media/audio/audio_io.h" | 9 #include "media/audio/audio_io.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 11 |
| 11 namespace media { | 12 namespace media { |
| 12 | 13 |
| 13 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 14 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
| 14 public: | 15 public: |
| 15 MockAudioSourceCallback(); | 16 MockAudioSourceCallback(); |
| 16 virtual ~MockAudioSourceCallback(); | 17 virtual ~MockAudioSourceCallback(); |
| 17 | 18 |
| 18 MOCK_METHOD3(OnMoreData, | 19 MOCK_METHOD3(OnMoreData, |
| 19 int(AudioBus* audio_bus, | 20 int(AudioBus* audio_bus, |
| 20 uint32_t total_bytes_delay, | 21 uint32_t total_bytes_delay, |
| 21 uint32_t frames_skipped)); | 22 uint32_t frames_skipped)); |
| 22 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); | 23 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); |
| 23 | 24 |
| 24 private: | 25 private: |
| 25 DISALLOW_COPY_AND_ASSIGN(MockAudioSourceCallback); | 26 DISALLOW_COPY_AND_ASSIGN(MockAudioSourceCallback); |
| 26 }; | 27 }; |
| 27 | 28 |
| 28 } // namespace media | 29 } // namespace media |
| 29 | 30 |
| 30 #endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ | 31 #endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ |
| OLD | NEW |