diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 00:59:59 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-29 00:59:59 +0000 |
commit | 9cabbaf0ad00354836ce389013af0f5e7121d087 (patch) | |
tree | 595f48d98d27abb7304b7ba609ed58851af0c2b3 /remoting/protocol | |
parent | 134fb6e884b7d3c02ec54d5a55c4034a88ef7b7d (diff) | |
download | chromium_src-9cabbaf0ad00354836ce389013af0f5e7121d087.zip chromium_src-9cabbaf0ad00354836ce389013af0f5e7121d087.tar.gz chromium_src-9cabbaf0ad00354836ce389013af0f5e7121d087.tar.bz2 |
Chromoting host to respond to BeginSessionRequest
ChromotingHost to respond to BeginSessionRequest, pretending login was
successul. This allows chromoting client to send login command and proceed.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6144002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol')
-rw-r--r-- | remoting/protocol/jingle_connection_to_host.cc | 2 | ||||
-rw-r--r-- | remoting/protocol/mock_objects.h | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/remoting/protocol/jingle_connection_to_host.cc b/remoting/protocol/jingle_connection_to_host.cc index f680012..6d4b256 100644 --- a/remoting/protocol/jingle_connection_to_host.cc +++ b/remoting/protocol/jingle_connection_to_host.cc @@ -11,6 +11,7 @@ #include "remoting/proto/auth.pb.h" #include "remoting/protocol/client_message_dispatcher.h" #include "remoting/protocol/client_stub.h" +#include "remoting/protocol/host_control_sender.h" #include "remoting/protocol/input_sender.h" #include "remoting/protocol/jingle_session_manager.h" #include "remoting/protocol/video_reader.h" @@ -164,6 +165,7 @@ void JingleConnectionToHost::OnSessionStateChange( video_reader_.reset(VideoReader::Create(session_->config())); video_reader_->Init(session_, video_stub_); input_stub_.reset(new InputSender(session_->event_channel())); + host_stub_.reset(new HostControlSender(session_->control_channel())); dispatcher_->Initialize(session_.get(), client_stub_); event_callback_->OnConnectionOpened(this); break; diff --git a/remoting/protocol/mock_objects.h b/remoting/protocol/mock_objects.h index 99826c2..c1535d1 100644 --- a/remoting/protocol/mock_objects.h +++ b/remoting/protocol/mock_objects.h @@ -70,6 +70,19 @@ class MockHostStub : public HostStub { DISALLOW_COPY_AND_ASSIGN(MockHostStub); }; +class MockClientStub : public ClientStub { + public: + MockClientStub() {} + + MOCK_METHOD2(NotifyResolution, void(const NotifyResolutionRequest* msg, + Task* done)); + MOCK_METHOD2(BeginSessionResponse, void(const LocalLoginStatus* msg, + Task* done)); + + private: + DISALLOW_COPY_AND_ASSIGN(MockClientStub); +}; + class MockVideoStub : public VideoStub { public: MockVideoStub() {} |