| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 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 SERVICES_VIDEO_CAPTURE_MOCK_VIDEO_FRAME_RECEIVER_H_ |
| 6 #define SERVICES_VIDEO_CAPTURE_MOCK_VIDEO_FRAME_RECEIVER_H_ |
| 7 |
| 8 #include "media/mojo/interfaces/media_types.mojom.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 #include "services/video_capture/public/interfaces/video_frame_receiver.mojom.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 |
| 13 namespace video_capture { |
| 14 |
| 15 class MockVideoFrameReceiver : public mojom::VideoFrameReceiver { |
| 16 public: |
| 17 MockVideoFrameReceiver(mojom::VideoFrameReceiverRequest request); |
| 18 ~MockVideoFrameReceiver() override; |
| 19 |
| 20 // Use forwarding method to work around gmock not supporting move-only types. |
| 21 void OnIncomingCapturedVideoFrame(media::mojom::VideoFramePtr frame) override; |
| 22 |
| 23 MOCK_METHOD1(OnIncomingCapturedVideoFramePtr, |
| 24 void(const media::mojom::VideoFramePtr* frame)); |
| 25 MOCK_METHOD0(OnError, void()); |
| 26 MOCK_METHOD1(OnLog, void(const std::string&)); |
| 27 MOCK_METHOD1(OnBufferDestroyed, void(int32_t)); |
| 28 |
| 29 private: |
| 30 const mojo::Binding<mojom::VideoFrameReceiver> binding_; |
| 31 }; |
| 32 |
| 33 } // namespace video_capture |
| 34 |
| 35 #endif // SERVICES_VIDEO_CAPTURE_MOCK_VIDEO_FRAME_RECEIVER_H_ |
| OLD | NEW |