| Index: components/keyboard_lock/sync_key_hook.cc | 
| diff --git a/components/keyboard_lock/sync_key_hook.cc b/components/keyboard_lock/sync_key_hook.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..fc332fb34afbeabaa2758684791896d1d0f8ca6f | 
| --- /dev/null | 
| +++ b/components/keyboard_lock/sync_key_hook.cc | 
| @@ -0,0 +1,28 @@ | 
| +// 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/sync_key_hook.h" | 
| + | 
| +namespace keyboard_lock { | 
| + | 
| +SyncKeyHook::SyncKeyHook() = default; | 
| +SyncKeyHook::~SyncKeyHook() = default; | 
| + | 
| +void SyncKeyHook::RegisterKey(const std::vector<ui::KeyboardCode>& codes, | 
| +                              base::Callback<void(bool)> on_result) { | 
| +  bool result = RegisterKey(codes); | 
| +  if (on_result) { | 
| +    on_result.Run(result); | 
| +  } | 
| +} | 
| + | 
| +void SyncKeyHook::UnregisterKey(const std::vector<ui::KeyboardCode>& codes, | 
| +                                base::Callback<void(bool)> on_result) { | 
| +  bool result = UnregisterKey(codes); | 
| +  if (on_result) { | 
| +    on_result.Run(result); | 
| +  } | 
| +} | 
| + | 
| +}  // namespace keyboard_lock | 
|  |