| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" | 5 #include "content/browser/keyboard_lock/keyboard_lock_service_impl.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 11 #include "content/public/browser/render_frame_host.h" | 11 #include "content/public/browser/render_frame_host.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 KeyboardLockServiceImpl::KeyboardLockServiceImpl() = default; | 15 KeyboardLockServiceImpl::KeyboardLockServiceImpl() = default; |
| 16 | 16 |
| 17 KeyboardLockServiceImpl::~KeyboardLockServiceImpl() = default; | 17 KeyboardLockServiceImpl::~KeyboardLockServiceImpl() = default; |
| 18 | 18 |
| 19 // static | 19 // static |
| 20 void KeyboardLockServiceImpl::CreateMojoService( | 20 void KeyboardLockServiceImpl::CreateMojoService( |
| 21 blink::mojom::KeyboardLockServiceRequest request) { | 21 blink::mojom::KeyboardLockServiceRequest request) { |
| 22 mojo::MakeStrongBinding( | 22 mojo::MakeStrongBinding( |
| 23 base::MakeUnique<KeyboardLockServiceImpl>(), | 23 base::MakeUnique<KeyboardLockServiceImpl>(), |
| 24 std::move(request)); | 24 std::move(request)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 void KeyboardLockServiceImpl::RequestKeyLock( | 27 void KeyboardLockServiceImpl::RequestKeyboardLock( |
| 28 const std::vector<std::string>& key_codes, | 28 const std::vector<std::string>& key_codes, |
| 29 const RequestKeyLockCallback& callback) { | 29 const RequestKeyboardLockCallback& callback) { |
| 30 // TODO(zijiehe): Implementation required. | 30 // TODO(zijiehe): Implementation required. |
| 31 callback.Run(true, std::string()); | 31 callback.Run(blink::mojom::KeyboardLockRequestResult::SUCCESS); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void KeyboardLockServiceImpl::CancelKeyLock() { | 34 void KeyboardLockServiceImpl::CancelKeyboardLock() { |
| 35 // TODO(zijiehe): Implementation required. | 35 // TODO(zijiehe): Implementation required. |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace content | 38 } // namespace content |
| OLD | NEW |