| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/time/time.h" |
| 11 #include "media/audio/audio_io.h" | 12 #include "media/audio/audio_io.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 14 |
| 14 namespace media { | 15 namespace media { |
| 15 | 16 |
| 16 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { | 17 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { |
| 17 public: | 18 public: |
| 18 MockAudioSourceCallback(); | 19 MockAudioSourceCallback(); |
| 19 virtual ~MockAudioSourceCallback(); | 20 virtual ~MockAudioSourceCallback(); |
| 20 | 21 |
| 21 MOCK_METHOD3(OnMoreData, | 22 MOCK_METHOD4(OnMoreData, |
| 22 int(AudioBus* audio_bus, | 23 int(base::TimeDelta, base::TimeTicks, int, AudioBus*)); |
| 23 uint32_t total_bytes_delay, | 24 MOCK_METHOD1(OnError, void(AudioOutputStream*)); |
| 24 uint32_t frames_skipped)); | |
| 25 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); | |
| 26 | 25 |
| 27 private: | 26 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(MockAudioSourceCallback); | 27 DISALLOW_COPY_AND_ASSIGN(MockAudioSourceCallback); |
| 29 }; | 28 }; |
| 30 | 29 |
| 31 } // namespace media | 30 } // namespace media |
| 32 | 31 |
| 33 #endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ | 32 #endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_ |
| OLD | NEW |