| 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/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 signal_strategy_.reset(new DelegatingSignalStrategy( | 746 signal_strategy_.reset(new DelegatingSignalStrategy( |
| 747 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, | 747 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, |
| 748 weak_factory_.GetWeakPtr()))); | 748 weak_factory_.GetWeakPtr()))); |
| 749 | 749 |
| 750 // Create TransportFactory. | 750 // Create TransportFactory. |
| 751 scoped_ptr<protocol::TransportFactory> transport_factory( | 751 scoped_ptr<protocol::TransportFactory> transport_factory( |
| 752 new protocol::LibjingleTransportFactory( | 752 new protocol::LibjingleTransportFactory( |
| 753 signal_strategy_.get(), | 753 signal_strategy_.get(), |
| 754 PepperPortAllocator::Create(this) | 754 PepperPortAllocator::Create(this) |
| 755 .PassAs<cricket::HttpPortAllocatorBase>(), | 755 .PassAs<cricket::HttpPortAllocatorBase>(), |
| 756 NetworkSettings(NetworkSettings::NAT_TRAVERSAL_FULL))); | 756 protocol::NetworkSettings( |
| 757 protocol::NetworkSettings::NAT_TRAVERSAL_FULL))); |
| 757 | 758 |
| 758 // Create Authenticator. | 759 // Create Authenticator. |
| 759 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> | 760 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
| 760 token_fetcher(new TokenFetcherProxy( | 761 token_fetcher(new TokenFetcherProxy( |
| 761 base::Bind(&ChromotingInstance::FetchThirdPartyToken, | 762 base::Bind(&ChromotingInstance::FetchThirdPartyToken, |
| 762 weak_factory_.GetWeakPtr()), | 763 weak_factory_.GetWeakPtr()), |
| 763 host_public_key)); | 764 host_public_key)); |
| 764 scoped_ptr<protocol::Authenticator> authenticator( | 765 scoped_ptr<protocol::Authenticator> authenticator( |
| 765 new protocol::NegotiatingClientAuthenticator( | 766 new protocol::NegotiatingClientAuthenticator( |
| 766 client_pairing_id, client_paired_secret, authentication_tag, | 767 client_pairing_id, client_paired_secret, authentication_tag, |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1231 void* data_ptr = array_buffer.Map(); | 1232 void* data_ptr = array_buffer.Map(); |
| 1232 memcpy(data_ptr, buffer, buffer_size); | 1233 memcpy(data_ptr, buffer, buffer_size); |
| 1233 array_buffer.Unmap(); | 1234 array_buffer.Unmap(); |
| 1234 pp::VarDictionary data_dictionary; | 1235 pp::VarDictionary data_dictionary; |
| 1235 data_dictionary.Set(pp::Var("buffer"), array_buffer); | 1236 data_dictionary.Set(pp::Var("buffer"), array_buffer); |
| 1236 data_dictionary.Set(pp::Var("keyframe"), keyframe); | 1237 data_dictionary.Set(pp::Var("keyframe"), keyframe); |
| 1237 PostChromotingMessage("mediaSourceData", data_dictionary); | 1238 PostChromotingMessage("mediaSourceData", data_dictionary); |
| 1238 } | 1239 } |
| 1239 | 1240 |
| 1240 } // namespace remoting | 1241 } // namespace remoting |
| OLD | NEW |