blob: 49d3535cbdcd1d67b6aa2c32b8b47985be887097 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
// 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 "content/browser/keyboard_lock/keyboard_lock_service_impl.h"
#include <memory>
#include <utility>
#include "base/memory/ptr_util.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
namespace content {
KeyboardLockServiceImpl::KeyboardLockServiceImpl(
RenderFrameHost* render_frame_host)
: web_contents_(WebContents::FromRenderFrameHost(render_frame_host)) {
DCHECK(web_contents_);
}
KeyboardLockServiceImpl::~KeyboardLockServiceImpl() = default;
// static
void KeyboardLockServiceImpl::CreateMojoService(
RenderFrameHost* render_frame_host,
blink::mojom::KeyboardLockServiceRequest request) {
mojo::MakeStrongBinding(
std::make_unique<KeyboardLockServiceImpl>(render_frame_host),
std::move(request));
}
void KeyboardLockServiceImpl::RequestKeyboardLock(
const std::vector<std::string>& key_codes,
RequestKeyboardLockCallback callback) {
// TODO(zijiehe): Implementation required.
std::move(callback).Run(blink::mojom::KeyboardLockRequestResult::SUCCESS);
}
void KeyboardLockServiceImpl::CancelKeyboardLock() {
// TODO(zijiehe): Implementation required.
}
} // namespace content
|