#ifndef CHROME_BROWSER_GLIC_WIDGET_APPLICATION_HOTKEY_DELEGATE_H_
#define CHROME_BROWSER_GLIC_WIDGET_APPLICATION_HOTKEY_DELEGATE_H_
#include "base/memory/weak_ptr.h"
#include "chrome/browser/glic/widget/local_hotkey_manager.h"
#include "ui/base/accelerators/accelerator.h"
namespace glic {
class ApplicationHotkeyDelegate : public LocalHotkeyManager::Delegate {
public:
explicit ApplicationHotkeyDelegate(
base::WeakPtr<LocalHotkeyManager::Panel> panel);
~ApplicationHotkeyDelegate() override;
const base::span<const LocalHotkeyManager::Hotkey> GetSupportedHotkeys()
const override;
bool AcceleratorPressed(LocalHotkeyManager::Hotkey Hotkey) override;
std::unique_ptr<LocalHotkeyManager::ScopedHotkeyRegistration>
CreateScopedHotkeyRegistration(
ui::Accelerator accelerator,
base::WeakPtr<ui::AcceleratorTarget> target) override;
base::WeakPtr<ApplicationHotkeyDelegate> GetWeakPtr() {
return weak_ptr_factory_.GetWeakPtr();
}
private:
base::WeakPtr<LocalHotkeyManager::Panel> panel_;
base::WeakPtrFactory<ApplicationHotkeyDelegate> weak_ptr_factory_{this};
};
std::unique_ptr<LocalHotkeyManager> MakeApplicationHotkeyManager(
base::WeakPtr<LocalHotkeyManager::Panel> panel);
}
#endif