| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include <nacl_io/nacl_io.h> | 10 #include <nacl_io/nacl_io.h> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "remoting/client/plugin/delegating_signal_strategy.h" | 43 #include "remoting/client/plugin/delegating_signal_strategy.h" |
| 44 #include "remoting/client/plugin/pepper_audio_player.h" | 44 #include "remoting/client/plugin/pepper_audio_player.h" |
| 45 #include "remoting/client/plugin/pepper_mouse_locker.h" | 45 #include "remoting/client/plugin/pepper_mouse_locker.h" |
| 46 #include "remoting/client/plugin/pepper_port_allocator.h" | 46 #include "remoting/client/plugin/pepper_port_allocator.h" |
| 47 #include "remoting/client/plugin/pepper_video_renderer_2d.h" | 47 #include "remoting/client/plugin/pepper_video_renderer_2d.h" |
| 48 #include "remoting/client/plugin/pepper_video_renderer_3d.h" | 48 #include "remoting/client/plugin/pepper_video_renderer_3d.h" |
| 49 #include "remoting/client/software_video_renderer.h" | 49 #include "remoting/client/software_video_renderer.h" |
| 50 #include "remoting/client/token_fetcher_proxy.h" | 50 #include "remoting/client/token_fetcher_proxy.h" |
| 51 #include "remoting/protocol/connection_to_host.h" | 51 #include "remoting/protocol/connection_to_host.h" |
| 52 #include "remoting/protocol/host_stub.h" | 52 #include "remoting/protocol/host_stub.h" |
| 53 #include "remoting/protocol/ice_transport_factory.h" | 53 #include "remoting/protocol/libjingle_transport_factory.h" |
| 54 #include "url/gurl.h" | 54 #include "url/gurl.h" |
| 55 | 55 |
| 56 namespace remoting { | 56 namespace remoting { |
| 57 | 57 |
| 58 namespace { | 58 namespace { |
| 59 | 59 |
| 60 // Default DPI to assume for old clients that use notifyClientResolution. | 60 // Default DPI to assume for old clients that use notifyClientResolution. |
| 61 const int kDefaultDPI = 96; | 61 const int kDefaultDPI = 96; |
| 62 | 62 |
| 63 // Size of the random seed blob used to initialize RNG in libjingle. OpenSSL | 63 // Size of the random seed blob used to initialize RNG in libjingle. OpenSSL |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 682 touch_input_scaler_.set_input_size(size); | 682 touch_input_scaler_.set_input_size(size); |
| 683 } | 683 } |
| 684 | 684 |
| 685 // Setup the signal strategy. | 685 // Setup the signal strategy. |
| 686 signal_strategy_.reset(new DelegatingSignalStrategy( | 686 signal_strategy_.reset(new DelegatingSignalStrategy( |
| 687 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, | 687 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, |
| 688 weak_factory_.GetWeakPtr()))); | 688 weak_factory_.GetWeakPtr()))); |
| 689 | 689 |
| 690 // Create TransportFactory. | 690 // Create TransportFactory. |
| 691 scoped_ptr<protocol::TransportFactory> transport_factory( | 691 scoped_ptr<protocol::TransportFactory> transport_factory( |
| 692 new protocol::IceTransportFactory( | 692 new protocol::LibjingleTransportFactory( |
| 693 signal_strategy_.get(), PepperPortAllocator::Create(this).Pass(), | 693 signal_strategy_.get(), PepperPortAllocator::Create(this).Pass(), |
| 694 protocol::NetworkSettings( | 694 protocol::NetworkSettings( |
| 695 protocol::NetworkSettings::NAT_TRAVERSAL_FULL), | 695 protocol::NetworkSettings::NAT_TRAVERSAL_FULL), |
| 696 protocol::TransportRole::CLIENT)); | 696 protocol::TransportRole::CLIENT)); |
| 697 | 697 |
| 698 // Create Authenticator. | 698 // Create Authenticator. |
| 699 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> | 699 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> |
| 700 token_fetcher(new TokenFetcherProxy( | 700 token_fetcher(new TokenFetcherProxy( |
| 701 base::Bind(&ChromotingInstance::FetchThirdPartyToken, | 701 base::Bind(&ChromotingInstance::FetchThirdPartyToken, |
| 702 weak_factory_.GetWeakPtr()), | 702 weak_factory_.GetWeakPtr()), |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1145 if (is_custom_counts_histogram) { | 1145 if (is_custom_counts_histogram) { |
| 1146 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1146 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
| 1147 histogram_max, histogram_buckets); | 1147 histogram_max, histogram_buckets); |
| 1148 } else { | 1148 } else { |
| 1149 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1149 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
| 1150 histogram_max, histogram_buckets); | 1150 histogram_max, histogram_buckets); |
| 1151 } | 1151 } |
| 1152 } | 1152 } |
| 1153 | 1153 |
| 1154 } // namespace remoting | 1154 } // namespace remoting |
| OLD | NEW |