Chromium Code Reviews| Index: ppapi/shared_impl/ppb_network_list_private_shared.h |
| diff --git a/ppapi/shared_impl/ppb_network_list_private_shared.h b/ppapi/shared_impl/ppb_network_list_private_shared.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a17144c13baf8bf2f983f0ffac1bf4fb47a7ae21 |
| --- /dev/null |
| +++ b/ppapi/shared_impl/ppb_network_list_private_shared.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ |
| +#define PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/basictypes.h" |
| +#include "base/memory/scoped_ptr.h" |
| +#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
|
| +#include "ppapi/shared_impl/resource.h" |
| +#include "ppapi/thunk/ppb_network_list_private_api.h" |
| + |
| +namespace ppapi { |
| + |
| +class PPAPI_SHARED_EXPORT PPB_NetworkList_Private_Shared |
| + : public ::ppapi::Resource, |
| + public ::ppapi::thunk::PPB_NetworkList_Private_API { |
| + public: |
| + static PP_Resource Create(ResourceObjectType type, |
| + PP_Instance instance, |
| + scoped_ptr<net::NetworkInterfaceList> list); |
| + |
| + virtual ~PPB_NetworkList_Private_Shared(); |
| + |
| + // Resource override. |
| + virtual ::ppapi::thunk::PPB_NetworkList_Private_API* |
| + AsPPB_NetworkList_Private_API() OVERRIDE; |
| + |
| + // PPB_NetworkList_Private_API implementation. |
| + virtual uint32_t GetCount() OVERRIDE; |
| + virtual PP_Var GetName(uint32_t index) OVERRIDE; |
| + virtual PP_NetworkListType_Private GetType(uint32_t index) OVERRIDE; |
| + virtual PP_NetworkListState_Private GetState(uint32_t index) OVERRIDE; |
| + virtual int32_t GetIpAddresses(uint32_t index, |
| + PP_NetAddress_Private addresses[], |
| + uint32_t count) OVERRIDE; |
| + virtual PP_Var GetDisplayName(uint32_t index) OVERRIDE; |
| + virtual uint32_t GetMTU(uint32_t index) OVERRIDE; |
| + |
| + private: |
| + PPB_NetworkList_Private_Shared(ResourceObjectType type, |
| + PP_Instance instance, |
| + scoped_ptr<net::NetworkInterfaceList> list); |
| + |
| + scoped_ptr<net::NetworkInterfaceList> list_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PPB_NetworkList_Private_Shared); |
| +}; |
| + |
| +} // namespace ppapi |
| + |
| +#endif // PPAPI_SHARED_IMPL_PPB_NETWORK_LIST_PRIVATE_SHARED_H_ |