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

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 Release Build Break 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 #include "remoting/proto/control.pb.h"
11 #include "remoting/protocol/connection_to_host.h"
12 #include "remoting/protocol/errors.h"
13 #include "remoting/protocol/transport.h"
14
15 namespace remoting {
16 namespace test {
17
18 // Interface for a remote connection observer which will be notified when
19 // certain connection status changes occur or events from the remote host
20 // are received. Observers must not tear-down the object they have registered
21 // while in a callback. The callbacks should be used for informational
22 // purposes only.
23 class RemoteConnectionObserver {
24 public:
25 RemoteConnectionObserver() {}
26 virtual ~RemoteConnectionObserver() {}
27
28 // Called when the connection state has changed.
29 virtual void ConnectionStateChanged(protocol::ConnectionToHost::State state,
30 protocol::ErrorCode error_code) {}
31
32 // Called when the connection is ready to be used, |ready| will be true once
33 // the video channel has been established.
34 virtual void ConnectionReady(bool ready) {}
35
36 // Called when a channel changes the type of route it is using.
37 virtual void RouteChanged(const std::string& channel_name,
38 const protocol::TransportRoute& route) {}
39
40 // Called when the host sends its list of capabilities to the client.
41 virtual void CapabilitiesSet(const std::string& capabilities) {}
42
43 // Called when a pairing response has been set.
44 virtual void PairingResponseSet(
45 const protocol::PairingResponse& pairing_response) {}
46
47 // Called when we have received an ExtensionMessage from the host.
48 virtual void HostMessageReceived(const protocol::ExtensionMessage& message) {}
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(RemoteConnectionObserver);
52 };
53
54 } // namespace test
55 } // namespace remoting
56
57 #endif // REMOTING_TEST_REMOTE_CONNECTION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698