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

Side by Side Diff: remoting/protocol/jingle_connection_to_host.cc

Issue 6277003: Simplified MessageReader and MessageDecoder classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 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 | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/host_message_dispatcher.cc ('k') | remoting/protocol/message_decoder.h » ('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 (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/protocol/jingle_connection_to_host.h" 5 #include "remoting/protocol/jingle_connection_to_host.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "remoting/base/constants.h" 9 #include "remoting/base/constants.h"
10 #include "remoting/jingle_glue/jingle_thread.h" 10 #include "remoting/jingle_glue/jingle_thread.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void JingleConnectionToHost::Disconnect() { 52 void JingleConnectionToHost::Disconnect() {
53 if (MessageLoop::current() != message_loop()) { 53 if (MessageLoop::current() != message_loop()) {
54 message_loop()->PostTask( 54 message_loop()->PostTask(
55 FROM_HERE, NewRunnableMethod(this, 55 FROM_HERE, NewRunnableMethod(this,
56 &JingleConnectionToHost::Disconnect)); 56 &JingleConnectionToHost::Disconnect));
57 return; 57 return;
58 } 58 }
59 59
60 control_reader_.Close();
61 video_reader_->Close();
62
63 if (session_) { 60 if (session_) {
64 session_->Close( 61 session_->Close(
65 NewRunnableMethod(this, &JingleConnectionToHost::OnDisconnected)); 62 NewRunnableMethod(this, &JingleConnectionToHost::OnDisconnected));
66 } else { 63 } else {
67 OnDisconnected(); 64 OnDisconnected();
68 } 65 }
69 } 66 }
70 67
71 void JingleConnectionToHost::InitSession() { 68 void JingleConnectionToHost::InitSession() {
72 DCHECK_EQ(message_loop(), MessageLoop::current()); 69 DCHECK_EQ(message_loop(), MessageLoop::current());
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 break; 173 break;
177 } 174 }
178 } 175 }
179 176
180 MessageLoop* JingleConnectionToHost::message_loop() { 177 MessageLoop* JingleConnectionToHost::message_loop() {
181 return thread_->message_loop(); 178 return thread_->message_loop();
182 } 179 }
183 180
184 } // namespace protocol 181 } // namespace protocol
185 } // namespace remoting 182 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/host_message_dispatcher.cc ('k') | remoting/protocol/message_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698