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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 network_list->AppendString(::onc::network_type::kWiFi); |
561 return network_list.Pass(); | 561 return network_list.Pass(); |
562 } | 562 } |
563 | 563 |
564 scoped_ptr<NetworkingPrivateDelegate::DeviceStateList> | 564 scoped_ptr<NetworkingPrivateDelegate::DeviceStateList> |
565 NetworkingPrivateLinux::GetDeviceStateList() { | 565 NetworkingPrivateLinux::GetDeviceStateList() { |
566 scoped_ptr<DeviceStateList> device_state_list(new DeviceStateList); | 566 scoped_ptr<DeviceStateList> device_state_list(new DeviceStateList); |
567 scoped_ptr<core_api::networking_private::DeviceStateProperties> properties( | 567 scoped_ptr<api::networking_private::DeviceStateProperties> properties( |
568 new core_api::networking_private::DeviceStateProperties); | 568 new api::networking_private::DeviceStateProperties); |
569 properties->type = core_api::networking_private::NETWORK_TYPE_WIFI; | 569 properties->type = api::networking_private::NETWORK_TYPE_WIFI; |
570 properties->state = core_api::networking_private::DEVICE_STATE_TYPE_ENABLED; | 570 properties->state = api::networking_private::DEVICE_STATE_TYPE_ENABLED; |
571 device_state_list->push_back(properties.Pass()); | 571 device_state_list->push_back(properties.Pass()); |
572 return device_state_list.Pass(); | 572 return device_state_list.Pass(); |
573 } | 573 } |
574 | 574 |
575 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { | 575 bool NetworkingPrivateLinux::EnableNetworkType(const std::string& type) { |
576 return false; | 576 return false; |
577 } | 577 } |
578 | 578 |
579 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { | 579 bool NetworkingPrivateLinux::DisableNetworkType(const std::string& type) { |
580 return false; | 580 return false; |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 base::Unretained(this), base::Passed(&guid_list))); | 1179 base::Unretained(this), base::Passed(&guid_list))); |
1180 } | 1180 } |
1181 | 1181 |
1182 void NetworkingPrivateLinux::OnNetworksChangedEventTask( | 1182 void NetworkingPrivateLinux::OnNetworksChangedEventTask( |
1183 scoped_ptr<GuidList> guid_list) { | 1183 scoped_ptr<GuidList> guid_list) { |
1184 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); | 1184 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); |
1185 OnNetworksChangedEventOnUIThread(*guid_list); | 1185 OnNetworksChangedEventOnUIThread(*guid_list); |
1186 } | 1186 } |
1187 | 1187 |
1188 } // namespace extensions | 1188 } // namespace extensions |
OLD | NEW |