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

Side by Side Diff: ppapi/shared_impl/private/ppb_tcp_server_socket_shared.h

Issue 20777009: A few more cleanups to the pepper code. Dispatch IPCs in the sockets implementations directly by ha… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix tcp tests Created 7 years, 4 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
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 PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_
6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ 6 #define PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ppapi/c/pp_completion_callback.h" 9 #include "ppapi/c/pp_completion_callback.h"
10 #include "ppapi/shared_impl/resource.h" 10 #include "ppapi/shared_impl/resource.h"
(...skipping 26 matching lines...) Expand all
37 int32_t backlog, 37 int32_t backlog,
38 scoped_refptr<TrackedCallback> callback) OVERRIDE; 38 scoped_refptr<TrackedCallback> callback) OVERRIDE;
39 virtual int32_t Accept(PP_Resource* tcp_socket, 39 virtual int32_t Accept(PP_Resource* tcp_socket,
40 scoped_refptr<TrackedCallback> callback) OVERRIDE; 40 scoped_refptr<TrackedCallback> callback) OVERRIDE;
41 virtual int32_t GetLocalAddress(PP_NetAddress_Private* addr) OVERRIDE; 41 virtual int32_t GetLocalAddress(PP_NetAddress_Private* addr) OVERRIDE;
42 virtual void StopListening() OVERRIDE; 42 virtual void StopListening() OVERRIDE;
43 43
44 void OnListenCompleted(uint32 socket_id, 44 void OnListenCompleted(uint32 socket_id,
45 const PP_NetAddress_Private& local_addr, 45 const PP_NetAddress_Private& local_addr,
46 int32_t status); 46 int32_t status);
47 virtual void OnAcceptCompleted(bool succeeded,
48 uint32 accepted_socket_id,
49 const PP_NetAddress_Private& local_addr,
50 const PP_NetAddress_Private& remote_addr) = 0;
51 47
52 // Send functions that need to be implemented differently for the 48 // Send functions that need to be implemented differently for the
53 // proxied and non-proxied derived classes. 49 // proxied and non-proxied derived classes.
54 virtual void SendListen(const PP_NetAddress_Private& addr, 50 virtual void SendListen(const PP_NetAddress_Private& addr,
55 int32_t backlog) = 0; 51 int32_t backlog) = 0;
56 virtual void SendAccept() = 0; 52 virtual void SendAccept() = 0;
57 virtual void SendStopListening() = 0; 53 virtual void SendStopListening() = 0;
58 54
59 protected: 55 protected:
60 enum State { 56 enum State {
(...skipping 14 matching lines...) Expand all
75 scoped_refptr<TrackedCallback> accept_callback_; 71 scoped_refptr<TrackedCallback> accept_callback_;
76 72
77 PP_Resource* tcp_socket_buffer_; 73 PP_Resource* tcp_socket_buffer_;
78 74
79 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Shared); 75 DISALLOW_COPY_AND_ASSIGN(PPB_TCPServerSocket_Shared);
80 }; 76 };
81 77
82 } // namespace ppapi 78 } // namespace ppapi
83 79
84 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_ 80 #endif // PPAPI_SHARED_IMPL_PRIVATE_PPB_TCP_SERVER_SOCKET_SHARED_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698