| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "ppapi/shared_impl/private/udp_socket_private_impl.h" | 9 #include "ppapi/shared_impl/private/ppb_udp_socket_shared.h" |
| 10 #include "ppapi/shared_impl/resource.h" |
| 10 | 11 |
| 11 namespace webkit { | 12 namespace webkit { |
| 12 namespace ppapi { | 13 namespace ppapi { |
| 13 | 14 |
| 14 class PPB_UDPSocket_Private_Impl : public ::ppapi::UDPSocketPrivateImpl { | 15 class PPB_UDPSocket_Private_Impl : public ::ppapi::Resource, |
| 16 public ::ppapi::PPB_UDPSocket_Shared { |
| 15 public: | 17 public: |
| 16 static PP_Resource CreateResource(PP_Instance instance); | 18 static PP_Resource CreateResource(PP_Instance instance); |
| 17 | 19 |
| 20 // Resource overrides. |
| 21 virtual ::ppapi::thunk::PPB_UDPSocket_Private_API* |
| 22 AsPPB_UDPSocket_Private_API() OVERRIDE; |
| 23 |
| 24 // PPB_UDPSocket_Shared implementation. |
| 18 virtual void SendBoolSocketFeature(int32_t name, bool value) OVERRIDE; | 25 virtual void SendBoolSocketFeature(int32_t name, bool value) OVERRIDE; |
| 19 virtual void SendBind(const PP_NetAddress_Private& addr) OVERRIDE; | 26 virtual void SendBind(const PP_NetAddress_Private& addr) OVERRIDE; |
| 20 virtual void SendRecvFrom(int32_t num_bytes) OVERRIDE; | 27 virtual void SendRecvFrom(int32_t num_bytes) OVERRIDE; |
| 21 virtual void SendSendTo(const std::string& buffer, | 28 virtual void SendSendTo(const std::string& buffer, |
| 22 const PP_NetAddress_Private& addr) OVERRIDE; | 29 const PP_NetAddress_Private& addr) OVERRIDE; |
| 23 virtual void SendClose() OVERRIDE; | 30 virtual void SendClose() OVERRIDE; |
| 24 | 31 |
| 25 private: | 32 private: |
| 26 PPB_UDPSocket_Private_Impl(PP_Instance instance, uint32 socket_id); | 33 PPB_UDPSocket_Private_Impl(PP_Instance instance, uint32 socket_id); |
| 27 virtual ~PPB_UDPSocket_Private_Impl(); | 34 virtual ~PPB_UDPSocket_Private_Impl(); |
| 28 | 35 |
| 36 uint32 socket_id_; |
| 37 |
| 29 DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Impl); | 38 DISALLOW_COPY_AND_ASSIGN(PPB_UDPSocket_Private_Impl); |
| 30 }; | 39 }; |
| 31 | 40 |
| 32 } // namespace ppapi | 41 } // namespace ppapi |
| 33 } // namespace webkit | 42 } // namespace webkit |
| 34 | 43 |
| 35 #endif // WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ | 44 #endif // WEBKIT_PLUGINS_PPAPI_PPB_UDP_SOCKET_PRIVATE_IMPL_H_ |
| OLD | NEW |