OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ | 5 #ifndef CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ |
6 #define CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ | 6 #define CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "net/base/net_util.h" | 12 #include "net/base/net_util.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class MessageLoopProxy; | 15 class MessageLoopProxy; |
16 } // namespace base | 16 } // namespace base |
17 | 17 |
| 18 namespace content { |
| 19 |
18 class P2PSocketDispatcher; | 20 class P2PSocketDispatcher; |
19 | 21 |
20 class P2PHostAddressRequest : | 22 class P2PHostAddressRequest : |
21 public base::RefCountedThreadSafe<P2PHostAddressRequest> { | 23 public base::RefCountedThreadSafe<P2PHostAddressRequest> { |
22 public: | 24 public: |
23 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback; | 25 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback; |
24 | 26 |
25 P2PHostAddressRequest(P2PSocketDispatcher* dispatcher); | 27 P2PHostAddressRequest(P2PSocketDispatcher* dispatcher); |
26 | 28 |
27 // Sends host address request. | 29 // Sends host address request. |
(...skipping 30 matching lines...) Expand all Loading... |
58 // State must be accessed from delegate thread only. | 60 // State must be accessed from delegate thread only. |
59 State state_; | 61 State state_; |
60 | 62 |
61 // Accessed on the IPC thread only. | 63 // Accessed on the IPC thread only. |
62 int32 request_id_; | 64 int32 request_id_; |
63 bool registered_; | 65 bool registered_; |
64 | 66 |
65 DISALLOW_COPY_AND_ASSIGN(P2PHostAddressRequest); | 67 DISALLOW_COPY_AND_ASSIGN(P2PHostAddressRequest); |
66 }; | 68 }; |
67 | 69 |
| 70 } // namespace content |
| 71 |
68 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ | 72 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ |
OLD | NEW |