| 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_TCP_SOCKET_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_SOCKET_TCP_SOCKET_H_ |
| 6 #define EXTENSIONS_BROWSER_API_SOCKET_TCP_SOCKET_H_ | 6 #define EXTENSIONS_BROWSER_API_SOCKET_TCP_SOCKET_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // socket objects with additional properties related to the behavior defined in | 108 // socket objects with additional properties related to the behavior defined in |
| 109 // the "sockets.tcp" namespace. | 109 // the "sockets.tcp" namespace. |
| 110 class ResumableTCPSocket : public TCPSocket { | 110 class ResumableTCPSocket : public TCPSocket { |
| 111 public: | 111 public: |
| 112 explicit ResumableTCPSocket(const std::string& owner_extension_id); | 112 explicit ResumableTCPSocket(const std::string& owner_extension_id); |
| 113 explicit ResumableTCPSocket( | 113 explicit ResumableTCPSocket( |
| 114 std::unique_ptr<net::TCPClientSocket> tcp_client_socket, | 114 std::unique_ptr<net::TCPClientSocket> tcp_client_socket, |
| 115 const std::string& owner_extension_id, | 115 const std::string& owner_extension_id, |
| 116 bool is_connected); | 116 bool is_connected); |
| 117 | 117 |
| 118 ~ResumableTCPSocket() override; |
| 119 |
| 118 // Overriden from ApiResource | 120 // Overriden from ApiResource |
| 119 bool IsPersistent() const override; | 121 bool IsPersistent() const override; |
| 120 | 122 |
| 121 const std::string& name() const { return name_; } | 123 const std::string& name() const { return name_; } |
| 122 void set_name(const std::string& name) { name_ = name; } | 124 void set_name(const std::string& name) { name_ = name; } |
| 123 | 125 |
| 124 bool persistent() const { return persistent_; } | 126 bool persistent() const { return persistent_; } |
| 125 void set_persistent(bool persistent) { persistent_ = persistent; } | 127 void set_persistent(bool persistent) { persistent_ = persistent; } |
| 126 | 128 |
| 127 int buffer_size() const { return buffer_size_; } | 129 int buffer_size() const { return buffer_size_; } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // suspended - see sockets_tcp_server.idl. | 179 // suspended - see sockets_tcp_server.idl. |
| 178 bool persistent_; | 180 bool persistent_; |
| 179 // Flag indicating whether a connected socket blocks its peer from sending | 181 // Flag indicating whether a connected socket blocks its peer from sending |
| 180 // more data - see sockets_tcp_server.idl. | 182 // more data - see sockets_tcp_server.idl. |
| 181 bool paused_; | 183 bool paused_; |
| 182 }; | 184 }; |
| 183 | 185 |
| 184 } // namespace extensions | 186 } // namespace extensions |
| 185 | 187 |
| 186 #endif // EXTENSIONS_BROWSER_API_SOCKET_TCP_SOCKET_H_ | 188 #endif // EXTENSIONS_BROWSER_API_SOCKET_TCP_SOCKET_H_ |
| OLD | NEW |