diff options
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/p2p_transport.cc | 3 | ||||
-rw-r--r-- | webkit/glue/p2p_transport.h | 5 | ||||
-rw-r--r-- | webkit/plugins/ppapi/ppb_transport_impl.cc | 7 |
3 files changed, 14 insertions, 1 deletions
diff --git a/webkit/glue/p2p_transport.cc b/webkit/glue/p2p_transport.cc index f79c21f..1dcb1d5 100644 --- a/webkit/glue/p2p_transport.cc +++ b/webkit/glue/p2p_transport.cc @@ -13,7 +13,8 @@ P2PTransport::Config::Config() tcp_receive_window(0), tcp_send_window(0), tcp_no_delay(false), - tcp_ack_delay_ms(0) { + tcp_ack_delay_ms(0), + disable_tcp_transport(false) { } P2PTransport::Config::~Config() { diff --git a/webkit/glue/p2p_transport.h b/webkit/glue/p2p_transport.h index 8e77d28..b60101a 100644 --- a/webkit/glue/p2p_transport.h +++ b/webkit/glue/p2p_transport.h @@ -8,6 +8,8 @@ #include <string> #include <vector> +#include "base/basictypes.h" + namespace net { class Socket; } // namespace net @@ -79,6 +81,9 @@ class P2PTransport { // TCP ACK delay. int tcp_ack_delay_ms; + + // Disable TCP-based transport when set to true. + bool disable_tcp_transport; }; virtual ~P2PTransport() {} diff --git a/webkit/plugins/ppapi/ppb_transport_impl.cc b/webkit/plugins/ppapi/ppb_transport_impl.cc index 1fd89d8..efed706 100644 --- a/webkit/plugins/ppapi/ppb_transport_impl.cc +++ b/webkit/plugins/ppapi/ppb_transport_impl.cc @@ -223,6 +223,13 @@ int32_t PPB_Transport_Impl::SetProperty(PP_TransportProperty property, break; } + case PP_TRANSPORTPROPERTY_DISABLE_TCP_TRANSPORT: { + if (value.type != PP_VARTYPE_BOOL) + return PP_ERROR_BADARGUMENT; + config_.disable_tcp_transport = PP_ToBool(value.value.as_bool); + break; + } + default: return PP_ERROR_BADARGUMENT; } |