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