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 MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ |
6 #define MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ | 6 #define MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "mojo/common/handle_watcher.h" | 10 #include "mojo/common/handle_watcher.h" |
11 #include "mojo/public/cpp/bindings/interface_impl.h" | |
12 #include "mojo/services/network/public/interfaces/tcp_connected_socket.mojom.h" | 11 #include "mojo/services/network/public/interfaces/tcp_connected_socket.mojom.h" |
13 #include "net/socket/tcp_socket.h" | 12 #include "net/socket/tcp_socket.h" |
| 13 #include "mojo/public/cpp/bindings/interface_impl.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 | 16 |
17 class MojoToNetPendingBuffer; | 17 class MojoToNetPendingBuffer; |
18 class NetToMojoPendingBuffer; | 18 class NetToMojoPendingBuffer; |
19 | 19 |
20 class TCPConnectedSocketImpl : public InterfaceImpl<TCPConnectedSocket> { | 20 class TCPConnectedSocketImpl : public InterfaceImpl<TCPConnectedSocket> { |
21 public: | 21 public: |
22 TCPConnectedSocketImpl(scoped_ptr<net::TCPSocket> socket, | 22 TCPConnectedSocketImpl(scoped_ptr<net::TCPSocket> socket, |
23 ScopedDataPipeConsumerHandle send_stream, | 23 ScopedDataPipeConsumerHandle send_stream, |
(...skipping 28 matching lines...) Expand all Loading... |
52 ScopedDataPipeProducerHandle receive_stream_; | 52 ScopedDataPipeProducerHandle receive_stream_; |
53 common::HandleWatcher send_handle_watcher_; | 53 common::HandleWatcher send_handle_watcher_; |
54 scoped_refptr<MojoToNetPendingBuffer> pending_send_; | 54 scoped_refptr<MojoToNetPendingBuffer> pending_send_; |
55 | 55 |
56 base::WeakPtrFactory<TCPConnectedSocketImpl> weak_ptr_factory_; | 56 base::WeakPtrFactory<TCPConnectedSocketImpl> weak_ptr_factory_; |
57 }; | 57 }; |
58 | 58 |
59 } // namespace mojo | 59 } // namespace mojo |
60 | 60 |
61 #endif // MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ | 61 #endif // MOJO_SERVICES_NETWORK_TCP_CONNECTED_SOCKET_H_ |
OLD | NEW |