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

Unified Diff: remoting/client/chromoting_client.h

Issue 976233003: Adding the base ChromotingInstance implementation and unittests. This class will be used by the ap… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing a unit test name Created 5 years, 9 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
Index: remoting/client/chromoting_client.h
diff --git a/remoting/client/chromoting_client.h b/remoting/client/chromoting_client.h
index 94c8f4ea9083d703b68c956a4caee1082b16b291..e11a6d5ae95cdc9af25aa1aa0ff54f42ae64f4c9 100644
--- a/remoting/client/chromoting_client.h
+++ b/remoting/client/chromoting_client.h
@@ -51,8 +51,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 +66,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 +106,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_;

Powered by Google App Engine
This is Rietveld 408576698