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

Side by Side Diff: remoting/client/plugin/pepper_util.h

Issue 10384171: Fix PepperPortAllocator to resolve STUN addresses using HostResolverPrivate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « remoting/client/plugin/pepper_port_allocator.cc ('k') | remoting/client/plugin/pepper_util.cc » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_ 5 #ifndef REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
6 #define REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_ 6 #define REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback_forward.h" 9 #include "base/callback_forward.h"
10 10
11 #include "ppapi/cpp/completion_callback.h" 11 #include "ppapi/cpp/completion_callback.h"
12 12
13 struct PP_NetAddress_Private;
14
15 namespace talk_base {
16 class SocketAddress;
17 } // namespace talk_base
18
13 namespace remoting { 19 namespace remoting {
14 20
15 // Adapts a base::Callback to a pp::CompletionCallback, which may be passed to 21 // Adapts a base::Callback to a pp::CompletionCallback, which may be passed to
16 // exactly one Pepper API. If the adapted callback is not used then a copy of 22 // exactly one Pepper API. If the adapted callback is not used then a copy of
17 // |callback| will be leaked, including references & passed values bound to it. 23 // |callback| will be leaked, including references & passed values bound to it.
18 pp::CompletionCallback PpCompletionCallback(base::Callback<void(int)> callback); 24 pp::CompletionCallback PpCompletionCallback(base::Callback<void(int)> callback);
19 25
26 // Helpers to convert between different socket address representations.
27 bool SocketAddressToPpAddressWithPort(const talk_base::SocketAddress& address,
28 PP_NetAddress_Private* pp_address,
29 uint16_t port);
30 bool SocketAddressToPpAddress(const talk_base::SocketAddress& address,
31 PP_NetAddress_Private* pp_address);
32 bool PpAddressToSocketAddress(const PP_NetAddress_Private& pp_address,
33 talk_base::SocketAddress* address);
34
20 } // namespace remoting 35 } // namespace remoting
21 36
22 #endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_ 37 #endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
OLDNEW
« no previous file with comments | « remoting/client/plugin/pepper_port_allocator.cc ('k') | remoting/client/plugin/pepper_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698