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

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

Issue 2815023002: [System-Keyboard-Lock] Add KeyboardLockHost and KeyEventInterceptor (Closed)
Patch Set: Resolve review comments Created 3 years, 8 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_KEY_EVENT_INTERCEPTOR_INSTALLER_H_
6 #define COMPONENTS_KEYBOARD_LOCK_KEY_EVENT_INTERCEPTOR_INSTALLER_H_
7
8 #include "base/macros.h"
9 #include "components/keyboard_lock/key_event_interceptor.h"
10
11 namespace keyboard_lock {
12
13 class KeyboardLockHost;
14
15 // Installs itself as the default implementation of KeyEventInterceptor in
16 // KeyboardLockHost.
17 class KeyEventInterceptorInstaller : public KeyEventInterceptor {
dtapuska 2017/04/21 14:48:33 Can you detail how the implementation of this clas
Hzj_jie 2017/04/21 21:13:09 A typical implementation does not need to take car
18 public:
19 ~KeyEventInterceptorInstaller() override;
20
21 protected:
22 // |host| should outlive this instance.
23 explicit KeyEventInterceptorInstaller(KeyboardLockHost* host);
24 void Install();
dtapuska 2017/04/21 14:48:33 The lifecyle of the install is weird. In that you
Hzj_jie 2017/04/21 21:13:09 The KeyLockHost takes owner-ship of the KeyEventIn
25
26 private:
27 KeyboardLockHost* const host_;
28
29 DISALLOW_COPY_AND_ASSIGN(KeyEventInterceptorInstaller);
30 };
31
32 } // namespace keyboard_lock
33
34 #endif // COMPONENTS_KEYBOARD_LOCK_KEY_EVENT_INTERCEPTOR_INSTALLER_H_
OLDNEW
« no previous file with comments | « components/keyboard_lock/key_event_interceptor.h ('k') | components/keyboard_lock/key_event_interceptor_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698