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

Side by Side Diff: ppapi/proxy/tcp_server_socket_private_resource.h

Issue 1097393007: Update {virtual,override} to follow C++11 style in ppapi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Split off one file into separate review. Created 5 years, 8 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
« no previous file with comments | « ppapi/proxy/resource_message_test_sink.h ('k') | ppapi/proxy/tcp_socket_private_resource.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_ 5 #ifndef PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_
6 #define PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_ 6 #define PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "ppapi/proxy/plugin_resource.h" 11 #include "ppapi/proxy/plugin_resource.h"
12 #include "ppapi/proxy/ppapi_proxy_export.h" 12 #include "ppapi/proxy/ppapi_proxy_export.h"
13 #include "ppapi/shared_impl/tracked_callback.h" 13 #include "ppapi/shared_impl/tracked_callback.h"
14 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h" 14 #include "ppapi/thunk/ppb_tcp_server_socket_private_api.h"
15 15
16 namespace ppapi { 16 namespace ppapi {
17 namespace proxy { 17 namespace proxy {
18 18
19 class PPAPI_PROXY_EXPORT TCPServerSocketPrivateResource 19 class PPAPI_PROXY_EXPORT TCPServerSocketPrivateResource
20 : public PluginResource, 20 : public PluginResource,
21 public thunk::PPB_TCPServerSocket_Private_API { 21 public thunk::PPB_TCPServerSocket_Private_API {
22 public: 22 public:
23 TCPServerSocketPrivateResource(Connection connection, PP_Instance instance); 23 TCPServerSocketPrivateResource(Connection connection, PP_Instance instance);
24 virtual ~TCPServerSocketPrivateResource(); 24 ~TCPServerSocketPrivateResource() override;
25 25
26 // PluginResource implementation. 26 // PluginResource implementation.
27 virtual thunk::PPB_TCPServerSocket_Private_API* 27 thunk::PPB_TCPServerSocket_Private_API* AsPPB_TCPServerSocket_Private_API()
28 AsPPB_TCPServerSocket_Private_API() override; 28 override;
29 29
30 // PPB_TCPServerSocket_Private_API implementation. 30 // PPB_TCPServerSocket_Private_API implementation.
31 virtual int32_t Listen(const PP_NetAddress_Private* addr, 31 int32_t Listen(const PP_NetAddress_Private* addr,
32 int32_t backlog, 32 int32_t backlog,
33 scoped_refptr<TrackedCallback> callback) override; 33 scoped_refptr<TrackedCallback> callback) override;
34 virtual int32_t Accept(PP_Resource* tcp_socket, 34 int32_t Accept(PP_Resource* tcp_socket,
35 scoped_refptr<TrackedCallback> callback) override; 35 scoped_refptr<TrackedCallback> callback) override;
36 virtual int32_t GetLocalAddress(PP_NetAddress_Private* addr) override; 36 int32_t GetLocalAddress(PP_NetAddress_Private* addr) override;
37 virtual void StopListening() override; 37 void StopListening() override;
38 38
39 private: 39 private:
40 enum State { 40 enum State {
41 STATE_BEFORE_LISTENING, 41 STATE_BEFORE_LISTENING,
42 STATE_LISTENING, 42 STATE_LISTENING,
43 STATE_CLOSED 43 STATE_CLOSED
44 }; 44 };
45 45
46 // IPC message handlers. 46 // IPC message handlers.
47 void OnPluginMsgListenReply(const ResourceMessageReplyParams& params, 47 void OnPluginMsgListenReply(const ResourceMessageReplyParams& params,
(...skipping 10 matching lines...) Expand all
58 scoped_refptr<TrackedCallback> listen_callback_; 58 scoped_refptr<TrackedCallback> listen_callback_;
59 scoped_refptr<TrackedCallback> accept_callback_; 59 scoped_refptr<TrackedCallback> accept_callback_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketPrivateResource); 61 DISALLOW_COPY_AND_ASSIGN(TCPServerSocketPrivateResource);
62 }; 62 };
63 63
64 } // namespace proxy 64 } // namespace proxy
65 } // namespace ppapi 65 } // namespace ppapi
66 66
67 #endif // PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_ 67 #endif // PPAPI_PROXY_TCP_SERVER_SOCKET_PRIVATE_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/resource_message_test_sink.h ('k') | ppapi/proxy/tcp_socket_private_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698