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

Side by Side Diff: extensions/browser/api/sockets_tcp_server/sockets_tcp_server_api.h

Issue 183893041: Move sockets APIs out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename api targets Created 6 years, 9 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 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 CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_API_ H_ 5 #ifndef EXTENSIONS_BROWSER_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_API_ H_ 6 #define EXTENSIONS_BROWSER_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_API_H_
7 7
8 #include "chrome/browser/extensions/api/socket/socket_api.h" 8 #include "extensions/browser/api/socket/socket_api.h"
9 #include "chrome/common/extensions/api/sockets_tcp_server.h" 9 #include "extensions/common/api/sockets_tcp_server.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 class ResumableTCPServerSocket; 12 class ResumableTCPServerSocket;
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 namespace api { 16 namespace core_api {
17 17
18 class TCPServerSocketAsyncApiFunction : public SocketAsyncApiFunction { 18 class TCPServerSocketAsyncApiFunction : public SocketAsyncApiFunction {
19 protected: 19 protected:
20 virtual ~TCPServerSocketAsyncApiFunction(); 20 virtual ~TCPServerSocketAsyncApiFunction();
21 21
22 virtual scoped_ptr<SocketResourceManagerInterface> 22 virtual scoped_ptr<SocketResourceManagerInterface>
23 CreateSocketResourceManager() OVERRIDE; 23 CreateSocketResourceManager() OVERRIDE;
24 24
25 ResumableTCPServerSocket* GetTcpSocket(int socket_id); 25 ResumableTCPServerSocket* GetTcpSocket(int socket_id);
26 }; 26 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // AsyncApiFunction 76 // AsyncApiFunction
77 virtual bool Prepare() OVERRIDE; 77 virtual bool Prepare() OVERRIDE;
78 virtual void Work() OVERRIDE; 78 virtual void Work() OVERRIDE;
79 79
80 private: 80 private:
81 scoped_ptr<sockets_tcp_server::SetPaused::Params> params_; 81 scoped_ptr<sockets_tcp_server::SetPaused::Params> params_;
82 TCPServerSocketEventDispatcher* socket_event_dispatcher_; 82 TCPServerSocketEventDispatcher* socket_event_dispatcher_;
83 }; 83 };
84 84
85 class SocketsTcpServerListenFunction 85 class SocketsTcpServerListenFunction : public TCPServerSocketAsyncApiFunction {
86 : public TCPServerSocketAsyncApiFunction {
87 public: 86 public:
88 DECLARE_EXTENSION_FUNCTION("sockets.tcpServer.listen", 87 DECLARE_EXTENSION_FUNCTION("sockets.tcpServer.listen",
89 SOCKETS_TCP_SERVER_LISTEN) 88 SOCKETS_TCP_SERVER_LISTEN)
90 89
91 SocketsTcpServerListenFunction(); 90 SocketsTcpServerListenFunction();
92 91
93 protected: 92 protected:
94 virtual ~SocketsTcpServerListenFunction(); 93 virtual ~SocketsTcpServerListenFunction();
95 94
96 // AsyncApiFunction: 95 // AsyncApiFunction:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 SocketsTcpServerGetSocketsFunction(); 165 SocketsTcpServerGetSocketsFunction();
167 166
168 protected: 167 protected:
169 virtual ~SocketsTcpServerGetSocketsFunction(); 168 virtual ~SocketsTcpServerGetSocketsFunction();
170 169
171 // AsyncApiFunction: 170 // AsyncApiFunction:
172 virtual bool Prepare() OVERRIDE; 171 virtual bool Prepare() OVERRIDE;
173 virtual void Work() OVERRIDE; 172 virtual void Work() OVERRIDE;
174 }; 173 };
175 174
176 } // namespace api 175 } // namespace core_api
177 } // namespace extensions 176 } // namespace extensions
178 177
179 #endif // CHROME_BROWSER_EXTENSIONS_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_A PI_H_ 178 #endif // EXTENSIONS_BROWSER_API_SOCKETS_TCP_SERVER_SOCKETS_TCP_SERVER_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698