| 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" | 8 #include "chrome/browser/chromeos/cros/network_library_impl_base.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 NetworkMethodErrorType error, | 107 NetworkMethodErrorType error, |
| 108 const char* error_message); | 108 const char* error_message); |
| 109 | 109 |
| 110 static void NetworkConnectCallback(void* object, | 110 static void NetworkConnectCallback(void* object, |
| 111 const char* service_path, | 111 const char* service_path, |
| 112 NetworkMethodErrorType error, | 112 NetworkMethodErrorType error, |
| 113 const char* error_message); | 113 const char* error_message); |
| 114 | 114 |
| 115 static void WifiServiceUpdateAndConnect( | 115 static void WifiServiceUpdateAndConnect( |
| 116 void* object, | 116 void* object, |
| 117 const char* service_path, | 117 const std::string& service_path, |
| 118 const base::DictionaryValue* properties); | 118 const base::DictionaryValue* properties); |
| 119 static void VPNServiceUpdateAndConnect( | 119 static void VPNServiceUpdateAndConnect( |
| 120 void* object, | 120 void* object, |
| 121 const char* service_path, | 121 const std::string& service_path, |
| 122 const base::DictionaryValue* properties); | 122 const base::DictionaryValue* properties); |
| 123 | 123 |
| 124 static void NetworkManagerStatusChangedHandler(void* object, | 124 static void NetworkManagerStatusChangedHandler(void* object, |
| 125 const std::string& path, | 125 const std::string& path, |
| 126 const std::string& key, | 126 const std::string& key, |
| 127 const base::Value& value); | 127 const base::Value& value); |
| 128 static void NetworkManagerUpdate(void* object, | 128 static void NetworkManagerUpdate(void* object, |
| 129 const char* manager_path, | 129 const std::string& manager_path, |
| 130 const base::DictionaryValue* properties); | 130 const base::DictionaryValue* properties); |
| 131 | 131 |
| 132 static void DataPlanUpdateHandler( | 132 static void DataPlanUpdateHandler( |
| 133 void* object, | 133 void* object, |
| 134 const char* modem_service_path, | 134 const char* modem_service_path, |
| 135 const chromeos::CellularDataPlanList* data_plan_list); | 135 const chromeos::CellularDataPlanList* data_plan_list); |
| 136 | 136 |
| 137 static void NetworkServiceUpdate(void* object, | 137 static void NetworkServiceUpdate(void* object, |
| 138 const char* service_path, | 138 const std::string& service_path, |
| 139 const base::DictionaryValue* properties); | 139 const base::DictionaryValue* properties); |
| 140 static void RememberedNetworkServiceUpdate( | 140 static void RememberedNetworkServiceUpdate( |
| 141 void* object, | 141 void* object, |
| 142 const char* service_path, | 142 const std::string& service_path, |
| 143 const base::DictionaryValue* properties); | 143 const base::DictionaryValue* properties); |
| 144 static void ProfileUpdate(void* object, | 144 static void ProfileUpdate(void* object, |
| 145 const char* profile_path, | 145 const std::string& profile_path, |
| 146 const base::DictionaryValue* properties); | 146 const base::DictionaryValue* properties); |
| 147 static void NetworkDeviceUpdate(void* object, | 147 static void NetworkDeviceUpdate(void* object, |
| 148 const char* device_path, | 148 const std::string& device_path, |
| 149 const base::DictionaryValue* properties); | 149 const base::DictionaryValue* properties); |
| 150 | 150 |
| 151 private: | 151 private: |
| 152 // This processes all Manager update messages. | 152 // This processes all Manager update messages. |
| 153 void NetworkManagerStatusChanged(const std::string& key, const Value* value); | 153 void NetworkManagerStatusChanged(const std::string& key, const Value* value); |
| 154 void ParseNetworkManager(const DictionaryValue& dict); | 154 void ParseNetworkManager(const DictionaryValue& dict); |
| 155 void UpdateTechnologies(const ListValue* technologies, int* bitfieldp); | 155 void UpdateTechnologies(const ListValue* technologies, int* bitfieldp); |
| 156 void UpdateAvailableTechnologies(const ListValue* technologies); | 156 void UpdateAvailableTechnologies(const ListValue* technologies); |
| 157 void UpdateEnabledTechnologies(const ListValue* technologies); | 157 void UpdateEnabledTechnologies(const ListValue* technologies); |
| 158 void UpdateConnectedTechnologies(const ListValue* technologies); | 158 void UpdateConnectedTechnologies(const ListValue* technologies); |
| 159 | 159 |
| 160 // Update network lists. | 160 // Update network lists. |
| 161 void UpdateNetworkServiceList(const ListValue* services); | 161 void UpdateNetworkServiceList(const ListValue* services); |
| 162 void UpdateWatchedNetworkServiceList(const ListValue* services); | 162 void UpdateWatchedNetworkServiceList(const ListValue* services); |
| 163 Network* ParseNetwork(const std::string& service_path, | 163 Network* ParseNetwork(const std::string& service_path, |
| 164 const DictionaryValue& info); | 164 const DictionaryValue& info); |
| 165 | 165 |
| 166 void UpdateRememberedNetworks(const ListValue* profiles); | 166 void UpdateRememberedNetworks(const ListValue* profiles); |
| 167 void RequestRememberedNetworksUpdate(); | 167 void RequestRememberedNetworksUpdate(); |
| 168 void UpdateRememberedServiceList(const char* profile_path, | 168 void UpdateRememberedServiceList(const std::string& profile_path, |
| 169 const ListValue* profile_entries); | 169 const ListValue* profile_entries); |
| 170 Network* ParseRememberedNetwork(const std::string& service_path, | 170 Network* ParseRememberedNetwork(const std::string& service_path, |
| 171 const DictionaryValue& info); | 171 const DictionaryValue& info); |
| 172 | 172 |
| 173 // NetworkDevice list management functions. | 173 // NetworkDevice list management functions. |
| 174 void UpdateNetworkDeviceList(const ListValue* devices); | 174 void UpdateNetworkDeviceList(const ListValue* devices); |
| 175 void ParseNetworkDevice(const std::string& device_path, | 175 void ParseNetworkDevice(const std::string& device_path, |
| 176 const DictionaryValue& info); | 176 const DictionaryValue& info); |
| 177 | 177 |
| 178 // Empty device observer to ensure that device property updates are received. | 178 // Empty device observer to ensure that device property updates are received. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 199 | 199 |
| 200 // Map of monitored devices. | 200 // Map of monitored devices. |
| 201 NetworkWatcherMap monitored_devices_; | 201 NetworkWatcherMap monitored_devices_; |
| 202 | 202 |
| 203 DISALLOW_COPY_AND_ASSIGN(NetworkLibraryImplCros); | 203 DISALLOW_COPY_AND_ASSIGN(NetworkLibraryImplCros); |
| 204 }; | 204 }; |
| 205 | 205 |
| 206 } // namespace chromeos | 206 } // namespace chromeos |
| 207 | 207 |
| 208 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ | 208 #endif // CHROME_BROWSER_CHROMEOS_CROS_NETWORK_LIBRARY_IMPL_CROS_H_ |
| OLD | NEW |