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 COMPONENTE_KEYBOARD_LOCK_REGISTER_ONCE_KEY_HOOK_H_ |
| 6 #define COMPONENTE_KEYBOARD_LOCK_REGISTER_ONCE_KEY_HOOK_H_ |
| 7 |
| 8 #include "components/keyboard_lock/sync_key_hook.h" |
| 9 |
| 10 namespace keyboard_lock { |
| 11 |
| 12 class RegisterOnceKeyHook : public SyncKeyHook { |
| 13 public: |
| 14 RegisterOnceKeyHook(); |
| 15 ~RegisterOnceKeyHook() override; |
| 16 |
| 17 bool RegisterKey(const std::vector<ui::KeyboardCode>& codes) override; |
| 18 bool UnregisterKey(const std::vector<ui::KeyboardCode>& codes) override; |
| 19 |
| 20 private: |
| 21 virtual bool Register() = 0; |
| 22 virtual bool Unregister() = 0; |
| 23 |
| 24 int count_ = 0; |
| 25 }; |
| 26 |
| 27 } // namespace keyboard_lock |
| 28 |
| 29 #endif // COMPONENTE_KEYBOARD_LOCK_REGISTER_ONCE_KEY_HOOK_H_ |
OLD | NEW |