OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |