OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "content/browser/renderer_host/pepper/pepper_network_monitor_host.h" | 5 #include "content/browser/renderer_host/pepper/pepper_network_monitor_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/task_runner_util.h" | 9 #include "base/task_runner_util.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 return pepper_socket_utils::CanUseSocketAPIs(external_plugin, | 29 return pepper_socket_utils::CanUseSocketAPIs(external_plugin, |
30 false /* private_api */, | 30 false /* private_api */, |
31 &request, | 31 &request, |
32 render_process_id, | 32 render_process_id, |
33 render_frame_id); | 33 render_frame_id); |
34 } | 34 } |
35 | 35 |
36 scoped_ptr<net::NetworkInterfaceList> GetNetworkList() { | 36 scoped_ptr<net::NetworkInterfaceList> GetNetworkList() { |
37 scoped_ptr<net::NetworkInterfaceList> list(new net::NetworkInterfaceList()); | 37 scoped_ptr<net::NetworkInterfaceList> list(new net::NetworkInterfaceList()); |
38 net::GetNetworkList(list.get(), net::INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES); | 38 net::GetNetworkList(list.get(), net::INCLUDE_HOST_SCOPE_VIRTUAL_INTERFACES); |
39 return list.Pass(); | 39 return list; |
40 } | 40 } |
41 | 41 |
42 } // namespace | 42 } // namespace |
43 | 43 |
44 PepperNetworkMonitorHost::PepperNetworkMonitorHost(BrowserPpapiHostImpl* host, | 44 PepperNetworkMonitorHost::PepperNetworkMonitorHost(BrowserPpapiHostImpl* host, |
45 PP_Instance instance, | 45 PP_Instance instance, |
46 PP_Resource resource) | 46 PP_Resource resource) |
47 : ResourceHost(host->GetPpapiHost(), instance, resource), | 47 : ResourceHost(host->GetPpapiHost(), instance, resource), |
48 weak_factory_(this) { | 48 weak_factory_(this) { |
49 int render_process_id; | 49 int render_process_id; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 network_copy.type = PP_NETWORKLIST_TYPE_UNKNOWN; | 115 network_copy.type = PP_NETWORKLIST_TYPE_UNKNOWN; |
116 network_copy.state = PP_NETWORKLIST_STATE_UP; | 116 network_copy.state = PP_NETWORKLIST_STATE_UP; |
117 network_copy.display_name = network.name; | 117 network_copy.display_name = network.name; |
118 network_copy.mtu = 0; | 118 network_copy.mtu = 0; |
119 } | 119 } |
120 host()->SendUnsolicitedReply( | 120 host()->SendUnsolicitedReply( |
121 pp_resource(), PpapiPluginMsg_NetworkMonitor_NetworkList(*list_copy)); | 121 pp_resource(), PpapiPluginMsg_NetworkMonitor_NetworkList(*list_copy)); |
122 } | 122 } |
123 | 123 |
124 } // namespace content | 124 } // namespace content |
OLD | NEW |