Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: components/keyboard_lock/sync_key_hook.h

Issue 2879033002: Keyboard Lock Host implementation
Patch Set: Remove useless files Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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_SYNC_KEY_HOOK_H_
6 #define COMPONENTS_KEYBOARD_LOCK_SYNC_KEY_HOOK_H_
7
8 #include "components/keyboard_lock/key_hook.h"
9
10 namespace keyboard_lock {
11
12 // An implementation of KeyHook for synchronized implementation, i.e. both
13 // RegisterKey() and UnregisterKey() return synchronizedly. Usually a platform
14 // specific implementation should derived from this class.
15 class SyncKeyHook : public KeyHook {
16 public:
17 SyncKeyHook();
18 ~SyncKeyHook() override;
19
20 void RegisterKey(const std::vector<ui::KeyboardCode>& codes,
21 base::Callback<void(bool)> on_result) final;
22 void UnregisterKey(const std::vector<ui::KeyboardCode>& codes,
23 base::Callback<void(bool)> on_result) final;
24
25 virtual bool RegisterKey(const std::vector<ui::KeyboardCode>& codes) = 0;
26 virtual bool UnregisterKey(const std::vector<ui::KeyboardCode>& codes) = 0;
27 };
28
29 } // namespace keyboard_lock
30
31 #endif // COMPONENTS_KEYBOARD_LOCK_SYNC_KEY_HOOK_H_
OLDNEW
« no previous file with comments | « components/keyboard_lock/register_once_key_hook.cc ('k') | components/keyboard_lock/sync_key_hook.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698