| 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" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 private: | 54 private: |
| 55 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); | 55 DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 class MockClientConnection : public ClientConnection { | 58 class MockClientConnection : public ClientConnection { |
| 59 public: | 59 public: |
| 60 MockClientConnection(){} | 60 MockClientConnection(){} |
| 61 | 61 |
| 62 MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); | 62 MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); |
| 63 MOCK_METHOD0(SendBeginUpdateStreamMessage, void()); | 63 MOCK_METHOD0(SendBeginUpdateStreamMessage, void()); |
| 64 MOCK_METHOD2(SendUpdateStreamPacketMessage, | 64 MOCK_METHOD1(SendUpdateStreamPacketMessage, |
| 65 void(const UpdateStreamPacketHeader* header, | 65 void(scoped_refptr<media::DataBuffer> data)); |
| 66 scoped_refptr<media::DataBuffer> data)); | |
| 67 MOCK_METHOD0(SendEndUpdateStreamMessage, void()); | 66 MOCK_METHOD0(SendEndUpdateStreamMessage, void()); |
| 68 MOCK_METHOD0(GetPendingUpdateStreamMessages, int()); | 67 MOCK_METHOD0(GetPendingUpdateStreamMessages, int()); |
| 69 | 68 |
| 70 MOCK_METHOD2(OnStateChange, void(JingleChannel* channel, | 69 MOCK_METHOD2(OnStateChange, void(JingleChannel* channel, |
| 71 JingleChannel::State state)); | 70 JingleChannel::State state)); |
| 72 MOCK_METHOD2(OnPacketReceived, void(JingleChannel* channel, | 71 MOCK_METHOD2(OnPacketReceived, void(JingleChannel* channel, |
| 73 scoped_refptr<media::DataBuffer> data)); | 72 scoped_refptr<media::DataBuffer> data)); |
| 74 | 73 |
| 75 private: | 74 private: |
| 76 DISALLOW_COPY_AND_ASSIGN(MockClientConnection); | 75 DISALLOW_COPY_AND_ASSIGN(MockClientConnection); |
| 77 }; | 76 }; |
| 78 | 77 |
| 79 class MockClientConnectionEventHandler : public ClientConnection::EventHandler { | 78 class MockClientConnectionEventHandler : public ClientConnection::EventHandler { |
| 80 public: | 79 public: |
| 81 MockClientConnectionEventHandler() {} | 80 MockClientConnectionEventHandler() {} |
| 82 | 81 |
| 83 MOCK_METHOD2(HandleMessages, | 82 MOCK_METHOD2(HandleMessages, |
| 84 void(ClientConnection* viewer, ClientMessageList* messages)); | 83 void(ClientConnection* viewer, ClientMessageList* messages)); |
| 85 MOCK_METHOD1(OnConnectionOpened, void(ClientConnection* viewer)); | 84 MOCK_METHOD1(OnConnectionOpened, void(ClientConnection* viewer)); |
| 86 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); | 85 MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); |
| 87 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); | 86 MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); |
| 88 | 87 |
| 89 private: | 88 private: |
| 90 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); | 89 DISALLOW_COPY_AND_ASSIGN(MockClientConnectionEventHandler); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 } // namespace remoting | 92 } // namespace remoting |
| 94 | 93 |
| 95 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ | 94 #endif // REMOTING_HOST_MOCK_OBJECTS_H_ |
| OLD | NEW |