| 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 #ifndef EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ | 6 #define EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "extensions/browser/api/socket/socket.h" | 13 #include "extensions/browser/api/socket/socket.h" |
| 14 #include "net/udp/udp_socket.h" | 14 #include "net/socket/udp_socket.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 | 17 |
| 18 class UDPSocket : public Socket { | 18 class UDPSocket : public Socket { |
| 19 public: | 19 public: |
| 20 explicit UDPSocket(const std::string& owner_extension_id); | 20 explicit UDPSocket(const std::string& owner_extension_id); |
| 21 ~UDPSocket() override; | 21 ~UDPSocket() override; |
| 22 | 22 |
| 23 void Connect(const net::AddressList& address, | 23 void Connect(const net::AddressList& address, |
| 24 const CompletionCallback& callback) override; | 24 const CompletionCallback& callback) override; |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // The size of the buffer used to receive data - see sockets_udp.idl. | 109 // The size of the buffer used to receive data - see sockets_udp.idl. |
| 110 int buffer_size_; | 110 int buffer_size_; |
| 111 // Flag indicating whether a connected socket blocks its peer from sending | 111 // Flag indicating whether a connected socket blocks its peer from sending |
| 112 // more data - see sockets_udp.idl. | 112 // more data - see sockets_udp.idl. |
| 113 bool paused_; | 113 bool paused_; |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace extensions | 116 } // namespace extensions |
| 117 | 117 |
| 118 #endif // EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ | 118 #endif // EXTENSIONS_BROWSER_API_SOCKET_UDP_SOCKET_H_ |
| OLD | NEW |