OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/client/jni/chromoting_jni_instance.h" | 5 #include "remoting/client/jni/chromoting_jni_instance.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "remoting/client/audio_player.h" | 9 #include "remoting/client/audio_player.h" |
10 #include "remoting/client/jni/chromoting_jni.h" | 10 #include "remoting/client/jni/chromoting_jni.h" |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 const protocol::CursorShapeInfo& shape) { | 162 const protocol::CursorShapeInfo& shape) { |
163 NOTIMPLEMENTED(); | 163 NOTIMPLEMENTED(); |
164 } | 164 } |
165 | 165 |
166 void ChromotingJniInstance::ConnectToHostOnDisplayThread() { | 166 void ChromotingJniInstance::ConnectToHostOnDisplayThread() { |
167 DCHECK(ChromotingJni::GetInstance()-> | 167 DCHECK(ChromotingJni::GetInstance()-> |
168 display_task_runner()->BelongsToCurrentThread()); | 168 display_task_runner()->BelongsToCurrentThread()); |
169 | 169 |
170 frame_consumer_ = new FrameConsumerProxy( | 170 frame_consumer_ = new FrameConsumerProxy( |
171 ChromotingJni::GetInstance()->display_task_runner()); | 171 ChromotingJni::GetInstance()->display_task_runner()); |
172 view_.reset(new JniFrameConsumer()); | 172 view_.reset(new JniFrameConsumer(ChromotingJni::GetInstance())); |
173 view_weak_factory_.reset(new base::WeakPtrFactory<JniFrameConsumer>( | 173 view_weak_factory_.reset(new base::WeakPtrFactory<JniFrameConsumer>( |
174 view_.get())); | 174 view_.get())); |
175 frame_consumer_->Attach(view_weak_factory_->GetWeakPtr()); | 175 frame_consumer_->Attach(view_weak_factory_->GetWeakPtr()); |
176 | 176 |
177 ChromotingJni::GetInstance()->network_task_runner()->PostTask( | 177 ChromotingJni::GetInstance()->network_task_runner()->PostTask( |
178 FROM_HERE, | 178 FROM_HERE, |
179 base::Bind(&ChromotingJniInstance::ConnectToHostOnNetworkThread, | 179 base::Bind(&ChromotingJniInstance::ConnectToHostOnNetworkThread, |
180 this)); | 180 this)); |
181 } | 181 } |
182 | 182 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 pairable, | 262 pairable, |
263 callback)); | 263 callback)); |
264 return; | 264 return; |
265 } | 265 } |
266 | 266 |
267 pin_callback_ = callback; | 267 pin_callback_ = callback; |
268 ChromotingJni::GetInstance()->DisplayAuthenticationPrompt(); | 268 ChromotingJni::GetInstance()->DisplayAuthenticationPrompt(); |
269 } | 269 } |
270 | 270 |
271 } // namespace remoting | 271 } // namespace remoting |
OLD | NEW |