Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Side by Side Diff: remoting/client/plugin/chromoting_instance.cc

Issue 1681393006: Use UrlRequest in PortAllocator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 #include "remoting/base/constants.h" 39 #include "remoting/base/constants.h"
40 #include "remoting/base/util.h" 40 #include "remoting/base/util.h"
41 #include "remoting/client/chromoting_client.h" 41 #include "remoting/client/chromoting_client.h"
42 #include "remoting/client/normalizing_input_filter_cros.h" 42 #include "remoting/client/normalizing_input_filter_cros.h"
43 #include "remoting/client/normalizing_input_filter_mac.h" 43 #include "remoting/client/normalizing_input_filter_mac.h"
44 #include "remoting/client/normalizing_input_filter_win.h" 44 #include "remoting/client/normalizing_input_filter_win.h"
45 #include "remoting/client/plugin/delegating_signal_strategy.h" 45 #include "remoting/client/plugin/delegating_signal_strategy.h"
46 #include "remoting/client/plugin/pepper_audio_player.h" 46 #include "remoting/client/plugin/pepper_audio_player.h"
47 #include "remoting/client/plugin/pepper_main_thread_task_runner.h" 47 #include "remoting/client/plugin/pepper_main_thread_task_runner.h"
48 #include "remoting/client/plugin/pepper_mouse_locker.h" 48 #include "remoting/client/plugin/pepper_mouse_locker.h"
49 #include "remoting/client/plugin/pepper_port_allocator.h" 49 #include "remoting/client/plugin/pepper_port_allocator_factory.h"
50 #include "remoting/client/plugin/pepper_url_request.h"
50 #include "remoting/client/plugin/pepper_video_renderer_2d.h" 51 #include "remoting/client/plugin/pepper_video_renderer_2d.h"
51 #include "remoting/client/plugin/pepper_video_renderer_3d.h" 52 #include "remoting/client/plugin/pepper_video_renderer_3d.h"
52 #include "remoting/client/software_video_renderer.h" 53 #include "remoting/client/software_video_renderer.h"
53 #include "remoting/client/token_fetcher_proxy.h" 54 #include "remoting/client/token_fetcher_proxy.h"
54 #include "remoting/proto/control.pb.h" 55 #include "remoting/proto/control.pb.h"
55 #include "remoting/protocol/connection_to_host.h" 56 #include "remoting/protocol/connection_to_host.h"
56 #include "remoting/protocol/host_stub.h" 57 #include "remoting/protocol/host_stub.h"
57 #include "remoting/protocol/transport_context.h" 58 #include "remoting/protocol/transport_context.h"
59 #include "third_party/webrtc/base/helpers.h"
58 #include "url/gurl.h" 60 #include "url/gurl.h"
59 61
60 namespace remoting { 62 namespace remoting {
61 63
62 namespace { 64 namespace {
63 65
64 // Default DPI to assume for old clients that use notifyClientResolution. 66 // Default DPI to assume for old clients that use notifyClientResolution.
65 const int kDefaultDPI = 96; 67 const int kDefaultDPI = 96;
66 68
67 // Size of the random seed blob used to initialize RNG in libjingle. OpenSSL 69 // Size of the random seed blob used to initialize RNG in libjingle. OpenSSL
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
683 // Setup the signal strategy. 685 // Setup the signal strategy.
684 signal_strategy_.reset(new DelegatingSignalStrategy( 686 signal_strategy_.reset(new DelegatingSignalStrategy(
685 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq, 687 local_jid, base::Bind(&ChromotingInstance::SendOutgoingIq,
686 weak_factory_.GetWeakPtr()))); 688 weak_factory_.GetWeakPtr())));
687 689
688 // Create TransportContext. 690 // Create TransportContext.
689 scoped_refptr<protocol::TransportContext> transport_context( 691 scoped_refptr<protocol::TransportContext> transport_context(
690 new protocol::TransportContext( 692 new protocol::TransportContext(
691 signal_strategy_.get(), 693 signal_strategy_.get(),
692 make_scoped_ptr(new PepperPortAllocatorFactory(this)), 694 make_scoped_ptr(new PepperPortAllocatorFactory(this)),
695 make_scoped_ptr(new PepperUrlRequestFactory(this)),
693 protocol::NetworkSettings( 696 protocol::NetworkSettings(
694 protocol::NetworkSettings::NAT_TRAVERSAL_FULL), 697 protocol::NetworkSettings::NAT_TRAVERSAL_FULL),
695 protocol::TransportRole::CLIENT)); 698 protocol::TransportRole::CLIENT));
696 699
697 // Create Authenticator. 700 // Create Authenticator.
698 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher> 701 scoped_ptr<protocol::ThirdPartyClientAuthenticator::TokenFetcher>
699 token_fetcher(new TokenFetcherProxy( 702 token_fetcher(new TokenFetcherProxy(
700 base::Bind(&ChromotingInstance::FetchThirdPartyToken, 703 base::Bind(&ChromotingInstance::FetchThirdPartyToken,
701 weak_factory_.GetWeakPtr()), 704 weak_factory_.GetWeakPtr()),
702 host_public_key)); 705 host_public_key));
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 if (is_custom_counts_histogram) { 1152 if (is_custom_counts_histogram) {
1150 uma.HistogramCustomCounts(histogram_name, value, histogram_min, 1153 uma.HistogramCustomCounts(histogram_name, value, histogram_min,
1151 histogram_max, histogram_buckets); 1154 histogram_max, histogram_buckets);
1152 } else { 1155 } else {
1153 uma.HistogramCustomTimes(histogram_name, value, histogram_min, 1156 uma.HistogramCustomTimes(histogram_name, value, histogram_min,
1154 histogram_max, histogram_buckets); 1157 histogram_max, histogram_buckets);
1155 } 1158 }
1156 } 1159 }
1157 1160
1158 } // namespace remoting 1161 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/client/jni/chromoting_jni_instance.cc ('k') | remoting/client/plugin/pepper_port_allocator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698