OLD | NEW |
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 #include "remoting/protocol/pepper_network_manager.h" | 5 #include "remoting/client/plugin/pepper_network_manager.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "ppapi/cpp/module.h" | 9 #include "ppapi/cpp/module.h" |
10 #include "ppapi/cpp/private/network_list_private.h" | 10 #include "ppapi/cpp/private/network_list_private.h" |
11 #include "ppapi/cpp/private/net_address_private.h" | 11 #include "ppapi/cpp/private/net_address_private.h" |
12 | 12 |
13 namespace remoting { | 13 namespace remoting { |
14 namespace protocol { | |
15 | 14 |
16 PepperNetworkManager::PepperNetworkManager(const pp::InstanceHandle& instance) | 15 PepperNetworkManager::PepperNetworkManager(const pp::InstanceHandle& instance) |
17 : monitor_(instance, &PepperNetworkManager::OnNetworkListCallbackHandler, | 16 : monitor_(instance, &PepperNetworkManager::OnNetworkListCallbackHandler, |
18 this), | 17 this), |
19 start_count_(0), | 18 start_count_(0), |
20 network_list_received_(false), | 19 network_list_received_(false), |
21 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { | 20 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { |
22 } | 21 } |
23 | 22 |
24 PepperNetworkManager::~PepperNetworkManager() { | 23 PepperNetworkManager::~PepperNetworkManager() { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 bool changed = false; | 102 bool changed = false; |
104 MergeNetworkList(networks, &changed); | 103 MergeNetworkList(networks, &changed); |
105 if (changed) | 104 if (changed) |
106 SignalNetworksChanged(); | 105 SignalNetworksChanged(); |
107 } | 106 } |
108 | 107 |
109 void PepperNetworkManager::SendNetworksChangedSignal() { | 108 void PepperNetworkManager::SendNetworksChangedSignal() { |
110 SignalNetworksChanged(); | 109 SignalNetworksChanged(); |
111 } | 110 } |
112 | 111 |
113 } // namespace protocol | |
114 } // namespace remoting | 112 } // namespace remoting |
OLD | NEW |