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

Side by Side Diff: remoting/client/jingle_host_connection.cc

Issue 4017002: HostMessageDispatcher to parse control messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged again Created 10 years, 1 month 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/client/jingle_host_connection.h ('k') | remoting/host/chromoting_host.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 (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 "base/callback.h" 5 #include "base/callback.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "remoting/base/constants.h" 7 #include "remoting/base/constants.h"
8 // TODO(hclam): Remove this header once MessageDispatcher is used.
9 #include "remoting/base/multiple_array_input_stream.h"
8 #include "remoting/client/client_config.h" 10 #include "remoting/client/client_config.h"
9 #include "remoting/client/jingle_host_connection.h" 11 #include "remoting/client/jingle_host_connection.h"
10 #include "remoting/jingle_glue/jingle_thread.h" 12 #include "remoting/jingle_glue/jingle_thread.h"
11 #include "remoting/protocol/jingle_chromotocol_server.h" 13 #include "remoting/protocol/jingle_chromotocol_server.h"
12 #include "remoting/protocol/util.h" 14 #include "remoting/protocol/util.h"
13 15
14 namespace remoting { 16 namespace remoting {
15 17
16 JingleHostConnection::JingleHostConnection(ClientContext* context) 18 JingleHostConnection::JingleHostConnection(ClientContext* context)
17 : context_(context), 19 : context_(context),
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 event_callback_->OnConnectionFailed(this); 144 event_callback_->OnConnectionFailed(this);
143 break; 145 break;
144 146
145 case ChromotocolConnection::CLOSED: 147 case ChromotocolConnection::CLOSED:
146 event_callback_->OnConnectionClosed(this); 148 event_callback_->OnConnectionClosed(this);
147 break; 149 break;
148 150
149 case ChromotocolConnection::CONNECTED: 151 case ChromotocolConnection::CONNECTED:
150 // Initialize reader and writer. 152 // Initialize reader and writer.
151 event_writer_.Init(connection_->event_channel()); 153 event_writer_.Init(connection_->event_channel());
152 video_reader_.Init( 154 video_reader_.Init<ChromotingHostMessage>(
153 connection_->video_channel(), 155 connection_->video_channel(),
154 NewCallback(this, &JingleHostConnection::OnVideoMessage)); 156 NewCallback(this, &JingleHostConnection::OnVideoMessage));
155 event_callback_->OnConnectionOpened(this); 157 event_callback_->OnConnectionOpened(this);
156 break; 158 break;
157 159
158 default: 160 default:
159 // Ignore the other states by default. 161 // Ignore the other states by default.
160 break; 162 break;
161 } 163 }
162 } 164 }
163 165
164 MessageLoop* JingleHostConnection::message_loop() { 166 MessageLoop* JingleHostConnection::message_loop() {
165 return context_->jingle_thread()->message_loop(); 167 return context_->jingle_thread()->message_loop();
166 } 168 }
167 169
168 } // namespace remoting 170 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jingle_host_connection.h ('k') | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698