Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Side by Side Diff: content/renderer/p2p/host_address_request.h

Issue 7762008: Implement STUN support for P2P Transport API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/p2p/p2p_transport_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 { 18 namespace content {
19 19
20 class P2PSocketDispatcher; 20 class P2PSocketDispatcher;
21 21
22 // P2PHostAddressRequest performs DNS hostname resolution. It's used
23 // to resolve addresses of STUN and relay servers.
24 //
25 // TODO(sergeyu): Name of this class may be confusing. Rename it to
26 // something else, e.g. P2PHostnameResolver.
22 class P2PHostAddressRequest : 27 class P2PHostAddressRequest :
23 public base::RefCountedThreadSafe<P2PHostAddressRequest> { 28 public base::RefCountedThreadSafe<P2PHostAddressRequest> {
24 public: 29 public:
25 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback; 30 typedef base::Callback<void(const net::IPAddressNumber&)> DoneCallback;
26 31
27 P2PHostAddressRequest(P2PSocketDispatcher* dispatcher); 32 P2PHostAddressRequest(P2PSocketDispatcher* dispatcher);
28 33
29 // Sends host address request. 34 // Sends host address request.
30 void Request(const std::string& host_name, 35 void Request(const std::string& host_name,
31 const DoneCallback& done_callback); 36 const DoneCallback& done_callback);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 // Accessed on the IPC thread only. 68 // Accessed on the IPC thread only.
64 int32 request_id_; 69 int32 request_id_;
65 bool registered_; 70 bool registered_;
66 71
67 DISALLOW_COPY_AND_ASSIGN(P2PHostAddressRequest); 72 DISALLOW_COPY_AND_ASSIGN(P2PHostAddressRequest);
68 }; 73 };
69 74
70 } // namespace content 75 } // namespace content
71 76
72 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_ 77 #endif // CONTENT_RENDERER_P2P_HOST_ADDRESS_REQUEST_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/p2p/p2p_transport_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698