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

Unified Diff: ppapi/thunk/ppb_udp_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_udp_socket_api.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/thunk/ppb_udp_socket_thunk.cc
diff --git a/ppapi/thunk/ppb_udp_socket_thunk.cc b/ppapi/thunk/ppb_udp_socket_thunk.cc
index 7391526f682b431595927d5f1b30e066df752ee0..7eca736923fff5c463b6be4212ea6e856bccdeaa 100644
--- a/ppapi/thunk/ppb_udp_socket_thunk.cc
+++ b/ppapi/thunk/ppb_udp_socket_thunk.cc
@@ -83,6 +83,18 @@ void Close(PP_Resource udp_socket) {
enter.object()->Close();
}
+int32_t SetOption1_0(PP_Resource udp_socket,
+ PP_UDPSocket_Option name,
+ struct PP_Var value,
+ struct PP_CompletionCallback callback) {
+ VLOG(4) << "PPB_UDPSocket::SetOption1_0()";
+ EnterResource<PPB_UDPSocket_API> enter(udp_socket, callback, true);
+ if (enter.failed())
+ return enter.retval();
+ return enter.SetResult(
+ enter.object()->SetOption1_0(name, value, enter.callback()));
+}
+
int32_t SetOption(PP_Resource udp_socket,
PP_UDPSocket_Option name,
struct PP_Var value,
@@ -95,14 +107,27 @@ int32_t SetOption(PP_Resource udp_socket,
enter.object()->SetOption(name, value, enter.callback()));
}
-const PPB_UDPSocket_1_0 g_ppb_udpsocket_thunk_1_0 = {&Create,
- &IsUDPSocket,
- &Bind,
- &GetBoundAddress,
- &RecvFrom,
- &SendTo,
- &Close,
- &SetOption};
+const PPB_UDPSocket_1_0 g_ppb_udpsocket_thunk_1_0 = {
+ &Create,
+ &IsUDPSocket,
+ &Bind,
+ &GetBoundAddress,
+ &RecvFrom,
+ &SendTo,
+ &Close,
+ &SetOption1_0
+};
+
+const PPB_UDPSocket_1_1 g_ppb_udpsocket_thunk_1_1 = {
+ &Create,
+ &IsUDPSocket,
+ &Bind,
+ &GetBoundAddress,
+ &RecvFrom,
+ &SendTo,
+ &Close,
+ &SetOption
+};
} // namespace
@@ -110,5 +135,9 @@ PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_0* GetPPB_UDPSocket_1_0_Thunk() {
return &g_ppb_udpsocket_thunk_1_0;
}
+PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_1* GetPPB_UDPSocket_1_1_Thunk() {
+ return &g_ppb_udpsocket_thunk_1_1;
+}
+
} // namespace thunk
} // namespace ppapi
« no previous file with comments | « ppapi/thunk/ppb_udp_socket_api.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698