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

Side by Side Diff: remoting/test/remote_connection_observer.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_TEST_REMOTE_CONNECTION_OBSERVER_H_
6 #define REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_
7
8 #include <string>
9
10 namespace remoting {
11 namespace test {
12
13 // Interface for a remote connection observer which will be notified when
14 // certain connection status changes occur or events from the remote host
15 // are received. Observers must not tear-down the object they have registered
16 // while in a callback. The callbacks should be used for informational
17 // purposes only.
18 class RemoteConnectionObserver {
19 public:
20 RemoteConnectionObserver() {}
21 virtual ~RemoteConnectionObserver() {}
22
23 // Called when the connection state has changed.
24 virtual void ConnectionStateChanged(
25 protocol::ConnectionToHost::State state,
26 protocol::ErrorCode error_code) {}
27
28 // Called when the connection is ready to be used, |ready| will be true once
29 // the video channel has been established.
30 virtual void ConnectionReady(bool ready) {}
31
32 // Called when a channel changes the type of route it is using.
33 virtual void RouteChanged(
34 const std::string& channel_name,
35 const protocol::TransportRoute& route) {}
36
37 // Called when the host sends its list of capabilities to the client.
38 virtual void CapabilitiesSet(const std::string& capabilities) {}
39
40 // Called when a pairing response has been set.
41 virtual void PairingResponseSet(
42 const protocol::PairingResponse& pairing_response) {}
43
44 // Called when we have received an ExtensionMessage from the host.
45 virtual void HostMessageReceived(const protocol::ExtensionMessage& message) {}
46
47 // Called when a connection has been successfully established with the host.
48 virtual void ConnectedToRemoteHost() {}
49
50 // Called when the connection with the remote host has been lost.
51 virtual void DisconnectedFromRemoteHost() {}
Sergey Ulanov 2015/03/09 06:44:41 Why do we need this given there is ConnectionState
joedow 2015/03/09 21:09:26 I had intended to use the last two methods (connec
52
53 private:
54 DISALLOW_COPY_AND_ASSIGN(RemoteConnectionObserver);
55 };
56
57 } // namespace test
58 } // namespace remoting
59
60 #endif // REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698