| 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 MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ | 5 #ifndef MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |
| 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ | 6 #define MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "media/video/capture/screen/mouse_cursor_shape.h" | 8 #include "media/video/capture/screen/mouse_cursor_shape.h" |
| 9 #include "media/video/capture/screen/screen_capture_data.h" | 9 #include "media/video/capture/screen/screen_capture_data.h" |
| 10 #include "media/video/capture/screen/screen_capturer.h" | 10 #include "media/video/capture/screen/screen_capturer.h" |
| 11 #include "testing/gmock/include/gmock/gmock.h" | 11 #include "testing/gmock/include/gmock/gmock.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 | 14 |
| 15 class MockScreenCapturer : public ScreenCapturer { | 15 class MockScreenCapturer : public ScreenCapturer { |
| 16 public: | 16 public: |
| 17 MockScreenCapturer(); | 17 MockScreenCapturer(); |
| 18 virtual ~MockScreenCapturer(); | 18 virtual ~MockScreenCapturer(); |
| 19 | 19 |
| 20 MOCK_METHOD1(Start, void(Delegate* delegate)); | 20 MOCK_METHOD1(Start, void(Delegate* delegate)); |
| 21 MOCK_METHOD0(Stop, void()); | |
| 22 MOCK_METHOD1(InvalidateRegion, void(const SkRegion& invalid_region)); | |
| 23 MOCK_METHOD0(CaptureFrame, void()); | 21 MOCK_METHOD0(CaptureFrame, void()); |
| 24 | 22 |
| 25 private: | 23 private: |
| 26 DISALLOW_COPY_AND_ASSIGN(MockScreenCapturer); | 24 DISALLOW_COPY_AND_ASSIGN(MockScreenCapturer); |
| 27 }; | 25 }; |
| 28 | 26 |
| 29 class MockScreenCapturerDelegate : public ScreenCapturer::Delegate { | 27 class MockScreenCapturerDelegate : public ScreenCapturer::Delegate { |
| 30 public: | 28 public: |
| 31 MockScreenCapturerDelegate(); | 29 MockScreenCapturerDelegate(); |
| 32 virtual ~MockScreenCapturerDelegate(); | 30 virtual ~MockScreenCapturerDelegate(); |
| 33 | 31 |
| 34 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape) OVERRIDE; | 32 void OnCursorShapeChanged(scoped_ptr<MouseCursorShape> cursor_shape) OVERRIDE; |
| 35 | 33 |
| 36 MOCK_METHOD1(CreateSharedBuffer, scoped_refptr<SharedBuffer>(uint32)); | 34 MOCK_METHOD1(CreateSharedBuffer, scoped_refptr<SharedBuffer>(uint32)); |
| 37 MOCK_METHOD1(ReleaseSharedBuffer, void(scoped_refptr<SharedBuffer>)); | 35 MOCK_METHOD1(ReleaseSharedBuffer, void(scoped_refptr<SharedBuffer>)); |
| 38 MOCK_METHOD1(OnCaptureCompleted, void(scoped_refptr<ScreenCaptureData>)); | 36 MOCK_METHOD1(OnCaptureCompleted, void(scoped_refptr<ScreenCaptureData>)); |
| 39 MOCK_METHOD1(OnCursorShapeChangedPtr, | 37 MOCK_METHOD1(OnCursorShapeChangedPtr, |
| 40 void(MouseCursorShape* cursor_shape)); | 38 void(MouseCursorShape* cursor_shape)); |
| 41 | 39 |
| 42 private: | 40 private: |
| 43 DISALLOW_COPY_AND_ASSIGN(MockScreenCapturerDelegate); | 41 DISALLOW_COPY_AND_ASSIGN(MockScreenCapturerDelegate); |
| 44 }; | 42 }; |
| 45 | 43 |
| 46 } // namespace media | 44 } // namespace media |
| 47 | 45 |
| 48 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ | 46 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_SCREEN_CAPTURER_MOCK_OBJECTS_H_ |
| OLD | NEW |