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

Side by Side Diff: ppapi/thunk/ppb_network_monitor_private_thunk.cc

Issue 9545010: Add NetworkList/NetworkMonitor hooks and C++ wrappers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 8 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/thunk/ppb_network_monitor_private_api.h ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
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"
10
11 namespace ppapi {
12 namespace thunk {
13
14 namespace {
15
16 typedef EnterResource<PPB_NetworkMonitor_Private_API> EnterNetworkMonitor;
17
18 PP_Resource Create(PP_Instance instance,
19 PPB_NetworkMonitor_Callback callback,
20 void* user_data) {
21 EnterFunction<ResourceCreationAPI> enter(instance, true);
22 if (enter.failed())
23 return 0;
24 return enter.functions()->CreateNetworkMonitor(instance, callback, user_data);
25 }
26
27 PP_Bool IsNetworkMonitor(PP_Resource resource) {
28 EnterNetworkMonitor enter(resource, false);
29 return PP_FromBool(enter.succeeded());
30 }
31
32 const PPB_NetworkMonitor_Private g_ppb_network_monitor_private_thunk = {
33 &Create,
34 &IsNetworkMonitor,
35 };
36
37 } // namespace
38
39 const PPB_NetworkMonitor_Private_0_2*
40 GetPPB_NetworkMonitor_Private_0_2_Thunk() {
41 return &g_ppb_network_monitor_private_thunk;
42 }
43
44 } // namespace thunk
45 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_network_monitor_private_api.h ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698