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 "remoting/host/capturer.h" | 8 #include "remoting/host/capturer.h" |
9 #include "remoting/host/client_connection.h" | 9 #include "remoting/host/client_connection.h" |
10 #include "remoting/host/event_executor.h" | 10 #include "remoting/host/event_executor.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 MOCK_METHOD1(HandleInputEvent, void(ChromotingClientMessage* messages)); | 38 MOCK_METHOD1(HandleInputEvent, void(ChromotingClientMessage* messages)); |
39 | 39 |
40 private: | 40 private: |
41 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); | 41 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); |
42 }; | 42 }; |
43 | 43 |
44 class MockClientConnection : public ClientConnection { | 44 class MockClientConnection : public ClientConnection { |
45 public: | 45 public: |
46 MockClientConnection(){} | 46 MockClientConnection(){} |
47 | 47 |
48 MOCK_METHOD1(Init, void(ChromotingConnection* connection)); | 48 MOCK_METHOD1(Init, void(ChromotocolConnection* connection)); |
49 MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); | 49 MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); |
50 MOCK_METHOD1(SendVideoPacket, void(const VideoPacket& packet)); | 50 MOCK_METHOD1(SendVideoPacket, void(const VideoPacket& packet)); |
51 MOCK_METHOD0(GetPendingUpdateStreamMessages, int()); | 51 MOCK_METHOD0(GetPendingUpdateStreamMessages, int()); |
52 MOCK_METHOD0(Disconnect, void()); | 52 MOCK_METHOD0(Disconnect, void()); |
53 | 53 |
54 private: | 54 private: |
55 DISALLOW_COPY_AND_ASSIGN(MockClientConnection); | 55 DISALLOW_COPY_AND_ASSIGN(MockClientConnection); |
56 }; | 56 }; |
57 | 57 |
58 class MockClientConnectionEventHandler : public ClientConnection::EventHandler { | 58 class MockClientConnectionEventHandler : public ClientConnection::EventHandler { |
59 public: | 59 public: |
60 MockClientConnectionEventHandler() {} | 60 MockClientConnectionEventHandler() {} |
61 | 61 |
62 MOCK_METHOD2(HandleMessage, | 62 MOCK_METHOD2(HandleMessage, |
63 void(ClientConnection* viewer, | 63 void(ClientConnection* viewer, |
64 ChromotingClientMessage* message)); | 64 ChromotingClientMessage* message)); |
65 MOCK_METHOD1(OnConnectionOpened, void(ClientConnection* viewer)); | 65 MOCK_METHOD1(OnConnectionOpened, void(ClientConnection* viewer)); |
66 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); | 66 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); |
67 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); | 67 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); |
68 | 68 |
69 private: | 69 private: |
70 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); | 70 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace remoting | 73 } // namespace remoting |
74 | 74 |
75 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ | 75 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ |
OLD | NEW |