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 CHROME_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ | 5 #ifndef CONTENT_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ |
6 #define CHROME_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ | 6 #define CONTENT_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "third_party/libjingle/source/talk/base/network.h" | 11 #include "third_party/libjingle/source/talk/base/network.h" |
12 | 12 |
13 class P2PSocketDispatcher; | 13 class P2PSocketDispatcher; |
14 | 14 |
15 // IpcNetworkManager is a NetworkManager for libjingle that gets a | 15 // IpcNetworkManager is a NetworkManager for libjingle that gets a |
16 // list of network interfaces from the browser. | 16 // list of network interfaces from the browser. |
17 class IpcNetworkManager : public talk_base::NetworkManager { | 17 class IpcNetworkManager : public talk_base::NetworkManager { |
18 public: | 18 public: |
19 // Constructor doesn't take ownership of the |socket_dispatcher|. | 19 // Constructor doesn't take ownership of the |socket_dispatcher|. |
20 IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher); | 20 IpcNetworkManager(P2PSocketDispatcher* socket_dispatcher); |
21 virtual ~IpcNetworkManager(); | 21 virtual ~IpcNetworkManager(); |
22 | 22 |
23 protected: | 23 protected: |
24 // Fills the supplied list with all usable networks. | 24 // Fills the supplied list with all usable networks. |
25 virtual bool EnumNetworks(bool include_ignored, | 25 virtual bool EnumNetworks(bool include_ignored, |
26 std::vector<talk_base::Network*>* networks) | 26 std::vector<talk_base::Network*>* networks) |
27 OVERRIDE; | 27 OVERRIDE; |
28 | 28 |
29 P2PSocketDispatcher* socket_dispatcher_; | 29 P2PSocketDispatcher* socket_dispatcher_; |
30 }; | 30 }; |
31 | 31 |
32 #endif // CHROME_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ | 32 #endif // CONTENT_RENDERER_P2P_IPC_NETWORK_MANAGER_H_ |
OLD | NEW |