| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_HOST_MOCK_OBJECTS_H_ | 5 #ifndef REMOTING_HOST_MOCK_OBJECTS_H_ |
| 6 #define REMOTING_HOST_MOCK_OBJECTS_H_ | 6 #define REMOTING_HOST_MOCK_OBJECTS_H_ |
| 7 | 7 |
| 8 #include "media/base/data_buffer.h" | 8 #include "media/base/data_buffer.h" |
| 9 #include "remoting/base/protocol_decoder.h" | 9 #include "remoting/base/protocol_decoder.h" |
| 10 #include "remoting/host/capturer.h" | 10 #include "remoting/host/capturer.h" |
| 11 #include "remoting/host/client_connection.h" | 11 #include "remoting/host/client_connection.h" |
| 12 #include "remoting/host/encoder.h" | |
| 13 #include "remoting/host/event_executor.h" | 12 #include "remoting/host/event_executor.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
| 15 | 14 |
| 16 namespace remoting { | 15 namespace remoting { |
| 17 | 16 |
| 18 class MockCapturer : public Capturer { | 17 class MockCapturer : public Capturer { |
| 19 public: | 18 public: |
| 20 MockCapturer() {} | 19 MockCapturer() {} |
| 21 | 20 |
| 22 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback)); | 21 MOCK_METHOD1(CaptureInvalidRects, void(CaptureCompletedCallback* callback)); |
| 23 MOCK_METHOD2(CaptureRects, void(const RectVector& rects, | 22 MOCK_METHOD2(CaptureRects, void(const RectVector& rects, |
| 24 CaptureCompletedCallback* callback)); | 23 CaptureCompletedCallback* callback)); |
| 25 MOCK_METHOD1(InvalidateRects, void(const RectVector& inval_rects)); | 24 MOCK_METHOD1(InvalidateRects, void(const RectVector& inval_rects)); |
| 26 MOCK_METHOD0(InvalidateFullScreen, void()); | 25 MOCK_METHOD0(InvalidateFullScreen, void()); |
| 27 MOCK_METHOD0(ScreenConfigurationChanged, void()); | 26 MOCK_METHOD0(ScreenConfigurationChanged, void()); |
| 28 MOCK_CONST_METHOD0(width, int()); | 27 MOCK_CONST_METHOD0(width, int()); |
| 29 MOCK_CONST_METHOD0(height, int()); | 28 MOCK_CONST_METHOD0(height, int()); |
| 30 | 29 |
| 31 private: | 30 private: |
| 32 DISALLOW_COPY_AND_ASSIGN(MockCapturer); | 31 DISALLOW_COPY_AND_ASSIGN(MockCapturer); |
| 33 }; | 32 }; |
| 34 | 33 |
| 35 class MockEncoder : public Encoder { | |
| 36 public: | |
| 37 MockEncoder() {} | |
| 38 | |
| 39 MOCK_METHOD3(Encode, void( | |
| 40 scoped_refptr<Capturer::CaptureData> capture_data, | |
| 41 bool key_frame, | |
| 42 DataAvailableCallback* data_available_callback)); | |
| 43 | |
| 44 private: | |
| 45 DISALLOW_COPY_AND_ASSIGN(MockEncoder); | |
| 46 }; | |
| 47 | |
| 48 class MockEventExecutor : public EventExecutor { | 34 class MockEventExecutor : public EventExecutor { |
| 49 public: | 35 public: |
| 50 MockEventExecutor() {} | 36 MockEventExecutor() {} |
| 51 | 37 |
| 52 MOCK_METHOD1(HandleInputEvents, void(ClientMessageList* messages)); | 38 MOCK_METHOD1(HandleInputEvents, void(ClientMessageList* messages)); |
| 53 | 39 |
| 54 private: | 40 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); | 41 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); |
| 56 }; | 42 }; |
| 57 | 43 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 85 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); | 71 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); |
| 86 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); | 72 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); |
| 87 | 73 |
| 88 private: | 74 private: |
| 89 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); | 75 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); |
| 90 }; | 76 }; |
| 91 | 77 |
| 92 } // namespace remoting | 78 } // namespace remoting |
| 93 | 79 |
| 94 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ | 80 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ |
| OLD | NEW |