| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_JINGLE_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 6 #define REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/task.h" | 9 #include "base/task.h" |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 // stanza. | 73 // stanza. |
| 74 bool InitializeConfigFromDescription( | 74 bool InitializeConfigFromDescription( |
| 75 const cricket::SessionDescription* description); | 75 const cricket::SessionDescription* description); |
| 76 | 76 |
| 77 // Used for Session.SignalState sigslot. | 77 // Used for Session.SignalState sigslot. |
| 78 void OnSessionState(cricket::BaseSession* session, | 78 void OnSessionState(cricket::BaseSession* session, |
| 79 cricket::BaseSession::State state); | 79 cricket::BaseSession::State state); |
| 80 // Used for Session.SignalError sigslot. | 80 // Used for Session.SignalError sigslot. |
| 81 void OnSessionError(cricket::BaseSession* session, | 81 void OnSessionError(cricket::BaseSession* session, |
| 82 cricket::BaseSession::Error error); | 82 cricket::BaseSession::Error error); |
| 83 // Used for Session.SignalReceivedTerminateReason sigslot. |
| 84 void OnTerminateReason(cricket::Session* session, const std::string& reason); |
| 83 | 85 |
| 84 void OnInitiate(); | 86 void OnInitiate(); |
| 85 void OnAccept(); | 87 void OnAccept(); |
| 86 void OnTerminate(); | 88 void OnTerminate(); |
| 87 | 89 |
| 88 // Notifies upper layer about incoming connection and | 90 // Notifies upper layer about incoming connection and |
| 89 // accepts/rejects connection. | 91 // accepts/rejects connection. |
| 90 void AcceptConnection(); | 92 void AcceptConnection(); |
| 91 | 93 |
| 92 void AddChannelConnector(const std::string& name, | 94 void AddChannelConnector(const std::string& name, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 | 130 |
| 129 SessionConfig config_; | 131 SessionConfig config_; |
| 130 bool config_set_; | 132 bool config_set_; |
| 131 | 133 |
| 132 // These data members are only set on the receiving side. | 134 // These data members are only set on the receiving side. |
| 133 scoped_ptr<const CandidateSessionConfig> candidate_config_; | 135 scoped_ptr<const CandidateSessionConfig> candidate_config_; |
| 134 | 136 |
| 135 // Channels that are currently being connected. | 137 // Channels that are currently being connected. |
| 136 ChannelConnectorsMap channel_connectors_; | 138 ChannelConnectorsMap channel_connectors_; |
| 137 | 139 |
| 140 // Termination reason. Needs to be stored because |
| 141 // SignalReceivedTerminateReason handler is not allowed to destroy |
| 142 // the object. |
| 143 std::string terminate_reason_; |
| 144 |
| 138 ScopedRunnableMethodFactory<JingleSession> task_factory_; | 145 ScopedRunnableMethodFactory<JingleSession> task_factory_; |
| 139 | 146 |
| 140 DISALLOW_COPY_AND_ASSIGN(JingleSession); | 147 DISALLOW_COPY_AND_ASSIGN(JingleSession); |
| 141 }; | 148 }; |
| 142 | 149 |
| 143 } // namespace protocol | 150 } // namespace protocol |
| 144 | 151 |
| 145 } // namespace remoting | 152 } // namespace remoting |
| 146 | 153 |
| 147 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ | 154 #endif // REMOTING_PROTOCOL_JINGLE_SESSION_H_ |
| OLD | NEW |