| 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/pepper_port_allocator.h" | 5 #include "remoting/client/plugin/pepper_port_allocator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "net/base/net_util.h" | 9 #include "net/base/net_util.h" |
| 10 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 PepperPortAllocatorSession( | 30 PepperPortAllocatorSession( |
| 31 cricket::HttpPortAllocatorBase* allocator, | 31 cricket::HttpPortAllocatorBase* allocator, |
| 32 const std::string& content_name, | 32 const std::string& content_name, |
| 33 int component, | 33 int component, |
| 34 const std::string& ice_username_fragment, | 34 const std::string& ice_username_fragment, |
| 35 const std::string& ice_password, | 35 const std::string& ice_password, |
| 36 const std::vector<rtc::SocketAddress>& stun_hosts, | 36 const std::vector<rtc::SocketAddress>& stun_hosts, |
| 37 const std::vector<std::string>& relay_hosts, | 37 const std::vector<std::string>& relay_hosts, |
| 38 const std::string& relay_token, | 38 const std::string& relay_token, |
| 39 const pp::InstanceHandle& instance); | 39 const pp::InstanceHandle& instance); |
| 40 virtual ~PepperPortAllocatorSession(); | 40 ~PepperPortAllocatorSession() override; |
| 41 | 41 |
| 42 // cricket::HttpPortAllocatorBase overrides. | 42 // cricket::HttpPortAllocatorBase overrides. |
| 43 virtual void ConfigReady(cricket::PortConfiguration* config) override; | 43 void ConfigReady(cricket::PortConfiguration* config) override; |
| 44 virtual void GetPortConfigurations() override; | 44 void GetPortConfigurations() override; |
| 45 virtual void SendSessionRequest(const std::string& host, int port) override; | 45 void SendSessionRequest(const std::string& host, int port) override; |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 void OnUrlOpened(int32_t result); | 48 void OnUrlOpened(int32_t result); |
| 49 void ReadResponseBody(); | 49 void ReadResponseBody(); |
| 50 void OnResponseBodyRead(int32_t result); | 50 void OnResponseBodyRead(int32_t result); |
| 51 | 51 |
| 52 pp::InstanceHandle instance_; | 52 pp::InstanceHandle instance_; |
| 53 | 53 |
| 54 cricket::ServerAddresses stun_hosts_; | 54 cricket::ServerAddresses stun_hosts_; |
| 55 | 55 |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 const std::string& content_name, | 241 const std::string& content_name, |
| 242 int component, | 242 int component, |
| 243 const std::string& ice_username_fragment, | 243 const std::string& ice_username_fragment, |
| 244 const std::string& ice_password) { | 244 const std::string& ice_password) { |
| 245 return new PepperPortAllocatorSession( | 245 return new PepperPortAllocatorSession( |
| 246 this, content_name, component, ice_username_fragment, ice_password, | 246 this, content_name, component, ice_username_fragment, ice_password, |
| 247 stun_hosts(), relay_hosts(), relay_token(), instance_); | 247 stun_hosts(), relay_hosts(), relay_token(), instance_); |
| 248 } | 248 } |
| 249 | 249 |
| 250 } // namespace remoting | 250 } // namespace remoting |
| OLD | NEW |