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

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: Review comments, document INPROGRESS error in IDL. 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 5400f6be99554d3dec8f57d430d1912954fd8c54..6e2fe220f022d51f685e59e8358afc377c28fa9a 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