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

Side by Side Diff: remoting/test/test_chromoting_client.h

Issue 1520323007: Simplify ConnectionToHost interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sm_cleanup
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « remoting/protocol/fake_connection_to_host.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ 5 #ifndef REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ 6 #define REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 protocol::InputStub* input_stub() { return chromoting_client_->input_stub(); } 60 protocol::InputStub* input_stub() { return chromoting_client_->input_stub(); }
61 61
62 // Registers an observer which will be notfied when remote connection events 62 // Registers an observer which will be notfied when remote connection events
63 // occur. Registered Observers must not tear-down this object on receipt of 63 // occur. Registered Observers must not tear-down this object on receipt of
64 // these callbacks. The callbacks should be used for informational purposes. 64 // these callbacks. The callbacks should be used for informational purposes.
65 void AddRemoteConnectionObserver(RemoteConnectionObserver* observer); 65 void AddRemoteConnectionObserver(RemoteConnectionObserver* observer);
66 66
67 // Unregisters an observerer from notifications for remote connection events. 67 // Unregisters an observerer from notifications for remote connection events.
68 void RemoveRemoteConnectionObserver(RemoteConnectionObserver* observer); 68 void RemoveRemoteConnectionObserver(RemoteConnectionObserver* observer);
69 69
70 // Used to set a fake/mock connection object for TestChromotingClient tests. 70 // Used to set a fake/mock dependencies for tests.
71 void SetSignalStrategyForTests(scoped_ptr<SignalStrategy> signal_strategy);
71 void SetConnectionToHostForTests( 72 void SetConnectionToHostForTests(
72 scoped_ptr<protocol::ConnectionToHost> connection_to_host); 73 scoped_ptr<protocol::ConnectionToHost> connection_to_host);
73 74
74 private: 75 private:
75 // ClientUserInterface interface. 76 // ClientUserInterface interface.
76 void OnConnectionState(protocol::ConnectionToHost::State state, 77 void OnConnectionState(protocol::ConnectionToHost::State state,
77 protocol::ErrorCode error_code) override; 78 protocol::ErrorCode error_code) override;
78 void OnConnectionReady(bool ready) override; 79 void OnConnectionReady(bool ready) override;
79 void OnRouteChanged(const std::string& channel_name, 80 void OnRouteChanged(const std::string& channel_name,
80 const protocol::TransportRoute& route) override; 81 const protocol::TransportRoute& route) override;
(...skipping 26 matching lines...) Expand all
107 108
108 // Creates and manages the connection to the remote host. 109 // Creates and manages the connection to the remote host.
109 scoped_ptr<ChromotingClient> chromoting_client_; 110 scoped_ptr<ChromotingClient> chromoting_client_;
110 111
111 // Manages the threads and task runners for |chromoting_client_|. 112 // Manages the threads and task runners for |chromoting_client_|.
112 scoped_ptr<ClientContext> client_context_; 113 scoped_ptr<ClientContext> client_context_;
113 114
114 // Processes video packets from the host. 115 // Processes video packets from the host.
115 scoped_ptr<VideoRenderer> video_renderer_; 116 scoped_ptr<VideoRenderer> video_renderer_;
116 117
117 // Used to establish an XMPP connection with the google talk service. 118 // SignalStrategy used for connection signaling.
118 scoped_ptr<XmppSignalStrategy> signal_strategy_; 119 scoped_ptr<SignalStrategy> signal_strategy_;
119 120
120 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient); 121 DISALLOW_COPY_AND_ASSIGN(TestChromotingClient);
121 }; 122 };
122 123
123 } // namespace test 124 } // namespace test
124 } // namespace remoting 125 } // namespace remoting
125 126
126 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_ 127 #endif // REMOTING_TEST_TEST_CHROMOTING_CLIENT_H_
OLDNEW
« no previous file with comments | « remoting/protocol/fake_connection_to_host.cc ('k') | remoting/test/test_chromoting_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698