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 <stdint.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/macros.h" |
11 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
12 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
13 #include "net/base/ip_address_number.h" | 16 #include "net/base/ip_address_number.h" |
14 #include "third_party/webrtc/base/asyncresolverinterface.h" | 17 #include "third_party/webrtc/base/asyncresolverinterface.h" |
15 | 18 |
16 namespace base { | 19 namespace base { |
17 class MessageLoop; | 20 class MessageLoop; |
18 class SingleThreadTaskRunner; | 21 class SingleThreadTaskRunner; |
19 } // namespace base | 22 } // namespace base |
20 | 23 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 void DeliverResponse(const net::IPAddressList& address); | 59 void DeliverResponse(const net::IPAddressList& address); |
57 | 60 |
58 P2PSocketDispatcher* dispatcher_; | 61 P2PSocketDispatcher* dispatcher_; |
59 scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_; | 62 scoped_refptr<base::SingleThreadTaskRunner> ipc_task_runner_; |
60 scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_; | 63 scoped_refptr<base::SingleThreadTaskRunner> delegate_task_runner_; |
61 | 64 |
62 // State must be accessed from delegate thread only. | 65 // State must be accessed from delegate thread only. |
63 State state_; | 66 State state_; |
64 | 67 |
65 // Accessed on the IPC thread only. | 68 // Accessed on the IPC thread only. |
66 int32 request_id_; | 69 int32_t request_id_; |
67 bool registered_; | 70 bool registered_; |
68 std::vector<rtc::IPAddress> addresses_; | 71 std::vector<rtc::IPAddress> addresses_; |
69 DoneCallback done_callback_; | 72 DoneCallback done_callback_; |
70 | 73 |
71 DISALLOW_COPY_AND_ASSIGN(P2PAsyncAddressResolver); | 74 DISALLOW_COPY_AND_ASSIGN(P2PAsyncAddressResolver); |
72 }; | 75 }; |
73 | 76 |
74 } // namespace content | 77 } // namespace content |
75 | 78 |
76 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ | 79 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ |
OLD | NEW |