OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #ifndef COMPONENTS_KEYBOARD_LOCK_PLATFORM_KEY_HOOK_H_ |
| 6 #define COMPONENTS_KEYBOARD_LOCK_PLATFORM_KEY_HOOK_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "components/keyboard_lock/platform_key_event_filter.h" |
| 11 #include "components/keyboard_lock/sync_key_hook.h" |
| 12 |
| 13 class Browser; |
| 14 |
| 15 namespace keyboard_lock { |
| 16 |
| 17 class KeyEventFilter; |
| 18 |
| 19 class PlatformKeyHook final : public SyncKeyHook { |
| 20 public: |
| 21 PlatformKeyHook(Browser* owner, KeyEventFilter* filter); |
| 22 ~PlatformKeyHook() override; |
| 23 |
| 24 private: |
| 25 // SyncKeyHook implementations |
| 26 bool RegisterKey(const std::vector<ui::KeyboardCode>& codes) override; |
| 27 bool UnregisterKey(const std::vector<ui::KeyboardCode>& codes) override; |
| 28 |
| 29 Browser* const owner_; |
| 30 PlatformKeyEventFilter filter_; |
| 31 }; |
| 32 |
| 33 } // namespace keyboard_lock |
| 34 |
| 35 #endif // COMPONENTS_KEYBOARD_LOCK_PLATFORM_KEY_HOOK_H_ |
OLD | NEW |