Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Unified Diff: remoting/protocol/protocol_mock_objects.h

Issue 10538091: [Chromoting] Make ChromotingHost's dependency on libjingle injected, instead of hard-coded. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for Windows. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/protocol/protocol_mock_objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/protocol_mock_objects.h
diff --git a/remoting/protocol/protocol_mock_objects.h b/remoting/protocol/protocol_mock_objects.h
index 2ebbf5895d32ac6db9d9d72d3b244e40d853dedb..21ab938a07a650e739ee034150afd87f00cbd45b 100644
--- a/remoting/protocol/protocol_mock_objects.h
+++ b/remoting/protocol/protocol_mock_objects.h
@@ -10,6 +10,7 @@
#include "net/base/ip_endpoint.h"
#include "remoting/proto/internal.pb.h"
#include "remoting/proto/video.pb.h"
+#include "remoting/protocol/authenticator.h"
#include "remoting/protocol/client_stub.h"
#include "remoting/protocol/clipboard_stub.h"
#include "remoting/protocol/connection_to_client.h"
@@ -17,6 +18,7 @@
#include "remoting/protocol/host_stub.h"
#include "remoting/protocol/input_stub.h"
#include "remoting/protocol/session.h"
+#include "remoting/protocol/session_manager.h"
#include "remoting/protocol/transport.h"
#include "remoting/protocol/video_stub.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -176,6 +178,39 @@ class MockSession : public Session {
DISALLOW_COPY_AND_ASSIGN(MockSession);
};
+class MockSessionManager : public SessionManager {
+ public:
+ MockSessionManager();
+ virtual ~MockSessionManager();
+
+ MOCK_METHOD2(Init, void(SignalStrategy*, Listener*));
+ MOCK_METHOD4(ConnectPtr, Session*(
+ const std::string&,
+ Authenticator*,
+ CandidateSessionConfig*,
+ const Session::StateChangeCallback&));
+ MOCK_METHOD0(Close, void());
+ MOCK_METHOD1(set_authenticator_factory_ptr, void(AuthenticatorFactory*));
+ virtual scoped_ptr<Session> Connect(
+ const std::string& host_jid,
+ scoped_ptr<Authenticator> authenticator,
+ scoped_ptr<CandidateSessionConfig> config,
+ const Session::StateChangeCallback& state_change_callback) {
+ return scoped_ptr<Session>(ConnectPtr(
+ host_jid,
+ authenticator.get(),
+ config.get(),
+ state_change_callback));
+ };
+ virtual void set_authenticator_factory(
+ scoped_ptr<AuthenticatorFactory> authenticator_factory) {
+ set_authenticator_factory_ptr(authenticator_factory.release());
+ };
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockSessionManager);
+};
+
} // namespace protocol
} // namespace remoting
« no previous file with comments | « remoting/host/simple_host_process.cc ('k') | remoting/protocol/protocol_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698