OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // From ppb_udp_socket.idl modified Fri Mar 13 17:49:57 2015. | 5 // From ppb_udp_socket.idl modified Tue Jul 7 16:53:06 2015. |
6 | 6 |
7 #include "ppapi/c/pp_completion_callback.h" | 7 #include "ppapi/c/pp_completion_callback.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/ppb_udp_socket.h" | 9 #include "ppapi/c/ppb_udp_socket.h" |
10 #include "ppapi/shared_impl/tracked_callback.h" | 10 #include "ppapi/shared_impl/tracked_callback.h" |
11 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
12 #include "ppapi/thunk/ppapi_thunk_export.h" | 12 #include "ppapi/thunk/ppapi_thunk_export.h" |
13 #include "ppapi/thunk/ppb_udp_socket_api.h" | 13 #include "ppapi/thunk/ppb_udp_socket_api.h" |
14 | 14 |
15 namespace ppapi { | 15 namespace ppapi { |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 int32_t LeaveGroup(PP_Resource udp_socket, | 132 int32_t LeaveGroup(PP_Resource udp_socket, |
133 PP_Resource group, | 133 PP_Resource group, |
134 struct PP_CompletionCallback callback) { | 134 struct PP_CompletionCallback callback) { |
135 VLOG(4) << "PPB_UDPSocket::LeaveGroup()"; | 135 VLOG(4) << "PPB_UDPSocket::LeaveGroup()"; |
136 EnterResource<PPB_UDPSocket_API> enter(udp_socket, callback, true); | 136 EnterResource<PPB_UDPSocket_API> enter(udp_socket, callback, true); |
137 if (enter.failed()) | 137 if (enter.failed()) |
138 return enter.retval(); | 138 return enter.retval(); |
139 return enter.SetResult(enter.object()->LeaveGroup(group, enter.callback())); | 139 return enter.SetResult(enter.object()->LeaveGroup(group, enter.callback())); |
140 } | 140 } |
141 | 141 |
142 const PPB_UDPSocket_1_0 g_ppb_udpsocket_thunk_1_0 = {&Create, | 142 const PPB_UDPSocket_1_0 g_ppb_udpsocket_thunk_1_0 = { |
143 &IsUDPSocket, | 143 &Create, &IsUDPSocket, &Bind, &GetBoundAddress, |
144 &Bind, | 144 &RecvFrom, &SendTo, &Close, &SetOption_1_0}; |
145 &GetBoundAddress, | |
146 &RecvFrom, | |
147 &SendTo, | |
148 &Close, | |
149 &SetOption_1_0}; | |
150 | 145 |
151 const PPB_UDPSocket_1_1 g_ppb_udpsocket_thunk_1_1 = {&Create, | 146 const PPB_UDPSocket_1_1 g_ppb_udpsocket_thunk_1_1 = { |
152 &IsUDPSocket, | 147 &Create, &IsUDPSocket, &Bind, &GetBoundAddress, |
153 &Bind, | 148 &RecvFrom, &SendTo, &Close, &SetOption_1_1}; |
154 &GetBoundAddress, | |
155 &RecvFrom, | |
156 &SendTo, | |
157 &Close, | |
158 &SetOption_1_1}; | |
159 | 149 |
160 const PPB_UDPSocket_1_2 g_ppb_udpsocket_thunk_1_2 = {&Create, | 150 const PPB_UDPSocket_1_2 g_ppb_udpsocket_thunk_1_2 = { |
161 &IsUDPSocket, | 151 &Create, &IsUDPSocket, &Bind, &GetBoundAddress, &RecvFrom, |
162 &Bind, | 152 &SendTo, &Close, &SetOption, &JoinGroup, &LeaveGroup}; |
163 &GetBoundAddress, | |
164 &RecvFrom, | |
165 &SendTo, | |
166 &Close, | |
167 &SetOption, | |
168 &JoinGroup, | |
169 &LeaveGroup}; | |
170 | 153 |
171 } // namespace | 154 } // namespace |
172 | 155 |
173 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_0* GetPPB_UDPSocket_1_0_Thunk() { | 156 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_0* GetPPB_UDPSocket_1_0_Thunk() { |
174 return &g_ppb_udpsocket_thunk_1_0; | 157 return &g_ppb_udpsocket_thunk_1_0; |
175 } | 158 } |
176 | 159 |
177 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_1* GetPPB_UDPSocket_1_1_Thunk() { | 160 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_1* GetPPB_UDPSocket_1_1_Thunk() { |
178 return &g_ppb_udpsocket_thunk_1_1; | 161 return &g_ppb_udpsocket_thunk_1_1; |
179 } | 162 } |
180 | 163 |
181 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_2* GetPPB_UDPSocket_1_2_Thunk() { | 164 PPAPI_THUNK_EXPORT const PPB_UDPSocket_1_2* GetPPB_UDPSocket_1_2_Thunk() { |
182 return &g_ppb_udpsocket_thunk_1_2; | 165 return &g_ppb_udpsocket_thunk_1_2; |
183 } | 166 } |
184 | 167 |
185 } // namespace thunk | 168 } // namespace thunk |
186 } // namespace ppapi | 169 } // namespace ppapi |
OLD | NEW |