OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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 "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" |
| 7 #include "ppapi/proxy/tcp_socket_resource_base.h" |
| 8 #include "ppapi/thunk/ppb_tcp_socket_api.h" |
| 9 |
| 10 namespace ppapi { |
| 11 namespace proxy { |
| 12 |
| 13 class PPAPI_PROXY_EXPORT TCPSocketResource : public thunk::PPB_TCPSocket_API, |
| 14 public TCPSocketResourceBase { |
| 15 public: |
| 16 TCPSocketResource(Connection connection, PP_Instance instance); |
| 17 virtual ~TCPSocketResource(); |
| 18 |
| 19 // PluginResource overrides. |
| 20 virtual thunk::PPB_TCPSocket_API* AsPPB_TCPSocket_API() OVERRIDE; |
| 21 |
| 22 // thunk::PPB_TCPSocket_API implementation. |
| 23 virtual int32_t Connect(PP_Resource addr, |
| 24 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 25 virtual PP_Resource GetLocalAddress() OVERRIDE; |
| 26 virtual PP_Resource GetRemoteAddress() OVERRIDE; |
| 27 virtual int32_t Read(char* buffer, |
| 28 int32_t bytes_to_read, |
| 29 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 30 virtual int32_t Write(const char* buffer, |
| 31 int32_t bytes_to_write, |
| 32 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 33 virtual void Close() OVERRIDE; |
| 34 virtual int32_t SetOption(PP_TCPSocket_Option name, |
| 35 const PP_Var& value, |
| 36 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 37 |
| 38 private: |
| 39 DISALLOW_COPY_AND_ASSIGN(TCPSocketResource); |
| 40 }; |
| 41 |
| 42 } // namespace proxy |
| 43 } // namespace ppapi |
OLD | NEW |