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

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
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 bool SocketAddressToPpAddressWithPort(const talk_base::SocketAddress& address,
Wez 2012/05/15 23:11:29 nit: Add short explanatory comment(s) so these met
Sergey Ulanov 2012/05/16 00:22:30 Done.
27 PP_NetAddress_Private* pp_address,
28 uint16_t port);
29 bool SocketAddressToPpAddress(const talk_base::SocketAddress& address,
30 PP_NetAddress_Private* pp_address);
31 bool PpAddressToSocketAddress(const PP_NetAddress_Private& pp_address,
32 talk_base::SocketAddress* address);
33
20 } // namespace remoting 34 } // namespace remoting
21 35
22 #endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_ 36 #endif // REMOTING_CLIENT_PLUGIN_PLUGIN_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698