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 "components/wifi/wifi_service.h" | 5 #include "components/wifi/wifi_service.h" |
6 | 6 |
7 #include <iphlpapi.h> | 7 #include <iphlpapi.h> |
8 #include <objbase.h> | 8 #include <objbase.h> |
9 #include <wlanapi.h> | 9 #include <wlanapi.h> |
10 | 10 |
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 void WiFiServiceImpl::OnWlanNotificationCallback( | 809 void WiFiServiceImpl::OnWlanNotificationCallback( |
810 PWLAN_NOTIFICATION_DATA wlan_notification_data, | 810 PWLAN_NOTIFICATION_DATA wlan_notification_data, |
811 PVOID context) { | 811 PVOID context) { |
812 WiFiServiceImpl* service = reinterpret_cast<WiFiServiceImpl*>(context); | 812 WiFiServiceImpl* service = reinterpret_cast<WiFiServiceImpl*>(context); |
813 service->OnWlanNotification(wlan_notification_data); | 813 service->OnWlanNotification(wlan_notification_data); |
814 } | 814 } |
815 | 815 |
816 void WiFiServiceImpl::OnWlanNotification( | 816 void WiFiServiceImpl::OnWlanNotification( |
817 PWLAN_NOTIFICATION_DATA wlan_notification_data) { | 817 PWLAN_NOTIFICATION_DATA wlan_notification_data) { |
818 if (message_loop_proxy_ == NULL) | 818 if (message_loop_proxy_.get() == NULL) |
819 return; | 819 return; |
820 switch (wlan_notification_data->NotificationCode) { | 820 switch (wlan_notification_data->NotificationCode) { |
821 case wlan_notification_acm_disconnected: | 821 case wlan_notification_acm_disconnected: |
822 case wlan_notification_acm_connection_complete: | 822 case wlan_notification_acm_connection_complete: |
823 case wlan_notification_acm_connection_attempt_fail: { | 823 case wlan_notification_acm_connection_attempt_fail: { |
824 PWLAN_CONNECTION_NOTIFICATION_DATA wlan_connection_data = | 824 PWLAN_CONNECTION_NOTIFICATION_DATA wlan_connection_data = |
825 reinterpret_cast<PWLAN_CONNECTION_NOTIFICATION_DATA>( | 825 reinterpret_cast<PWLAN_CONNECTION_NOTIFICATION_DATA>( |
826 wlan_notification_data->pData); | 826 wlan_notification_data->pData); |
827 message_loop_proxy_->PostTask( | 827 message_loop_proxy_->PostTask( |
828 FROM_HERE, | 828 FROM_HERE, |
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1840 NetworkGuidList changed_networks(1, network_guid); | 1840 NetworkGuidList changed_networks(1, network_guid); |
1841 message_loop_proxy_->PostTask( | 1841 message_loop_proxy_->PostTask( |
1842 FROM_HERE, | 1842 FROM_HERE, |
1843 base::Bind(networks_changed_observer_, changed_networks)); | 1843 base::Bind(networks_changed_observer_, changed_networks)); |
1844 } | 1844 } |
1845 } | 1845 } |
1846 | 1846 |
1847 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } | 1847 WiFiService* WiFiService::Create() { return new WiFiServiceImpl(); } |
1848 | 1848 |
1849 } // namespace wifi | 1849 } // namespace wifi |
OLD | NEW |