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

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

Issue 10823323: Add support for multiplexed channels in remoting::protocol::Session interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_session.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) 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/connection_to_host.h" 5 #include "remoting/protocol/connection_to_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "remoting/base/constants.h" 10 #include "remoting/base/constants.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 // Don't care about these events. 164 // Don't care about these events.
165 break; 165 break;
166 166
167 case Session::AUTHENTICATED: 167 case Session::AUTHENTICATED:
168 video_reader_ = VideoReader::Create(session_->config()); 168 video_reader_ = VideoReader::Create(session_->config());
169 video_reader_->Init(session_.get(), video_stub_, base::Bind( 169 video_reader_->Init(session_.get(), video_stub_, base::Bind(
170 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); 170 &ConnectionToHost::OnChannelInitialized, base::Unretained(this)));
171 171
172 audio_reader_ = AudioReader::Create(session_->config()); 172 audio_reader_ = AudioReader::Create(session_->config());
173 if (audio_reader_.get()) { 173 if (audio_reader_.get()) {
174 audio_reader_->Init(session_.get(), audio_stub_, base::Bind( 174 audio_reader_->Init(session_.get(), base::Bind(
175 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); 175 &ConnectionToHost::OnChannelInitialized, base::Unretained(this)));
176 audio_reader_->set_audio_stub(audio_stub_);
176 } 177 }
177 178
178 control_dispatcher_.reset(new ClientControlDispatcher()); 179 control_dispatcher_.reset(new ClientControlDispatcher());
179 control_dispatcher_->Init(session_.get(), base::Bind( 180 control_dispatcher_->Init(session_.get(), base::Bind(
180 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); 181 &ConnectionToHost::OnChannelInitialized, base::Unretained(this)));
181 control_dispatcher_->set_client_stub(client_stub_); 182 control_dispatcher_->set_client_stub(client_stub_);
182 control_dispatcher_->set_clipboard_stub(clipboard_stub_); 183 control_dispatcher_->set_clipboard_stub(clipboard_stub_);
183 184
184 event_dispatcher_.reset(new ClientEventDispatcher()); 185 event_dispatcher_.reset(new ClientEventDispatcher());
185 event_dispatcher_->Init(session_.get(), base::Bind( 186 event_dispatcher_->Init(session_.get(), base::Bind(
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 281
281 if (state != state_) { 282 if (state != state_) {
282 state_ = state; 283 state_ = state;
283 error_ = error; 284 error_ = error;
284 event_callback_->OnConnectionState(state_, error_); 285 event_callback_->OnConnectionState(state_, error_);
285 } 286 }
286 } 287 }
287 288
288 } // namespace protocol 289 } // namespace protocol
289 } // namespace remoting 290 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/channel_multiplexer_unittest.cc ('k') | remoting/protocol/fake_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698