// Copyright 2021 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef UI_OZONE_COMMON_BASE_KEYBOARD_HOOK_H_ #define UI_OZONE_COMMON_BASE_KEYBOARD_HOOK_H_ #include <optional> #include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "ui/ozone/public/platform_keyboard_hook.h" namespace ui { enum class DomCode : uint32_t; class KeyEvent; // Base implementation of KeyboardHook for Ozone platforms. // // Holds and provides to the subclasses the set of DOM codes and the callback // given upon construction. // // Can be used as is, and provides the browser-level lock for the given set of // keys. Platforms may implement system-level lock. The instance of this class // should enable the lock in constructor and release in in the destructor. class BaseKeyboardHook : public PlatformKeyboardHook { … }; } // namespace ui #endif // UI_OZONE_COMMON_BASE_KEYBOARD_HOOK_H_