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_SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ | 5 #ifndef SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ |
6 #define MOJO_SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ | 6 #define SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ |
7 | 7 |
| 8 #include <sys/socket.h> |
8 #include <sys/types.h> | 9 #include <sys/types.h> |
9 #include <sys/socket.h> | |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
17 #include "base/threading/thread_checker.h" | 17 #include "base/threading/thread_checker.h" |
18 #include "mojo/shell/domain_socket/completion_callback.h" | 18 #include "shell/domain_socket/completion_callback.h" |
19 #include "mojo/shell/domain_socket/socket_descriptor.h" | 19 #include "shell/domain_socket/socket_descriptor.h" |
20 | 20 |
21 namespace mojo { | 21 namespace mojo { |
22 namespace shell { | 22 namespace shell { |
23 | 23 |
24 // Convenience struct for when you need a |struct sockaddr|. | 24 // Convenience struct for when you need a |struct sockaddr|. |
25 struct SockaddrStorage { | 25 struct SockaddrStorage { |
26 SockaddrStorage() | 26 SockaddrStorage() |
27 : addr_len(sizeof(addr_storage)), | 27 : addr_len(sizeof(addr_storage)), |
28 addr(reinterpret_cast<struct sockaddr*>(&addr_storage)) {} | 28 addr(reinterpret_cast<struct sockaddr*>(&addr_storage)) {} |
29 SockaddrStorage(const SockaddrStorage& other); | 29 SockaddrStorage(const SockaddrStorage& other); |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 scoped_ptr<SockaddrStorage> peer_address_; | 109 scoped_ptr<SockaddrStorage> peer_address_; |
110 | 110 |
111 base::ThreadChecker thread_checker_; | 111 base::ThreadChecker thread_checker_; |
112 | 112 |
113 DISALLOW_COPY_AND_ASSIGN(SocketLibevent); | 113 DISALLOW_COPY_AND_ASSIGN(SocketLibevent); |
114 }; | 114 }; |
115 | 115 |
116 } // namespace shell | 116 } // namespace shell |
117 } // namespace mojo | 117 } // namespace mojo |
118 | 118 |
119 #endif // MOJO_SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ | 119 #endif // SHELL_DOMAIN_SOCKET_SOCKET_LIBEVENT_H_ |
OLD | NEW |