summaryrefslogtreecommitdiffstats
path: root/remoting/host/mock_objects.h
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 22:46:00 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-06 22:46:00 +0000
commitc3af26f3314bf48f478cec8128b5c15cc3f98940 (patch)
tree0d3d0802a3a9b8e05487626f90c7dbf0dcecdea9 /remoting/host/mock_objects.h
parent5bcab699da1cedb4fc666c9f5d0099574a27c2fe (diff)
downloadchromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.zip
chromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.tar.gz
chromium_src-c3af26f3314bf48f478cec8128b5c15cc3f98940.tar.bz2
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
Diffstat (limited to 'remoting/host/mock_objects.h')
-rw-r--r--remoting/host/mock_objects.h18
1 files changed, 8 insertions, 10 deletions
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<media::DataBuffer> 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<media::DataBuffer> 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));