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

Unified Diff: ppapi/thunk/ppb_tcp_socket_thunk.cc

Issue 690903002: Remove timing limitation of SetOption invocation for PPAPI sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/thunk/ppb_tcp_socket_api.h ('k') | ppapi/thunk/ppb_udp_socket_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_tcp_socket_thunk.cc
diff --git a/ppapi/thunk/ppb_tcp_socket_thunk.cc b/ppapi/thunk/ppb_tcp_socket_thunk.cc
index 42ae702e5e395b393be900b4f122e84259192f9a..c73e593f52033ed1676fd2cfb6aebebd11fcfe8a 100644
--- a/ppapi/thunk/ppb_tcp_socket_thunk.cc
+++ b/ppapi/thunk/ppb_tcp_socket_thunk.cc
@@ -132,6 +132,19 @@ void Close(PP_Resource tcp_socket) {
enter.object()->Close();
}
+int32_t SetOption1_1(PP_Resource tcp_socket,
+ PP_TCPSocket_Option name,
+ struct PP_Var value,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_TCPSocket::SetOption1_1()";
+ EnterResource<PPB_TCPSocket_API> enter(tcp_socket, callback, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(enter.object()->SetOption1_1(name,
+ value,
+ enter.callback()));
+}
+
int32_t SetOption(PP_Resource tcp_socket,
PP_TCPSocket_Option name,
struct PP_Var value,
@@ -154,7 +167,7 @@ const PPB_TCPSocket_1_0 g_ppb_tcpsocket_thunk_1_0 = {
&Read,
&Write,
&Close,
- &SetOption
+ &SetOption1_1
};
const PPB_TCPSocket_1_1 g_ppb_tcpsocket_thunk_1_1 = {
@@ -169,6 +182,21 @@ const PPB_TCPSocket_1_1 g_ppb_tcpsocket_thunk_1_1 = {
&Listen,
&Accept,
&Close,
+ &SetOption1_1
+};
+
+const PPB_TCPSocket_1_2 g_ppb_tcpsocket_thunk_1_2 = {
+ &Create,
+ &IsTCPSocket,
+ &Bind,
+ &Connect,
+ &GetLocalAddress,
+ &GetRemoteAddress,
+ &Read,
+ &Write,
+ &Listen,
+ &Accept,
+ &Close,
&SetOption
};
@@ -182,5 +210,9 @@ const PPB_TCPSocket_1_1* GetPPB_TCPSocket_1_1_Thunk() {
return &g_ppb_tcpsocket_thunk_1_1;
}
+const PPB_TCPSocket_1_2* GetPPB_TCPSocket_1_2_Thunk() {
+ return &g_ppb_tcpsocket_thunk_1_2;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_tcp_socket_api.h ('k') | ppapi/thunk/ppb_udp_socket_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698