OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ |
6 #define REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ | 6 #define REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ |
7 | 7 |
8 #include "remoting/capturer/capture_data.h" | 8 #include "remoting/capturer/capture_data.h" |
9 #include "remoting/capturer/mouse_cursor_shape.h" | 9 #include "remoting/capturer/mouse_cursor_shape.h" |
10 #include "remoting/capturer/video_frame_capturer.h" | 10 #include "remoting/capturer/video_frame_capturer.h" |
11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 | 14 |
15 class MockVideoFrameCapturer : public VideoFrameCapturer { | 15 class MockVideoFrameCapturer : public VideoFrameCapturer { |
16 public: | 16 public: |
17 MockVideoFrameCapturer(); | 17 MockVideoFrameCapturer(); |
18 virtual ~MockVideoFrameCapturer(); | 18 virtual ~MockVideoFrameCapturer(); |
19 | 19 |
20 MOCK_METHOD1(Start, void(Delegate* delegate)); | 20 MOCK_METHOD1(Start, void(Delegate* delegate)); |
21 MOCK_METHOD0(Stop, void()); | 21 MOCK_METHOD0(Stop, void()); |
22 MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region)); | 22 MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region)); |
23 MOCK_METHOD0(CaptureFrame, void()); | 23 MOCK_METHOD0(CaptureFrame, void()); |
24 MOCK_CONST_METHOD0(size_most_recent, const SkISize&()); | |
25 | 24 |
26 private: | 25 private: |
27 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturer); | 26 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturer); |
28 }; | 27 }; |
29 | 28 |
30 class MockVideoFrameCapturerDelegate : public VideoFrameCapturer::Delegate { | 29 class MockVideoFrameCapturerDelegate : public VideoFrameCapturer::Delegate { |
31 public: | 30 public: |
32 MockVideoFrameCapturerDelegate(); | 31 MockVideoFrameCapturerDelegate(); |
33 virtual ~MockVideoFrameCapturerDelegate(); | 32 virtual ~MockVideoFrameCapturerDelegate(); |
34 | 33 |
35 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape) OVERRIDE; | 34 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape) OVERRIDE; |
36 | 35 |
37 MOCK_METHOD1(OnCaptureCompleted, void(scoped_refptr<CaptureData>)); | 36 MOCK_METHOD1(OnCaptureCompleted, void(scoped_refptr<CaptureData>)); |
38 MOCK_METHOD1(OnCursorShapeChangedPtr, | 37 MOCK_METHOD1(OnCursorShapeChangedPtr, |
39 void(MouseCursorShape* cursor_shape)); | 38 void(MouseCursorShape* cursor_shape)); |
40 | 39 |
41 private: | 40 private: |
42 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturerDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(MockVideoFrameCapturerDelegate); |
43 }; | 42 }; |
44 | 43 |
45 } // namespace remoting | 44 } // namespace remoting |
46 | 45 |
47 #endif // REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ | 46 #endif // REMOTING_CAPTURER_VIDEO_CAPTURER_MOCK_OBJECTS_H_ |
OLD | NEW |