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/client/chromoting_client.h" | 5 #include "remoting/client/chromoting_client.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "remoting/client/audio_decode_scheduler.h" | 8 #include "remoting/client/audio_decode_scheduler.h" |
9 #include "remoting/client/audio_player.h" | 9 #include "remoting/client/audio_player.h" |
10 #include "remoting/client/client_context.h" | 10 #include "remoting/client/client_context.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 ChromotingClient::~ChromotingClient() { | 47 ChromotingClient::~ChromotingClient() { |
48 } | 48 } |
49 | 49 |
50 void ChromotingClient::Start( | 50 void ChromotingClient::Start( |
51 scoped_refptr<XmppProxy> xmpp_proxy, | 51 scoped_refptr<XmppProxy> xmpp_proxy, |
52 scoped_ptr<protocol::TransportFactory> transport_factory) { | 52 scoped_ptr<protocol::TransportFactory> transport_factory) { |
53 DCHECK(task_runner_->BelongsToCurrentThread()); | 53 DCHECK(task_runner_->BelongsToCurrentThread()); |
54 | 54 |
55 scoped_ptr<protocol::Authenticator> authenticator( | 55 scoped_ptr<protocol::Authenticator> authenticator( |
56 protocol::NegotiatingAuthenticator::CreateForClient( | 56 protocol::NegotiatingAuthenticator::CreateForClient( |
57 config_.authentication_tag, | 57 config_.authentication_tag, config_.shared_secret, |
58 config_.shared_secret, config_.authentication_methods)); | 58 user_interface_->GetPinFetcherFactory(), |
| 59 config_.authentication_methods)); |
59 | 60 |
60 // Create a WeakPtr to ourself for to use for all posted tasks. | 61 // Create a WeakPtr to ourself for to use for all posted tasks. |
61 weak_ptr_ = weak_factory_.GetWeakPtr(); | 62 weak_ptr_ = weak_factory_.GetWeakPtr(); |
62 | 63 |
63 connection_->Connect(xmpp_proxy, config_.local_jid, config_.host_jid, | 64 connection_->Connect(xmpp_proxy, config_.local_jid, config_.host_jid, |
64 config_.host_public_key, transport_factory.Pass(), | 65 config_.host_public_key, transport_factory.Pass(), |
65 authenticator.Pass(), this, this, this, | 66 authenticator.Pass(), this, this, this, |
66 rectangle_decoder_, | 67 rectangle_decoder_, |
67 audio_decode_scheduler_.get()); | 68 audio_decode_scheduler_.get()); |
68 } | 69 } |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void ChromotingClient::Initialize() { | 117 void ChromotingClient::Initialize() { |
117 DCHECK(task_runner_->BelongsToCurrentThread()); | 118 DCHECK(task_runner_->BelongsToCurrentThread()); |
118 | 119 |
119 // Initialize the decoder. | 120 // Initialize the decoder. |
120 rectangle_decoder_->Initialize(connection_->config()); | 121 rectangle_decoder_->Initialize(connection_->config()); |
121 if (connection_->config().is_audio_enabled()) | 122 if (connection_->config().is_audio_enabled()) |
122 audio_decode_scheduler_->Initialize(connection_->config()); | 123 audio_decode_scheduler_->Initialize(connection_->config()); |
123 } | 124 } |
124 | 125 |
125 } // namespace remoting | 126 } // namespace remoting |
OLD | NEW |