Chromium Code Reviews| OLD | NEW |
|---|---|
| (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 "net/base/net_util.h" | |
|
dmichael (off chromium)
2012/03/01 18:29:54
You should try to avoid using this include if poss
Sergey Ulanov
2012/03/02 03:01:37
I wanted to avoid having separate type to represen
| |
| 13 #include "ppapi/shared_impl/resource.h" | |
| 14 #include "ppapi/thunk/ppb_network_list_private_api.h" | |
| 15 | |
| 16 namespace ppapi { | |
| 17 | |
| 18 class PPAPI_SHARED_EXPORT PPB_NetworkList_Private_Shared | |
| 19 : public ::ppapi::Resource, | |
| 20 public ::ppapi::thunk::PPB_NetworkList_Private_API { | |
| 21 public: | |
| 22 static PP_Resource Create(ResourceObjectType type, | |
| 23 PP_Instance instance, | |
| 24 scoped_ptr<net::NetworkInterfaceList> list); | |
| 25 | |
| 26 virtual ~PPB_NetworkList_Private_Shared(); | |
| 27 | |
| 28 // Resource override. | |
| 29 virtual ::ppapi::thunk::PPB_NetworkList_Private_API* | |
| 30 AsPPB_NetworkList_Private_API() OVERRIDE; | |
| 31 | |
| 32 // PPB_NetworkList_Private_API implementation. | |
| 33 virtual uint32_t GetCount() OVERRIDE; | |
| 34 virtual PP_Var GetName(uint32_t index) OVERRIDE; | |
| 35 virtual PP_NetworkListType_Private GetType(uint32_t index) OVERRIDE; | |
| 36 virtual PP_NetworkListState_Private GetState(uint32_t index) OVERRIDE; | |
| 37 virtual int32_t GetIpAddresses(uint32_t index, | |
| 38 PP_NetAddress_Private addresses[], | |
| 39 uint32_t count) OVERRIDE; | |
| 40 virtual PP_Var GetDisplayName(uint32_t index) OVERRIDE; | |
| 41 virtual uint32_t GetMTU(uint32_t index) OVERRIDE; | |
| 42 | |
| 43 private: | |
| 44 PPB_NetworkList_Private_Shared(ResourceObjectType type, | |
| 45 PP_Instance instance, | |
| 46 scoped_ptr<net::NetworkInterfaceList> list); | |
| 47 | |
| 48 scoped_ptr<net::NetworkInterfaceList> list_; | |
| 49 | |
| 50 DISALLOW_COPY_AND_ASSIGN(PPB_NetworkList_Private_Shared); | |
| 51 }; | |
| 52 | |
| 53 } // namespace ppapi | |
| 54 | |
| 55 #endif // PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ | |
| OLD | NEW |