1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "ppapi/c/pp_errors.h"
6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/thunk.h"
8 #include "ppapi/thunk/ppb_network_monitor_private_api.h"
9 #include "ppapi/thunk/resource_creation_api.h"
16 typedef EnterResource
<PPB_NetworkMonitor_Private_API
> EnterNetworkMonitor
;
18 PP_Resource
Create(PP_Instance instance
,
19 PPB_NetworkMonitor_Callback callback
,
21 EnterResourceCreation
enter(instance
);
24 return enter
.functions()->CreateNetworkMonitor(instance
, callback
, user_data
);
27 PP_Bool
IsNetworkMonitor(PP_Resource resource
) {
28 EnterNetworkMonitor
enter(resource
, false);
29 return PP_FromBool(enter
.succeeded());
32 const PPB_NetworkMonitor_Private g_ppb_network_monitor_private_thunk
= {
39 const PPB_NetworkMonitor_Private_0_2
*
40 GetPPB_NetworkMonitor_Private_0_2_Thunk() {
41 return &g_ppb_network_monitor_private_thunk
;