OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/api/networking_private/networking_private_linux.h" | 5 #include "extensions/browser/api/networking_private/networking_private_linux.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 | 550 |
551 void NetworkingPrivateLinux::GetCaptivePortalStatus( | 551 void NetworkingPrivateLinux::GetCaptivePortalStatus( |
552 const std::string& guid, | 552 const std::string& guid, |
553 const StringCallback& success_callback, | 553 const StringCallback& success_callback, |
554 const FailureCallback& failure_callback) { | 554 const FailureCallback& failure_callback) { |
555 ReportNotSupported("GetCaptivePortalStatus", failure_callback); | 555 ReportNotSupported("GetCaptivePortalStatus", failure_callback); |
556 } | 556 } |
557 | 557 |
558 scoped_ptr<base::ListValue> NetworkingPrivateLinux::GetEnabledNetworkTypes() { | 558 scoped_ptr<base::ListValue> NetworkingPrivateLinux::GetEnabledNetworkTypes() { |
559 scoped_ptr<base::ListValue> network_list(new base::ListValue); | 559 scoped_ptr<base::ListValue> network_list(new base::ListValue); |
| 560 network_list->AppendString(::onc::network_type::kWiFi); |
560 return network_list.Pass(); | 561 return network_list.Pass(); |
561 } | 562 } |
562 | 563 |
| 564 scoped_ptr<DeviceStateList> NetworkingPrivateLinux::GetDeviceStateList() { |
| 565 scoped_ptr<DeviceStateList> device_state_list(new DeviceStateList); |
| 566 scoped_ptr<core_api::networking_private::DeviceStateProperties> properties( |
| 567 new core_api::networking_private::DeviceStateProperties); |
| 568 properties->type = core_api::networking_private::NETWORK_TYPE_WIFI; |
| 569 properties->state = core_api::networking_private::DEVICE_STATE_TYPE_ENABLED; |
| 570 device_state_list->push_back(properties.Pass()); |
| 571 return device_state_list.Pass(); |
| 572 } |
| 573 |
563 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { | 574 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { |
564 return false; | 575 return false; |
565 } | 576 } |
566 | 577 |
567 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { | 578 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { |
568 return false; | 579 return false; |
569 } | 580 } |
570 | 581 |
571 bool NetworkingPrivateLinux::RequestScan() { | 582 bool NetworkingPrivateLinux::RequestScan() { |
572 return GetNetworksForScanRequest(); | 583 return GetNetworksForScanRequest(); |
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 base::Unretained(this), base::Passed(&guid_list))); | 1178 base::Unretained(this), base::Passed(&guid_list))); |
1168 } | 1179 } |
1169 | 1180 |
1170 void NetworkingPrivateLinux::OnNetworksChangedEventTask( | 1181 void NetworkingPrivateLinux::OnNetworksChangedEventTask( |
1171 scoped_ptr<GuidList> guid_list) { | 1182 scoped_ptr<GuidList> guid_list) { |
1172 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 1183 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
1173 OnNetworksChangedEventOnUIThread(*guid_list); | 1184 OnNetworksChangedEventOnUIThread(*guid_list); |
1174 } | 1185 } |
1175 | 1186 |
1176 } // namespace extensions | 1187 } // namespace extensions |
OLD | NEW |