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

Side by Side Diff: remoting/protocol/connection_to_host.h

Issue 1521883006: Add TransportContext class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PROTOCOL_CONNECTION_TO_HOST_H_ 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 6 #define REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "remoting/protocol/errors.h" 13 #include "remoting/protocol/errors.h"
14 14
15 namespace remoting { 15 namespace remoting {
16 16
17 class SignalStrategy; 17 class SignalStrategy;
18 18
19 namespace protocol { 19 namespace protocol {
20 20
21 class AudioStub; 21 class AudioStub;
22 class Authenticator; 22 class Authenticator;
23 class CandidateSessionConfig; 23 class CandidateSessionConfig;
24 class ClientStub; 24 class ClientStub;
25 class ClipboardStub; 25 class ClipboardStub;
26 class ExtensionMessage; 26 class ExtensionMessage;
27 class HostStub; 27 class HostStub;
28 class InputStub; 28 class InputStub;
29 class SessionConfig; 29 class SessionConfig;
30 class TransportFactory; 30 class TransportContext;
31 struct TransportRoute; 31 struct TransportRoute;
32 class VideoStub; 32 class VideoStub;
33 33
34 class ConnectionToHost { 34 class ConnectionToHost {
35 public: 35 public:
36 // The UI implementations maintain corresponding definitions of this 36 // The UI implementations maintain corresponding definitions of this
37 // enumeration in client_session.js and 37 // enumeration in client_session.js and
38 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. Be sure to 38 // android/java/src/org/chromium/chromoting/jni/JniInterface.java. Be sure to
39 // update these locations if you make any changes to the ordering. 39 // update these locations if you make any changes to the ordering.
40 enum State { 40 enum State {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual void set_audio_stub(AudioStub* audio_stub) = 0; 85 virtual void set_audio_stub(AudioStub* audio_stub) = 0;
86 86
87 // Initiates a connection to the host specified by |host_jid|. 87 // Initiates a connection to the host specified by |host_jid|.
88 // |signal_strategy| is used to signal to the host, and must outlive the 88 // |signal_strategy| is used to signal to the host, and must outlive the
89 // connection. Data channels will be negotiated over |transport_factory|. 89 // connection. Data channels will be negotiated over |transport_factory|.
90 // |authenticator| will be used to authenticate the session and data channels. 90 // |authenticator| will be used to authenticate the session and data channels.
91 // |event_callback| will be notified of changes in the state of the connection 91 // |event_callback| will be notified of changes in the state of the connection
92 // and must outlive the ConnectionToHost. 92 // and must outlive the ConnectionToHost.
93 // Caller must set stubs (see below) before calling Connect. 93 // Caller must set stubs (see below) before calling Connect.
94 virtual void Connect(SignalStrategy* signal_strategy, 94 virtual void Connect(SignalStrategy* signal_strategy,
95 scoped_ptr<TransportFactory> transport_factory, 95 scoped_refptr<TransportContext> transport_context,
96 scoped_ptr<Authenticator> authenticator, 96 scoped_ptr<Authenticator> authenticator,
97 const std::string& host_jid, 97 const std::string& host_jid,
98 HostEventCallback* event_callback) = 0; 98 HostEventCallback* event_callback) = 0;
99 99
100 // Returns the session configuration that was negotiated with the host. 100 // Returns the session configuration that was negotiated with the host.
101 virtual const SessionConfig& config() = 0; 101 virtual const SessionConfig& config() = 0;
102 102
103 // Stubs for sending data to the host. 103 // Stubs for sending data to the host.
104 virtual ClipboardStub* clipboard_forwarder() = 0; 104 virtual ClipboardStub* clipboard_forwarder() = 0;
105 virtual HostStub* host_stub() = 0; 105 virtual HostStub* host_stub() = 0;
106 virtual InputStub* input_stub() = 0; 106 virtual InputStub* input_stub() = 0;
107 107
108 // Return the current state of ConnectionToHost. 108 // Return the current state of ConnectionToHost.
109 virtual State state() const = 0; 109 virtual State state() const = 0;
110 }; 110 };
111 111
112 } // namespace protocol 112 } // namespace protocol
113 } // namespace remoting 113 } // namespace remoting
114 114
115 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_ 115 #endif // REMOTING_PROTOCOL_CONNECTION_TO_HOST_H_
OLDNEW
« no previous file with comments | « remoting/protocol/chromium_port_allocator_factory.cc ('k') | remoting/protocol/connection_to_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698