mock_audio_source_callback.h 944 B

1234567891011121314151617181920212223242526272829303132
  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
  3. // found in the LICENSE file.
  4. #ifndef MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_
  5. #define MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_
  6. #include <stdint.h>
  7. #include "base/time/time.h"
  8. #include "media/audio/audio_io.h"
  9. #include "testing/gmock/include/gmock/gmock.h"
  10. namespace media {
  11. class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback {
  12. public:
  13. MockAudioSourceCallback();
  14. MockAudioSourceCallback(const MockAudioSourceCallback&) = delete;
  15. MockAudioSourceCallback& operator=(const MockAudioSourceCallback&) = delete;
  16. ~MockAudioSourceCallback() override;
  17. MOCK_METHOD4(OnMoreData,
  18. int(base::TimeDelta, base::TimeTicks, int, AudioBus*));
  19. MOCK_METHOD1(OnError, void(ErrorType));
  20. };
  21. } // namespace media
  22. #endif // MEDIA_AUDIO_MOCK_AUDIO_SOURCE_CALLBACK_H_