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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_
6 #define EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_
8 #include "extensions/browser/extension_function.h"
9 #include "extensions/common/api/system_network.h"
10 #include "net/base/net_util.h"
12 namespace extensions
{
15 class SystemNetworkGetNetworkInterfacesFunction
16 : public AsyncExtensionFunction
{
18 DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces",
19 SYSTEM_NETWORK_GETNETWORKINTERFACES
)
21 SystemNetworkGetNetworkInterfacesFunction();
24 ~SystemNetworkGetNetworkInterfacesFunction() override
;
27 bool RunAsync() override
;
30 void GetListOnFileThread();
31 void HandleGetListError();
32 void SendResponseOnUIThread(const net::NetworkInterfaceList
& interface_list
);
36 } // namespace extensions
38 #endif // EXTENSIONS_BROWSER_API_SYSTEM_NETWORK_SYSTEM_NETWORK_API_H_