| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/browser/api/sockets_tcp_server/sockets_tcp_server_api.h" | 5 #include "extensions/browser/api/sockets_tcp_server/sockets_tcp_server_api.h" |
| 6 | 6 |
| 7 #include "content/public/common/socket_permission_request.h" | 7 #include "content/public/common/socket_permission_request.h" |
| 8 #include "extensions/browser/api/socket/tcp_socket.h" | 8 #include "extensions/browser/api/socket/tcp_socket.h" |
| 9 #include "extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_disp
atcher.h" | 9 #include "extensions/browser/api/sockets_tcp_server/tcp_server_socket_event_disp
atcher.h" |
| 10 #include "extensions/common/api/sockets/sockets_manifest_data.h" | 10 #include "extensions/common/api/sockets/sockets_manifest_data.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace | 58 } // namespace |
| 59 | 59 |
| 60 namespace extensions { | 60 namespace extensions { |
| 61 namespace api { | 61 namespace api { |
| 62 | 62 |
| 63 TCPServerSocketAsyncApiFunction::~TCPServerSocketAsyncApiFunction() {} | 63 TCPServerSocketAsyncApiFunction::~TCPServerSocketAsyncApiFunction() {} |
| 64 | 64 |
| 65 scoped_ptr<SocketResourceManagerInterface> | 65 std::unique_ptr<SocketResourceManagerInterface> |
| 66 TCPServerSocketAsyncApiFunction::CreateSocketResourceManager() { | 66 TCPServerSocketAsyncApiFunction::CreateSocketResourceManager() { |
| 67 return scoped_ptr<SocketResourceManagerInterface>( | 67 return std::unique_ptr<SocketResourceManagerInterface>( |
| 68 new SocketResourceManager<ResumableTCPServerSocket>()); | 68 new SocketResourceManager<ResumableTCPServerSocket>()); |
| 69 } | 69 } |
| 70 | 70 |
| 71 ResumableTCPServerSocket* TCPServerSocketAsyncApiFunction::GetTcpSocket( | 71 ResumableTCPServerSocket* TCPServerSocketAsyncApiFunction::GetTcpSocket( |
| 72 int socket_id) { | 72 int socket_id) { |
| 73 return static_cast<ResumableTCPServerSocket*>(GetSocket(socket_id)); | 73 return static_cast<ResumableTCPServerSocket*>(GetSocket(socket_id)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 SocketsTcpServerCreateFunction::SocketsTcpServerCreateFunction() {} | 76 SocketsTcpServerCreateFunction::SocketsTcpServerCreateFunction() {} |
| 77 | 77 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 if (socket) { | 288 if (socket) { |
| 289 socket_infos.push_back(CreateSocketInfo(socket_id, socket)); | 289 socket_infos.push_back(CreateSocketInfo(socket_id, socket)); |
| 290 } | 290 } |
| 291 } | 291 } |
| 292 } | 292 } |
| 293 results_ = sockets_tcp_server::GetSockets::Results::Create(socket_infos); | 293 results_ = sockets_tcp_server::GetSockets::Results::Create(socket_infos); |
| 294 } | 294 } |
| 295 | 295 |
| 296 } // namespace api | 296 } // namespace api |
| 297 } // namespace extensions | 297 } // namespace extensions |
| OLD | NEW |