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

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: Fix rebase weirdness. Created 5 years, 11 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
« no previous file with comments | « ppapi/cpp/udp_socket.h ('k') | ppapi/proxy/udp_socket_resource_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d21579b3cfc0b9b6fcf954d9f9179fb37a4d2e7a..9e75ae73d95580aaf07f8c478942d0e99b561cfc 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,
@@ -117,7 +120,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_;
@@ -128,6 +130,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);
};
« no previous file with comments | « ppapi/cpp/udp_socket.h ('k') | ppapi/proxy/udp_socket_resource_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698