#ifndef EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_
#define EXTENSIONS_BROWSER_API_BLUETOOTH_BLUETOOTH_EXTENSION_FUNCTION_H_
#include "base/memory/scoped_refptr.h"
#include "extensions/browser/extension_function.h"
namespace device {
class BluetoothAdapter;
}
namespace extensions {
namespace api {
class BluetoothExtensionFunction : public ExtensionFunction {
public:
BluetoothExtensionFunction();
BluetoothExtensionFunction(const BluetoothExtensionFunction&) = delete;
BluetoothExtensionFunction& operator=(const BluetoothExtensionFunction&) =
delete;
protected:
~BluetoothExtensionFunction() override;
ResponseAction Run() override;
std::string GetExtensionId();
virtual bool CreateParams();
private:
void RunOnAdapterReady(scoped_refptr<device::BluetoothAdapter> adapter);
virtual void DoWork(scoped_refptr<device::BluetoothAdapter> adapter) = 0;
};
}
}
#endif