sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |
| 12 | #define WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |
| 13 | |
kwiberg | 4485ffb | 2016-04-26 15:14:39 | [diff] [blame] | 14 | #include "webrtc/base/constructormagic.h" |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 15 | #include "webrtc/modules/desktop_capture/screen_capturer.h" |
kwiberg | ac9f876 | 2016-10-01 05:29:43 | [diff] [blame] | 16 | #include "webrtc/test/gmock.h" |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
zijiehe | b763e39 | 2016-11-01 23:02:44 | [diff] [blame^] | 20 | // Deprecated. |
| 21 | // Use webrtc/modules/desktop_capture/mock_desktop_capturer_callback.h. |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 22 | class MockScreenCapturerCallback : public ScreenCapturer::Callback { |
| 23 | public: |
| 24 | MockScreenCapturerCallback() {} |
sergeyu | e183121 | 2016-10-26 20:15:42 | [diff] [blame] | 25 | ~MockScreenCapturerCallback() override {} |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 26 | |
sergeyu | 5d91028 | 2016-06-07 23:41:58 | [diff] [blame] | 27 | MOCK_METHOD2(OnCaptureResultPtr, |
| 28 | void(DesktopCapturer::Result result, |
| 29 | std::unique_ptr<DesktopFrame>* frame)); |
| 30 | void OnCaptureResult(DesktopCapturer::Result result, |
| 31 | std::unique_ptr<DesktopFrame> frame) override { |
| 32 | OnCaptureResultPtr(result, &frame); |
| 33 | } |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 34 | |
| 35 | private: |
henrikg | 3c089d7 | 2015-09-16 12:37:44 | [diff] [blame] | 36 | RTC_DISALLOW_COPY_AND_ASSIGN(MockScreenCapturerCallback); |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 37 | }; |
| 38 | |
sergeyu@chromium.org | 3d34f66 | 2013-06-04 18:51:23 | [diff] [blame] | 39 | } // namespace webrtc |
| 40 | |
| 41 | #endif // WEBRTC_MODULES_DESKTOP_CAPTURE_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |