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

Side by Side Diff: remoting/protocol/fake_connection_to_host.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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
7
8 #include <string>
9
10 #include "remoting/protocol/connection_to_host.h"
11
12 namespace remoting {
13 namespace test {
14
15 class FakeConnectionToHost : public remoting::protocol::ConnectionToHost {
16 public:
17 FakeConnectionToHost();
18 ~FakeConnectionToHost() override;
19
20 // ConnectionToHost interface.
21 void OnSessionStateChange(protocol::Session::State state) override;
22 void OnVideoChannelStatus(bool active) override;
23
24 // GMock does not work with methods which have scoped_ptr params so we define
25 // a method which uses raw pointers instead.
26 void ConnectPtr(
27 SignalStrategy* signal_strategy,
28 protocol::TransportFactory* transport_factory,
29 protocol::Authenticator* authenticator,
30 const std::string& host_jid,
31 HostEventCallback* event_callback);
32
33 void set_session_state_change_error_code(protocol::ErrorCode error) {
34 session_state_change_error_code_ = error;
35 }
36
37 private:
38 // ErrorCode set when OnSessionStateChange() is called with a FAILED state.
39 protocol::ErrorCode session_state_change_error_code_;
40
41 DISALLOW_COPY_AND_ASSIGN(FakeConnectionToHost);
42 };
43
44 } // namespace test
45 } // namespace remoting
46
47 #endif // REMOTING_PROTOCOL_FAKE_CONNECTION_TO_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698