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

Side by Side Diff: ppapi/shared_impl/ppb_network_list_private_shared.h

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
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 #ifndef PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/shared_impl/resource.h"
13 #include "ppapi/thunk/ppb_network_list_private_api.h"
14
15 namespace ppapi {
16
17 class PPAPI_SHARED_EXPORT PPB_NetworkList_Private_Shared
18 : public ::ppapi::Resource,
19 public ::ppapi::thunk::PPB_NetworkList_Private_API {
20 public:
21 struct NetworkInfo {
22 NetworkInfo();
23 ~NetworkInfo();
24
25 std::string name;
26 PP_NetworkListType_Private type;
27 PP_NetworkListState_Private state;
28 std::vector<PP_NetAddress_Private> addresses;
29 std::string display_name;
30 int mtu;
31 };
32 typedef std::vector<NetworkInfo> NetworkList;
33
34 static PP_Resource Create(ResourceObjectType type,
35 PP_Instance instance,
36 scoped_ptr<NetworkList> list);
37
38 virtual ~PPB_NetworkList_Private_Shared();
39
40 // Resource override.
41 virtual ::ppapi::thunk::PPB_NetworkList_Private_API*
42 AsPPB_NetworkList_Private_API() OVERRIDE;
43
44 // PPB_NetworkList_Private_API implementation.
45 virtual uint32_t GetCount() OVERRIDE;
46 virtual PP_Var GetName(uint32_t index) OVERRIDE;
47 virtual PP_NetworkListType_Private GetType(uint32_t index) OVERRIDE;
48 virtual PP_NetworkListState_Private GetState(uint32_t index) OVERRIDE;
49 virtual int32_t GetIpAddresses(uint32_t index,
50 PP_NetAddress_Private addresses[],
51 uint32_t count) OVERRIDE;
52 virtual PP_Var GetDisplayName(uint32_t index) OVERRIDE;
53 virtual uint32_t GetMTU(uint32_t index) OVERRIDE;
54
55 private:
56 PPB_NetworkList_Private_Shared(ResourceObjectType type,
57 PP_Instance instance,
58 scoped_ptr<NetworkList> list);
59
60 scoped_ptr<NetworkList> list_;
61
62 DISALLOW_COPY_AND_ASSIGN(PPB_NetworkList_Private_Shared);
63 };
64
65 } // namespace ppapi
66
67 #endif // PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_creation_proxy.cc ('k') | ppapi/shared_impl/ppb_network_list_private_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698