| Index: remoting/client/chromoting_client.h
|
| diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
|
| index 94c8f4ea9083d703b68c956a4caee1082b16b291..b9b7f071ddf60bc37fc04b693fab2220d1c34bda 100644
|
| --- a/remoting/client/chromoting_client.h
|
| +++ b/remoting/client/chromoting_client.h
|
| @@ -15,6 +15,7 @@
|
| #include "remoting/protocol/client_stub.h"
|
| #include "remoting/protocol/clipboard_stub.h"
|
| #include "remoting/protocol/connection_to_host.h"
|
| +#include "remoting/protocol/connection_to_host_impl.h"
|
| #include "remoting/protocol/input_stub.h"
|
| #include "remoting/protocol/video_stub.h"
|
|
|
| @@ -51,8 +52,11 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
|
|
|
| ~ChromotingClient() override;
|
|
|
| + // Used to set fake/mock objects for tests which use the ChromotingClient.
|
| void SetProtocolConfigForTests(
|
| scoped_ptr<protocol::CandidateSessionConfig> config);
|
| + void SetConnectionToHostForTests(
|
| + scoped_ptr<protocol::ConnectionToHost> connection_to_host);
|
|
|
| // Start the client. Must be called on the main thread. |signal_strategy|
|
| // must outlive the client.
|
| @@ -63,14 +67,14 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
|
| const std::string& capabilities);
|
|
|
| protocol::ConnectionToHost::State connection_state() const {
|
| - return connection_.state();
|
| + return connection_->state();
|
| }
|
|
|
| protocol::ClipboardStub* clipboard_forwarder() {
|
| - return connection_.clipboard_forwarder();
|
| + return connection_->clipboard_forwarder();
|
| }
|
| - protocol::HostStub* host_stub() { return connection_.host_stub(); }
|
| - protocol::InputStub* input_stub() { return connection_.input_stub(); }
|
| + protocol::HostStub* host_stub() { return connection_->host_stub(); }
|
| + protocol::InputStub* input_stub() { return connection_->input_stub(); }
|
|
|
| // ClientStub implementation.
|
| void SetCapabilities(const protocol::Capabilities& capabilities) override;
|
| @@ -103,7 +107,7 @@ class ChromotingClient : public protocol::ConnectionToHost::HostEventCallback,
|
| ClientUserInterface* user_interface_;
|
| VideoRenderer* video_renderer_;
|
|
|
| - protocol::ConnectionToHost connection_;
|
| + scoped_ptr<protocol::ConnectionToHost> connection_;
|
|
|
| scoped_ptr<AudioDecodeScheduler> audio_decode_scheduler_;
|
|
|
|
|