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

Unified Diff: ppapi/proxy/udp_socket_resource_base.h

Issue 632113003: Pepper: Allow plugins to call PPB_UDP_Socket::SendTo multiple times. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a separate test for parallel SendTo. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: ppapi/proxy/udp_socket_resource_base.h
diff --git a/ppapi/proxy/udp_socket_resource_base.h b/ppapi/proxy/udp_socket_resource_base.h
index 1ed9bbfef521a127f31aaab3b1871ab000718d8c..a18950bc446b35803a2de783dee44a7d94c837da 100644
--- a/ppapi/proxy/udp_socket_resource_base.h
+++ b/ppapi/proxy/udp_socket_resource_base.h
@@ -45,6 +45,9 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
// The maximum number of received packets that we allow instances of this
// class to buffer.
static const size_t kPluginReceiveBufferSlots;
+ // The maximum number of buffers that we allow instances of this class to be
+ // sending before we block the plugin.
+ static const size_t kPluginSendBufferSlots;
protected:
UDPSocketResourceBase(Connection connection,
@@ -111,7 +114,6 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
scoped_refptr<TrackedCallback> bind_callback_;
scoped_refptr<TrackedCallback> recvfrom_callback_;
- scoped_refptr<TrackedCallback> sendto_callback_;
char* read_buffer_;
int32_t bytes_to_read_;
@@ -122,6 +124,8 @@ class PPAPI_PROXY_EXPORT UDPSocketResourceBase: public PluginResource {
std::queue<RecvBuffer> recv_buffers_;
+ std::queue<scoped_refptr<TrackedCallback>> sendto_callbacks_;
+
DISALLOW_COPY_AND_ASSIGN(UDPSocketResourceBase);
};

Powered by Google App Engine
This is Rietveld 408576698