Chromium Code Reviews| Index: components/keyboard_lock/key_event_interceptor_installer.cc |
| diff --git a/components/keyboard_lock/key_event_interceptor_installer.cc b/components/keyboard_lock/key_event_interceptor_installer.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5ac658f5ff2f6492dd213f13c579bd965acb5f0b |
| --- /dev/null |
| +++ b/components/keyboard_lock/key_event_interceptor_installer.cc |
| @@ -0,0 +1,22 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "components/keyboard_lock/key_event_interceptor_installer.h" |
| + |
| +#include <memory> |
| + |
| +#include "base/logging.h" |
| +#include "components/keyboard_lock/keyboard_lock_host.h" |
| + |
| +namespace keyboard_lock { |
| + |
| +KeyEventInterceptorInstaller::KeyEventInterceptorInstaller( |
| + KeyboardLockHost* host) { |
| + DCHECK(host); |
| + host->SetKeyEventInterceptor(std::unique_ptr<KeyEventInterceptor>(this)); |
|
dtapuska
2017/04/18 13:43:17
I'd think this is dangerous. What happens if the S
Hzj_jie
2017/04/19 00:46:26
Done.
Good point, I have not considered this possi
|
| +} |
| + |
| +KeyEventInterceptorInstaller::~KeyEventInterceptorInstaller() = default; |
| + |
| +} // namespace keyboard_lock |