From c3af26f3314bf48f478cec8128b5c15cc3f98940 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Wed, 6 Oct 2010 22:46:00 +0000 Subject: Use new Chromotocol code in host andclient. 1. ProtocolDecoder renamed to MessagesDecoder and moved to remoting/protocol. 2. base/protocol_util.[h|cc] split into base/util.[h|cc] and protocol/util.[h|cc]. 3. Added StreamReader and StreamWriter classes for events and video channels. 4. Client and host changed to use the new protocol code. BUG=None TEST=Unittests Review URL: http://codereview.chromium.org/3595012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61723 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/mock_objects.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'remoting/host/mock_objects.h') diff --git a/remoting/host/mock_objects.h b/remoting/host/mock_objects.h index 9e6b631..64dcc55 100644 --- a/remoting/host/mock_objects.h +++ b/remoting/host/mock_objects.h @@ -6,10 +6,10 @@ #define REMOTING_HOST_MOCK_OBJECTS_H_ #include "media/base/data_buffer.h" -#include "remoting/base/protocol_decoder.h" #include "remoting/host/capturer.h" #include "remoting/host/client_connection.h" #include "remoting/host/event_executor.h" +#include "remoting/protocol/messages_decoder.h" #include "testing/gmock/include/gmock/gmock.h" namespace remoting { @@ -36,7 +36,7 @@ class MockEventExecutor : public EventExecutor { public: MockEventExecutor(Capturer* capturer) : EventExecutor(capturer) {} - MOCK_METHOD1(HandleInputEvents, void(ClientMessageList* messages)); + MOCK_METHOD1(HandleInputEvent, void(ChromotingClientMessage* messages)); private: DISALLOW_COPY_AND_ASSIGN(MockEventExecutor); @@ -46,17 +46,14 @@ class MockClientConnection : public ClientConnection { public: MockClientConnection(){} + MOCK_METHOD1(Init, void(ChromotingConnection* connection)); MOCK_METHOD2(SendInitClientMessage, void(int width, int height)); MOCK_METHOD0(SendBeginUpdateStreamMessage, void()); MOCK_METHOD1(SendUpdateStreamPacketMessage, - void(scoped_refptr data)); + void(const ChromotingHostMessage& message)); MOCK_METHOD0(SendEndUpdateStreamMessage, void()); MOCK_METHOD0(GetPendingUpdateStreamMessages, int()); - - MOCK_METHOD2(OnStateChange, void(JingleChannel* channel, - JingleChannel::State state)); - MOCK_METHOD2(OnPacketReceived, void(JingleChannel* channel, - scoped_refptr data)); + MOCK_METHOD0(Disconnect, void()); private: DISALLOW_COPY_AND_ASSIGN(MockClientConnection); @@ -66,8 +63,9 @@ class MockClientConnectionEventHandler : public ClientConnection::EventHandler { public: MockClientConnectionEventHandler() {} - MOCK_METHOD2(HandleMessages, - void(ClientConnection* viewer, ClientMessageList* messages)); + MOCK_METHOD2(HandleMessage, + void(ClientConnection* viewer, + ChromotingClientMessage* message)); MOCK_METHOD1(OnConnectionOpened, void(ClientConnection* viewer)); MOCK_METHOD1(OnConnectionClosed, void(ClientConnection* viewer)); MOCK_METHOD1(OnConnectionFailed, void(ClientConnection* viewer)); -- cgit v1.1