OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/jingle_glue/iq_request.h" | 5 #include "remoting/jingle_glue/iq_request.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 request_->BecomeDefaultHandler(); | 301 request_->BecomeDefaultHandler(); |
302 } | 302 } |
303 | 303 |
304 void SessionStartRequest::OnResponse(const buzz::XmlElement* response) { | 304 void SessionStartRequest::OnResponse(const buzz::XmlElement* response) { |
305 // TODO(ajwong): Techncially, when SessionManager sends IQ packets, it | 305 // TODO(ajwong): Techncially, when SessionManager sends IQ packets, it |
306 // actually expects a response in SessionSendTask(). However, if you look in | 306 // actually expects a response in SessionSendTask(). However, if you look in |
307 // SessionManager::OnIncomingResponse(), it does nothing with the response. | 307 // SessionManager::OnIncomingResponse(), it does nothing with the response. |
308 // Also, if no response is found, we are supposed to call | 308 // Also, if no response is found, we are supposed to call |
309 // SessionManager::OnFailedSend(). | 309 // SessionManager::OnFailedSend(). |
310 // | 310 // |
311 // However, for right now, we just ignore those, and only propogate | 311 // However, for right now, we just ignore those, and only propagate |
312 // messages outside of the request/reply framework to | 312 // messages outside of the request/reply framework to |
313 // SessionManager::OnIncomingMessage. | 313 // SessionManager::OnIncomingMessage. |
314 | 314 |
315 if (session_manager_->IsSessionMessage(response)) { | 315 if (session_manager_->IsSessionMessage(response)) { |
316 session_manager_->OnIncomingMessage(response); | 316 session_manager_->OnIncomingMessage(response); |
317 } | 317 } |
318 } | 318 } |
319 | 319 |
320 void SessionStartRequest::OnOutgoingMessage( | 320 void SessionStartRequest::OnOutgoingMessage( |
321 cricket::SessionManager* session_manager, | 321 cricket::SessionManager* session_manager, |
322 const buzz::XmlElement* stanza) { | 322 const buzz::XmlElement* stanza) { |
323 // TODO(ajwong): Are we just supposed to not use |session_manager|? | 323 // TODO(ajwong): Are we just supposed to not use |session_manager|? |
324 DCHECK_EQ(session_manager, session_manager_); | 324 DCHECK_EQ(session_manager, session_manager_); |
325 scoped_ptr<buzz::XmlElement> stanza_copy(new buzz::XmlElement(*stanza)); | 325 scoped_ptr<buzz::XmlElement> stanza_copy(new buzz::XmlElement(*stanza)); |
326 request_->SendRawIq(stanza_copy.get()); | 326 request_->SendRawIq(stanza_copy.get()); |
327 } | 327 } |
328 | 328 |
329 } // namespace remoting | 329 } // namespace remoting |
OLD | NEW |