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

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

Issue 10556020: Cleaned up the reader and writer create methods to return scoped_ptr. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed unnecessary code Created 8 years, 6 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/connection_to_client.cc ('k') | remoting/protocol/video_reader.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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 DCHECK(event_callback_); 151 DCHECK(event_callback_);
152 152
153 switch (state) { 153 switch (state) {
154 case Session::INITIALIZING: 154 case Session::INITIALIZING:
155 case Session::CONNECTING: 155 case Session::CONNECTING:
156 case Session::CONNECTED: 156 case Session::CONNECTED:
157 // Don't care about these events. 157 // Don't care about these events.
158 break; 158 break;
159 159
160 case Session::AUTHENTICATED: 160 case Session::AUTHENTICATED:
161 video_reader_.reset(VideoReader::Create(session_->config())); 161 video_reader_ = VideoReader::Create(session_->config());
162 video_reader_->Init(session_.get(), video_stub_, base::Bind( 162 video_reader_->Init(session_.get(), video_stub_, base::Bind(
163 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); 163 &ConnectionToHost::OnChannelInitialized, base::Unretained(this)));
164 164
165 control_dispatcher_.reset(new ClientControlDispatcher()); 165 control_dispatcher_.reset(new ClientControlDispatcher());
166 control_dispatcher_->Init(session_.get(), base::Bind( 166 control_dispatcher_->Init(session_.get(), base::Bind(
167 &ConnectionToHost::OnChannelInitialized, base::Unretained(this))); 167 &ConnectionToHost::OnChannelInitialized, base::Unretained(this)));
168 control_dispatcher_->set_client_stub(client_stub_); 168 control_dispatcher_->set_client_stub(client_stub_);
169 control_dispatcher_->set_clipboard_stub(clipboard_stub_); 169 control_dispatcher_->set_clipboard_stub(clipboard_stub_);
170 170
171 event_dispatcher_.reset(new ClientEventDispatcher()); 171 event_dispatcher_.reset(new ClientEventDispatcher());
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 if (state != state_) { 240 if (state != state_) {
241 state_ = state; 241 state_ = state;
242 error_ = error; 242 error_ = error;
243 event_callback_->OnConnectionState(state_, error_); 243 event_callback_->OnConnectionState(state_, error_);
244 } 244 }
245 } 245 }
246 246
247 } // namespace protocol 247 } // namespace protocol
248 } // namespace remoting 248 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/connection_to_client.cc ('k') | remoting/protocol/video_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698