| 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 <nacl_io/nacl_io.h> | 7 #include <nacl_io/nacl_io.h> |
| 8 #include <sys/mount.h> | 8 #include <sys/mount.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 #include "ppapi/cpp/private/uma_private.h" | 36 #include "ppapi/cpp/private/uma_private.h" |
| 37 #include "ppapi/cpp/rect.h" | 37 #include "ppapi/cpp/rect.h" |
| 38 #include "ppapi/cpp/var_array_buffer.h" | 38 #include "ppapi/cpp/var_array_buffer.h" |
| 39 #include "ppapi/cpp/var_dictionary.h" | 39 #include "ppapi/cpp/var_dictionary.h" |
| 40 #include "remoting/base/constants.h" | 40 #include "remoting/base/constants.h" |
| 41 #include "remoting/base/util.h" | 41 #include "remoting/base/util.h" |
| 42 #include "remoting/client/chromoting_client.h" | 42 #include "remoting/client/chromoting_client.h" |
| 43 #include "remoting/client/normalizing_input_filter_cros.h" | 43 #include "remoting/client/normalizing_input_filter_cros.h" |
| 44 #include "remoting/client/normalizing_input_filter_mac.h" | 44 #include "remoting/client/normalizing_input_filter_mac.h" |
| 45 #include "remoting/client/normalizing_input_filter_win.h" | 45 #include "remoting/client/normalizing_input_filter_win.h" |
| 46 #include "remoting/client/plugin/delegating_signal_strategy.h" | |
| 47 #include "remoting/client/plugin/pepper_audio_player.h" | 46 #include "remoting/client/plugin/pepper_audio_player.h" |
| 48 #include "remoting/client/plugin/pepper_main_thread_task_runner.h" | 47 #include "remoting/client/plugin/pepper_main_thread_task_runner.h" |
| 49 #include "remoting/client/plugin/pepper_mouse_locker.h" | 48 #include "remoting/client/plugin/pepper_mouse_locker.h" |
| 50 #include "remoting/client/plugin/pepper_port_allocator_factory.h" | 49 #include "remoting/client/plugin/pepper_port_allocator_factory.h" |
| 51 #include "remoting/client/plugin/pepper_url_request.h" | 50 #include "remoting/client/plugin/pepper_url_request.h" |
| 52 #include "remoting/client/plugin/pepper_video_renderer_2d.h" | 51 #include "remoting/client/plugin/pepper_video_renderer_2d.h" |
| 53 #include "remoting/client/plugin/pepper_video_renderer_3d.h" | 52 #include "remoting/client/plugin/pepper_video_renderer_3d.h" |
| 54 #include "remoting/client/software_video_renderer.h" | 53 #include "remoting/client/software_video_renderer.h" |
| 55 #include "remoting/proto/control.pb.h" | 54 #include "remoting/proto/control.pb.h" |
| 56 #include "remoting/protocol/connection_to_host.h" | 55 #include "remoting/protocol/connection_to_host.h" |
| 57 #include "remoting/protocol/host_stub.h" | 56 #include "remoting/protocol/host_stub.h" |
| 58 #include "remoting/protocol/transport_context.h" | 57 #include "remoting/protocol/transport_context.h" |
| 58 #include "remoting/signaling/delegating_signal_strategy.h" |
| 59 #include "third_party/webrtc/base/helpers.h" | 59 #include "third_party/webrtc/base/helpers.h" |
| 60 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" | 60 #include "third_party/webrtc/modules/desktop_capture/desktop_region.h" |
| 61 #include "url/gurl.h" | 61 #include "url/gurl.h" |
| 62 | 62 |
| 63 namespace remoting { | 63 namespace remoting { |
| 64 | 64 |
| 65 namespace { | 65 namespace { |
| 66 | 66 |
| 67 // Default DPI to assume for old clients that use notifyClientResolution. | 67 // Default DPI to assume for old clients that use notifyClientResolution. |
| 68 const int kDefaultDPI = 96; | 68 const int kDefaultDPI = 96; |
| (...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 664 |
| 665 if (!audio_player_) { | 665 if (!audio_player_) { |
| 666 audio_player_.reset(new PepperAudioPlayer(this)); | 666 audio_player_.reset(new PepperAudioPlayer(this)); |
| 667 } | 667 } |
| 668 | 668 |
| 669 client_.reset(new ChromotingClient(&context_, this, video_renderer_.get(), | 669 client_.reset(new ChromotingClient(&context_, this, video_renderer_.get(), |
| 670 audio_player_->GetWeakPtr())); | 670 audio_player_->GetWeakPtr())); |
| 671 | 671 |
| 672 // Setup the signal strategy. | 672 // Setup the signal strategy. |
| 673 signal_strategy_.reset(new DelegatingSignalStrategy( | 673 signal_strategy_.reset(new DelegatingSignalStrategy( |
| 674 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, | 674 local_jid, plugin_task_runner_, |
| 675 weak_factory_.GetWeakPtr()))); | 675 base::Bind(&ChromotingInstance::SendOutgoingIq, |
| 676 weak_factory_.GetWeakPtr()))); |
| 676 | 677 |
| 677 // Create TransportContext. | 678 // Create TransportContext. |
| 678 scoped_refptr<protocol::TransportContext> transport_context( | 679 scoped_refptr<protocol::TransportContext> transport_context( |
| 679 new protocol::TransportContext( | 680 new protocol::TransportContext( |
| 680 signal_strategy_.get(), | 681 signal_strategy_.get(), |
| 681 base::MakeUnique<PepperPortAllocatorFactory>(this), | 682 base::MakeUnique<PepperPortAllocatorFactory>(this), |
| 682 base::MakeUnique<PepperUrlRequestFactory>(this), | 683 base::MakeUnique<PepperUrlRequestFactory>(this), |
| 683 protocol::NetworkSettings( | 684 protocol::NetworkSettings( |
| 684 protocol::NetworkSettings::NAT_TRAVERSAL_FULL), | 685 protocol::NetworkSettings::NAT_TRAVERSAL_FULL), |
| 685 protocol::TransportRole::CLIENT)); | 686 protocol::TransportRole::CLIENT)); |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 if (is_custom_counts_histogram) { | 1127 if (is_custom_counts_histogram) { |
| 1127 uma.HistogramCustomCounts(histogram_name, value, histogram_min, | 1128 uma.HistogramCustomCounts(histogram_name, value, histogram_min, |
| 1128 histogram_max, histogram_buckets); | 1129 histogram_max, histogram_buckets); |
| 1129 } else { | 1130 } else { |
| 1130 uma.HistogramCustomTimes(histogram_name, value, histogram_min, | 1131 uma.HistogramCustomTimes(histogram_name, value, histogram_min, |
| 1131 histogram_max, histogram_buckets); | 1132 histogram_max, histogram_buckets); |
| 1132 } | 1133 } |
| 1133 } | 1134 } |
| 1134 | 1135 |
| 1135 } // namespace remoting | 1136 } // namespace remoting |
| OLD | NEW |