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

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

Issue 1545743002: Move ownership of Transport out of Session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_not_pass_client
Patch Set: Created 4 years, 11 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
« no previous file with comments | « remoting/protocol/ice_transport.cc ('k') | remoting/protocol/ice_transport_channel.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_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_ 5 #ifndef REMOTING_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_
6 #define REMOTING_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_ 6 #define REMOTING_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 19 matching lines...) Expand all
30 30
31 class IceTransportChannel : public sigslot::has_slots<> { 31 class IceTransportChannel : public sigslot::has_slots<> {
32 public: 32 public:
33 class Delegate { 33 class Delegate {
34 public: 34 public:
35 Delegate() {}; 35 Delegate() {};
36 virtual ~Delegate() {}; 36 virtual ~Delegate() {};
37 37
38 // Called to pass ICE credentials to the session. Used only for STANDARD 38 // Called to pass ICE credentials to the session. Used only for STANDARD
39 // version of ICE, see SetIceVersion(). 39 // version of ICE, see SetIceVersion().
40 virtual void OnTransportIceCredentials(IceTransportChannel* transport, 40 virtual void OnChannelIceCredentials(IceTransportChannel* transport,
41 const std::string& ufrag, 41 const std::string& ufrag,
42 const std::string& password) = 0; 42 const std::string& password) = 0;
43 43
44 // Called when the transport generates a new candidate that needs 44 // Called when the transport generates a new candidate that needs
45 // to be passed to the AddRemoteCandidate() method on the remote 45 // to be passed to the AddRemoteCandidate() method on the remote
46 // end of the connection. 46 // end of the connection.
47 virtual void OnTransportCandidate(IceTransportChannel* transport, 47 virtual void OnChannelCandidate(IceTransportChannel* transport,
48 const cricket::Candidate& candidate) = 0; 48 const cricket::Candidate& candidate) = 0;
49 49
50 // Called when transport route changes. Can be called even before 50 // Called when transport route changes. Can be called even before
51 // the transport is connected. 51 // the transport is connected.
52 virtual void OnTransportRouteChange(IceTransportChannel* transport, 52 virtual void OnChannelRouteChange(IceTransportChannel* transport,
53 const TransportRoute& route) = 0; 53 const TransportRoute& route) = 0;
54 54
55 // Called when when the transport has failed to connect or reconnect. 55 // Called when when the channel has failed to connect or reconnect.
56 virtual void OnTransportFailed(IceTransportChannel* transport) = 0; 56 virtual void OnChannelFailed(IceTransportChannel* transport) = 0;
57 57
58 // Called when the transport is about to be deleted. 58 // Called when the channel is about to be deleted.
59 virtual void OnTransportDeleted(IceTransportChannel* transport) = 0; 59 virtual void OnChannelDeleted(IceTransportChannel* transport) = 0;
60 }; 60 };
61 61
62 typedef base::Callback<void(scoped_ptr<P2PDatagramSocket>)> ConnectedCallback; 62 typedef base::Callback<void(scoped_ptr<P2PDatagramSocket>)> ConnectedCallback;
63 63
64 explicit IceTransportChannel( 64 explicit IceTransportChannel(
65 scoped_refptr<TransportContext> transport_context); 65 scoped_refptr<TransportContext> transport_context);
66 ~IceTransportChannel() override; 66 ~IceTransportChannel() override;
67 67
68 // Connects the channel and calls the |callback| after that. 68 // Connects the channel and calls the |callback| after that.
69 void Connect(const std::string& name, 69 void Connect(const std::string& name,
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 base::WeakPtrFactory<IceTransportChannel> weak_factory_; 128 base::WeakPtrFactory<IceTransportChannel> weak_factory_;
129 129
130 DISALLOW_COPY_AND_ASSIGN(IceTransportChannel); 130 DISALLOW_COPY_AND_ASSIGN(IceTransportChannel);
131 }; 131 };
132 132
133 } // namespace protocol 133 } // namespace protocol
134 } // namespace remoting 134 } // namespace remoting
135 135
136 #endif // REMOTING_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_ 136 #endif // REMOTING_PROTOCOL_ICE_TRANSPORT_CHANNEL_H_
OLDNEW
« no previous file with comments | « remoting/protocol/ice_transport.cc ('k') | remoting/protocol/ice_transport_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698