[email protected] | 9bf4d67b | 2013-06-25 17:12:01 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
[email protected] | b3fcc41 | 2014-01-16 04:34:37 | [diff] [blame] | 5 | // From ppb_network_proxy.idl modified Tue Aug 20 08:13:36 2013. |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 6 | |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 7 | #include "ppapi/c/pp_completion_callback.h" |
8 | #include "ppapi/c/pp_errors.h" | ||||
[email protected] | 9bf4d67b | 2013-06-25 17:12:01 | [diff] [blame] | 9 | #include "ppapi/c/ppb_network_proxy.h" |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 10 | #include "ppapi/shared_impl/tracked_callback.h" |
11 | #include "ppapi/thunk/enter.h" | ||||
[email protected] | b3fcc41 | 2014-01-16 04:34:37 | [diff] [blame] | 12 | #include "ppapi/thunk/ppapi_thunk_export.h" |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 13 | #include "ppapi/thunk/ppb_network_proxy_api.h" |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 14 | |
15 | namespace ppapi { | ||||
16 | namespace thunk { | ||||
17 | |||||
18 | namespace { | ||||
19 | |||||
20 | int32_t GetProxyForURL(PP_Instance instance, | ||||
21 | struct PP_Var url, | ||||
22 | struct PP_Var* proxy_string, | ||||
23 | struct PP_CompletionCallback callback) { | ||||
[email protected] | 9bf4d67b | 2013-06-25 17:12:01 | [diff] [blame] | 24 | VLOG(4) << "PPB_NetworkProxy::GetProxyForURL()"; |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 25 | EnterInstanceAPI<PPB_NetworkProxy_API> enter(instance, callback); |
26 | if (enter.failed()) | ||||
27 | return enter.retval(); | ||||
28 | return enter.SetResult(enter.functions()->GetProxyForURL(instance, | ||||
29 | url, | ||||
30 | proxy_string, | ||||
31 | enter.callback())); | ||||
32 | } | ||||
33 | |||||
[email protected] | 9bf4d67b | 2013-06-25 17:12:01 | [diff] [blame] | 34 | const PPB_NetworkProxy_1_0 g_ppb_networkproxy_thunk_1_0 = { |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 35 | &GetProxyForURL |
36 | }; | ||||
37 | |||||
38 | } // namespace | ||||
39 | |||||
[email protected] | b3fcc41 | 2014-01-16 04:34:37 | [diff] [blame] | 40 | PPAPI_THUNK_EXPORT const PPB_NetworkProxy_1_0* |
41 | GetPPB_NetworkProxy_1_0_Thunk() { | ||||
[email protected] | 9bf4d67b | 2013-06-25 17:12:01 | [diff] [blame] | 42 | return &g_ppb_networkproxy_thunk_1_0; |
[email protected] | 226dea4 | 2013-06-24 21:05:36 | [diff] [blame] | 43 | } |
44 | |||||
45 | } // namespace thunk | ||||
46 | } // namespace ppapi |