| OLD | NEW |
| 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 #include "remoting/protocol/jingle_session.h" | 5 #include "remoting/protocol/jingle_session.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 JingleSession::JingleSession(JingleSessionManager* session_manager) | 176 JingleSession::JingleSession(JingleSessionManager* session_manager) |
| 177 : session_manager_(session_manager), | 177 : session_manager_(session_manager), |
| 178 event_handler_(nullptr), | 178 event_handler_(nullptr), |
| 179 state_(INITIALIZING), | 179 state_(INITIALIZING), |
| 180 error_(OK), | 180 error_(OK), |
| 181 message_queue_(new OrderedMessageQueue), | 181 message_queue_(new OrderedMessageQueue), |
| 182 weak_factory_(this) {} | 182 weak_factory_(this) {} |
| 183 | 183 |
| 184 JingleSession::~JingleSession() { | 184 JingleSession::~JingleSession() { |
| 185 DCHECK(thread_checker_.CalledOnValidThread()); |
| 185 session_manager_->SessionDestroyed(this); | 186 session_manager_->SessionDestroyed(this); |
| 186 } | 187 } |
| 187 | 188 |
| 188 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { | 189 void JingleSession::SetEventHandler(Session::EventHandler* event_handler) { |
| 189 DCHECK(thread_checker_.CalledOnValidThread()); | 190 DCHECK(thread_checker_.CalledOnValidThread()); |
| 190 DCHECK(event_handler); | 191 DCHECK(event_handler); |
| 191 event_handler_ = event_handler; | 192 event_handler_ = event_handler; |
| 192 } | 193 } |
| 193 | 194 |
| 194 ErrorCode JingleSession::error() { | 195 ErrorCode JingleSession::error() { |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 authenticator_->GetNextMessage())); | 800 authenticator_->GetNextMessage())); |
| 800 SendMessage(std::move(message)); | 801 SendMessage(std::move(message)); |
| 801 } | 802 } |
| 802 | 803 |
| 803 std::string JingleSession::GetNextOutgoingId() { | 804 std::string JingleSession::GetNextOutgoingId() { |
| 804 return outgoing_id_prefix_ + "_" + base::IntToString(++next_outgoing_id_); | 805 return outgoing_id_prefix_ + "_" + base::IntToString(++next_outgoing_id_); |
| 805 } | 806 } |
| 806 | 807 |
| 807 } // namespace protocol | 808 } // namespace protocol |
| 808 } // namespace remoting | 809 } // namespace remoting |
| OLD | NEW |